Code: Select all
convert testplasma.dpx -colorspace sRGB -set colorspace RGB testplasma.jpg
That is: read image, convert to sRGB colorspace, tell IM it is not actually RGB, and save.
However there was some discussion in another recent 'bug' about what -colorspace sRGB is really doing. You may like to check it and upgrade your IM version.
Finally, maybe because of that bug, I cant get it to work properly.
I guess that theoritically, without
fighting the built-in automatic support in IM in very bad ways.
, I would need to do something like :
Code: Select all
convert testplasma.dpx -colorspace sRGB -profile sRGB.icm testplasma.jpg
But it does not work...
Having or not having the -profile sRGB.icm does not change anything(in the pixel data).
The only difference is in the metadata.
Having or not having the -colorspace sRGB does not change anything.
I have my colors like in my dpx file, in RGB linear space.
So I do something like
Code: Select all
convert testplasma.dpx -colorspace RGB -set colorspace sRGB -profile sRGB.icm testplasma.jpg
And it works, as long as i
remember to tell IM and other programs when reading this JPG that it is really sRGB jpeg.
But again, the -profile sRGB.icm does not change anything to the data. It s only in the metadata, and does not change anything the way the file is read by Nuke.
As for the -type parameter... there is no way to specify sRGB or Log or any colorspace. We can only specify
Bilevel, Grayscale, GrayscaleMatte, Palette, PaletteMatte, TrueColor, TrueColorMatte, ColorSeparation, ColorSeparationMatte, or Optimize.
My conclusion is that
-profile: set metadata concerning color profile if supported by target file type
-colorspace : change the way actual pixel are represented
-set colorspace: sets the file type metadata AND makes a conversion from the previous colorspace to the given colorspace before storing data in output image.
As for my dpx -> jpeg conversion
Code: Select all
convert testplasma.dpx -colorspace RGB -set colorspace sRGB -profile sRGB.icm testplasma.jpg
-profile sRGB.icm: include metadata for sRGB color profile
-colorspace: i need to use it to get the data to a easy to convert format: RGB
-set colorspace: really tricky.... the "set metadata" colorspace seems to be supported inside IM. then it considers the output file to store those data, regardless of if the format support it or not. Jpeg does not support explicitaly colorspace (since it support profiles). But sill i need to store sRGB data if I want to match the included profile information.
If i just use -colorspace sRGB, not colorspace is set, and by default, Jpeg is RGB. So it does not save sRGB data information with the following command.
Code: Select all
convert testplasma.dpx -colorspace RGB -colorspace sRGB -profile sRGB.icm testplasma.jpg
Or everything I m doing is only different from what i shoud do, but what I should do does not work because of the bug in sRGB handling....
I just checked the change log and the sRGB bug is not yet included in the distribution... So i ll wait i guess.
If there was no bug, I think I should be able to use just one of those command (which one?):
Code: Select all
convert testplasma.dpx -colorspace sRGB testplasma.jpg
Code: Select all
convert testplasma.dpx -profile sRGB.icm testplasma.jpg
Code: Select all
convert testplasma.dpx -colorspace sRGB -profile sRGB.icm testplasma.jpg