EXIF Metadata from DNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
yasokuuhl
Posts: 8
Joined: 2019-08-22T07:42:59-07:00
Authentication code: 1152

EXIF Metadata from DNG

Post by yasokuuhl »

Hi!

I'm trying to read EXIF metadata from DNG source files. But identify doesn't show me any of them.
Used Commandline:

Code: Select all

identify -verbose RAW_CANON_1DM2.dng
The source file I used (which has loads of EXIF metadata) can be retrieved here: https://bitmovin-poc-input.s3-eu-west-1 ... N_1DM2.dng

I assume it has something to do with the ufraw-batch delegate that is used to create some intermediate file on which the actual metadata extraction is performed. Does anyone have an idea what I could do to get the EXIF metadata with imagemagick?

Oh and here's the version I used:

Code: Select all

identify -version
Version: ImageMagick 7.0.8-59 Q16 x86_64 2019-08-05 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(3.1)
Delegates (built-in): bzlib freetype heic jng jp2 jpeg lcms ltdl lzma openexr png tiff webp xml zlib
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: EXIF Metadata from DNG

Post by snibgo »

I suggest you use exiftool for this, not ImageMagick.
snibgo's IM pages: im.snibgo.com
yasokuuhl
Posts: 8
Joined: 2019-08-22T07:42:59-07:00
Authentication code: 1152

Re: EXIF Metadata from DNG

Post by yasokuuhl »

I know exiftool would be a superb alternative for that task.
Sadly I have to fix an already existing workflow that is quite big and in a fairly restrictive environment - and it relies exclusively on imagemagick. Getting exiftool in that environment would be a huge effort.
So my primary goal would still be to get this working with imagemagick somehow.

I performed some more tests in the meantime and I'm already quite sure that ufraw-batch seems to be the problem. Maybe switching the intermediate file that is generated during the "identify" process to a different format like jpeg or tiff could help. I tried changing the according line in the delegates.xml from this:

Code: Select all

<delegate decode="dng:decode" command="&quot;ufraw-batch&quot; --silent --create-id=also --out-type=png --out-depth=16 &quot;--output=%u.png&quot; &quot;%i&quot;"/>
to this:

Code: Select all

<delegate decode="dng:decode" command="&quot;ufraw-batch&quot; --silent --create-id=also --out-type=jpg --out-depth=16 &quot;--output=%u.jpg&quot; &quot;%i&quot;"/>
But then I always get this error message:

Code: Select all

identify -verbose RAW_CANON_1DM2.dng
identify: unable to open image '/var/folders/wm/m3m6tf1s5sx8bw52dhk7c4nxkkhfhv/T/magick-59202VqmliD6TD2ln.ppm': No such file or directory @ error/blob.c/OpenBlob/3497.
What was my mistake?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: EXIF Metadata from DNG

Post by snibgo »

The error message says IM expects the data from ufraw-batch to be in PPM format. Even if it worked, I doubt it would solve your problem.

Try reading the DNG as a TIFF, and listing all the metadata:

Code: Select all

identify -verbose TIFF:RAW_CANON_1DM2.dng
Does that list the metadata you want? If not, then IM won't do what you want.
snibgo's IM pages: im.snibgo.com
Post Reply