Converting Log DPX to sRGB

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?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Converting Log DPX to sRGB

Post by snibgo »

timurhai wrote:Why we convertiong Log DPX to sRGB JPEG by "-set colorspace Log" and Linear EXR to sRGB JPEG by "-colorspace sRGB" (logically it should be "-set colorspace RGB" ?

Code: Select all

-set colorspace Log -colorspace sRGB
... does two things. First, it declares the pixel values are log. This overrides anything IM might have read in the file metadata. Second, it converts the pixel values from log to sRGB and also changes the metadata.

If the input file contains a metadata flag saying "log", then you don't need the first. If your output format can only be sRGB then you don't need the second because IM will automatically convert for you.

Jpeg can also store CMYK data, so I would always include "-colorspace sRGB".
snibgo's IM pages: im.snibgo.com
User avatar
timurhai
Posts: 11
Joined: 2014-02-19T05:33:58-07:00
Authentication code: 6789
Location: Russia, Korolev

Re: Converting Log DPX to sRGB

Post by timurhai »

Hello everyone!
I integrated 6.8.8-8 in our pipeline and already checked for some time. Works fine with Log DPXs and Linear EXRs!
Just want to thank you again!

ps
i've got you logic and now agree with it:
- always specify colorspace for an output image
- specify colorspace for an input image if you want to override metadata settings

btw
now i have some other problem with some EXRs :)
viewtopic.php?f=1&t=25324
Timur Hairulin
Post Reply