Page 1 of 1

How to handle DNG specific features ?

Posted: 2011-07-21T04:44:23-07:00
by kriks
Hi everyone,

I've been asked to analyze if we can handle DNG files.
First try: yeah, with ufraw, IM works great.

But the picture is not cropped as the DNG specifies it.
Here is the interesting part of the XMP data provided by exiftool (identify -verbose does not show them) :

Code: Select all

Crop Left Margin                : 0
Crop Right Margin               : 0
Crop Top Margin                 : 0
Crop Bottom Margin              : 0
Cropped Image Width             : 3888
Cropped Image Height            : 2592
Default Crop Origin             : 10 5
Default Crop Size               : 3888 2592
Crop Top                        : 0
Crop Left                       : 0.269117
Crop Bottom                     : 0.846325
Crop Right                      : 0.833333
Crop Angle                      : 0
Crop Constrain To Warp          : 0
Notice that the picture is 3908x2602.
I could fall back on the "good side" by reducing the pict to 3888x2592 as mentionned, and then apply crop with the crop ratios given.
Is there a way to do it natively ? (ufraw says it has an auto-crop features, but I can't get it to work)


I also have a case where the DNG has lot of XMP data which contain information about several snapshot of the same picture. (e.g.: one for the whole picture, one for a detail, one for the whole picture in black and white, etc).
I don't know how to handle those cases properly.


Anyone already faced this problem ?
Maybe there is a part of the work that ufraw should do?
I can provide test files, but not publicly.

thanks

Re: How to handle DNG specific features ?

Posted: 2011-07-31T23:34:51-07:00
by kriks
up.

Am I the only one having those problems ?

Re: How to handle DNG specific features ?

Posted: 2011-08-01T18:55:54-07:00
by anthony
Typically IM does not do much with profile meta-data. There is too much variation.
In fact IM does nto even read DNG files itself but gets ufraw to do that conversion.

You can see the command that IM uses for the ufraw call by looking in the delegates file.
Or listing them using

Code: Select all

 convert -list delegate
If ufraw has an option to deal with this specific meta-data you may be better off calling the delegate command yourself or creating your own delegate.
http://www.imagemagick.org/Usage/files/#delegates

Re: How to handle DNG specific features ?

Posted: 2011-08-02T01:02:14-07:00
by kriks
thanks.

I've made a copy / paste here for following : https://sourceforge.net/tracker/?func=d ... tid=709089