Convert DNG with Color Correction

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
Tamehome

Convert DNG with Color Correction

Post by Tamehome »

Hi, I am using Software: ImageMagick-6.5.3-10-Q16 Static for Windows.

I am experiencing an issue when trying to convert a DNG file containing color correction metadata to another format, such as JPG. When I run the conversion, the output JPG appears fine, but only the original RAW data is used. If I use a program, such as Aperture, to make color corrections, such as changes to hue or tint, I think those changes are saved as XMP metadata embedded into the file, as opposed to being applied to the RAW data itself. However, it doesn't appear that the XMP correction metadata is being utilized when processing the DNG afterward using ImageMagick.

Is there an option, either in ImageMagick, or in the underlying DCRAW program used to process the DNG, that could utilize the color correction metadata? Unless I'm mistaken and the color correction information is stored elsewhere...?

Thanks,
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Convert DNG with Color Correction

Post by magick »

Edit delegate.xml and add the -a option to the dcraw delegate for automatic white balance.
Tamehome

Re: Convert DNG with Color Correction

Post by Tamehome »

Hi, thanks for the tip. I will test this out and post my results. Do you know if the -a parameter causes ImageMagick to perform its own white balance adjustment, or will it actually use the XMP parameters when making the white balance correction?

Thanks,
Tamehome

Re: Convert DNG with Color Correction

Post by Tamehome »

Hi, it does appear that the -a parameter causes ImageMagick to perform its own form of white balancing (Average the whole image for white balance), as opposed to using the XMP color correction information embedded in the image. If you happen to have any other ideas of how ImageMagick or similar command line utility could do this, that would be great. Otherwise I may have to resort to using Adobe/Aperture type software to manually generate the color corrected JPG's, instead of using a more automated workflow.

Thanks,
wiseman
Posts: 14
Joined: 2019-10-02T09:26:26-07:00
Authentication code: 1152

Re: Convert DNG with Color Correction

Post by wiseman »

Any further updates on this please with the latest imagemagick in place?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert DNG with Color Correction

Post by fmw42 »

I do not think the color correction data and algorithms are known other than to Adobe. So Imagemagick is not likely going to be able to properly make those corrections.

I will defer to anyone who knows otherwise. If so, please point the development team to that reference
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert DNG with Color Correction

Post by snibgo »

Tamehome wrote:Hi, it does appear that the -a parameter causes ImageMagick to perform its own form of white balancing...
That's not correct. "-a" is a parameter to dcraw, which does the white balancing.
snibgo's IM pages: im.snibgo.com
wiseman
Posts: 14
Joined: 2019-10-02T09:26:26-07:00
Authentication code: 1152

Re: Convert DNG with Color Correction

Post by wiseman »

snibgo wrote: 2019-10-11T13:50:26-07:00
Tamehome wrote:Hi, it does appear that the -a parameter causes ImageMagick to perform its own form of white balancing...
That's not correct. "-a" is a parameter to dcraw, which does the white balancing.
I think, Tamehome meant the same this as well as he had stated that it is not using the XMP parameters when -a option is used.
Post Reply