Log To sRGB with Dpx files

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
salvati.marc

Log To sRGB with Dpx files

Post by salvati.marc »

Hello guys,
I m still in the search of understanding on how using Log, RGB and sRGB color spaces...
Lets say i have a Log color space file

Code: Select all

convert -size 100x100 plasma: -colorspace Log testplasma.dpx
I look at it in my Nuke (reference black 95, reference white 685, gamma 0.6)

Then i want a Jpg image representing what I m seeing in Nuke (to build some preview videos).
I tried the simple:

Code: Select all

convert testplasma.dpx testplasma.jpg
then i opened it with photoshop, which was darker than my original result in Nuke.
then I opened in Nuke.
If i set the Jpg color space to RGB-> same result
If i set the Jpg color space to sRGB-> not same result.

I would like to open my file in Nuke, with the sRGB color space and have the same result I had with the dpx file...

I tried to make some

Code: Select all

convert -set reference-white XX -set reference-black XX -gamma XX testplasma.dpx -colorspace sRGB testplasma.jpg
And it does not work...

Then I found out that sRGB was really close to 2.2 gamma setting. Then i tried the

Code: Select all

convert -colorspace RGB -gamma 2.2 testplasma.dpx -colorspace sRGB testplasma.jpg
I suppose it s opening the Dpx in linear mode, setting up a 2.2 gamma and writing it down in sRGB color space...
it sounds to me like a hack, but I succeeded to get my jpg in sRGB mode in Nuke match the dpx in Cineon mode....

Does someone understand why it is so?
If someone could point me to some documentation to understand how should work the RGB, sRGB, Log space, and how image magick uses it?

Code: Select all

convert -size 100x100 plasma: -colorspace Log testplasma.dpx
convert testplasma.dpx testplasmaRightRGB.jpg
convert testplasma.dpx -colorspace sRGB testplasmaWrong.jpg
convert -colorspace RGB -gamma 2.2 testplasma.dpx -colorspace sRGB testplasmaRightSRGB.jpg
salvati.marc

Re: Log To sRGB with Dpx files

Post by salvati.marc »

i found out that the command

Code: Select all

convert -colorspace RGB testplasma.dpx -set colorspace sRGB testplasma.jpg
gave me the right result

It seeme deeply related to the role of -colorspace, and -set colorspace difference...
Which I can say I still dont really understands...
Post Reply