Page 1 of 1

EXIF Metadata from DNG

Posted: 2019-09-20T14:44:06-07:00
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

Re: EXIF Metadata from DNG

Posted: 2019-09-20T15:27:50-07:00
by snibgo
I suggest you use exiftool for this, not ImageMagick.

Re: EXIF Metadata from DNG

Posted: 2019-09-20T16:02:01-07:00
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?

Re: EXIF Metadata from DNG

Posted: 2019-09-20T16:13:58-07:00
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.