How to handle DNG specific features ?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

How to handle DNG specific features ?

Post 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
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: How to handle DNG specific features ?

Post by kriks »

up.

Am I the only one having those problems ?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to handle DNG specific features ?

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: How to handle DNG specific features ?

Post by kriks »

thanks.

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