THIS is suggestions only, and currently no relation to the current working of IM
I would probably make it more like (type shouldn't really deal with 'Alpha' components)
Code: Select all
convert -colo-profile RGB image.png .... output.png
This will read "image.png" as being a linear RGB image, and eventually writes the image as linear RGB.
ASIDE: Note -color-profile is in some ways doing what the option -type was intended to do when it was first created. I may be -type should be the option for this.
Even if some internal function changes stored colorspace the output color-profile remains RGB
As such something like this
Code: Select all
convert -color-profile RGB image.png .... -colorspace CMYK output.png
would still output a linear RGB image.
Remember in this scenario the default -type will be sRGB, as some operators (resize, convolve, distort, etc) may automatically convert (if at least a IM Q16) images to linear RGB for processing.
BUT
Code: Select all
convert -color-profile RGB image.png .... -color-profile sRGB output.png
would convert image from linear RGB to a sRGB color profile.
For JPEG it would replace the ICC and ICM color profile meta-data as appropriate, assuming IM actually knows where standard color profile information is.
Questions for Glenn...
Can PNG take profile information?
Can it handle CMYK?
Is CMYK ment to be linear?
Is their a sCMYK?
JPEG I believe converts colors to a YUV type color for actual fourier transform compression, as such it always maps colors to sRGB, unless a color profile is present. Is this correct?