Re: -colorspace no longer working
Posted: 2011-08-18T16:34:48-07:00
Okay. I see...
The save of pure grayscale image is different to one that contains a red dot (to make it non-greyscale).
Yes you are right something is screwy. Hmmm...
Okay. The BUG...
When a pure grayscale image gets saved to MIFF it gets saved with a colorspace "Gray"
convert Rings1_24r.jpg -colorspace sRGB -distort resize 100x miff:- | grep --text ^colorspace[/code]
In otherwords IM will need either a "sGray" attribute (reversed meaning just as sRGB/RGB is reverse), or should not convert sRGB to Gray when saving to the MIFF. I have made a note about this for IMv7 development.
As a temporary solution (at least for IMv6), this will correct MIFF handling...
basically it added (set) the information that was 'lost'. Its not particularly nice, but solves the problem.
The save of pure grayscale image is different to one that contains a red dot (to make it non-greyscale).
Yes you are right something is screwy. Hmmm...
Okay. The BUG...
When a pure grayscale image gets saved to MIFF it gets saved with a colorspace "Gray"
Code: Select all
convert Rings1_24b.jpg -colorspace sRGB -distort resize 100x miff:- | grep --text ^colorspace
but the same image with a spot of color preserves the colorspace correctly!colorspace=Gray
convert Rings1_24r.jpg -colorspace sRGB -distort resize 100x miff:- | grep --text ^colorspace[/code]
So in other words MIFF file format is 'loosing' the fact that the image is not just Gray but that the image is linear_graycolorspace=sRGB
In otherwords IM will need either a "sGray" attribute (reversed meaning just as sRGB/RGB is reverse), or should not convert sRGB to Gray when saving to the MIFF. I have made a note about this for IMv7 development.
As a temporary solution (at least for IMv6), this will correct MIFF handling...
Code: Select all
convert Rings1.gif -colorspace sRGB -distort resize 100x -depth 16 rings1_small.miff
convert rings1_small.miff -set colorspace sRGB -colorspace RGB -depth 8 rings1_small_miff.png