Page 1 of 1
Linear Gray MIFF seems to be mistaken as "sGray" in 6.7.6-6
Posted: 2012-04-18T03:34:00-07:00
by henrywho
Code: Select all
convert.exe rings_lg_orig.png -colorspace RGB -distort resize 16% -colorspace sRGB -quality 95% t01.jpg
convert.exe rings_lg_orig.png -colorspace RGB -distort resize 16% t02.mpc
convert.exe t02.mpc -colorspace sRGB -quality 95% t02.jpg
convert.exe rings_lg_orig.png -colorspace RGB -distort resize 16% t03.miff
convert.exe t03.miff -colorspace sRGB -quality 95% t03a.jpg
convert.exe t03.miff -set colorspace RGB -colorspace sRGB -quality 95% t03b.jpg
t01.jpg, t02.jpg, t03b.jpg all looks okay.
t03a.jpg is very dark, as if "-colorspace sRGB" is not doing anything.
I thought MIFF carries all necessary information, including its colorspace.
Re: Linear Gray MIFF seems to be mistaken as "sGray" in 6.7.
Posted: 2012-04-18T05:37:23-07:00
by magick
We can reproduce the problem you reported and have a patch. Look for it in ImageMagick 6.7.6-7 Beta within a day or two. Thanks.
Re: Linear Gray MIFF seems to be mistaken as "sGray" in 6.7.
Posted: 2012-04-18T19:13:28-07:00
by anthony
magick wrote:We can reproduce the problem you reported and have a patch. Look for it in ImageMagick 6.7.6-7 Beta within a day or two. Thanks.
The problem is that MIFF is being saved as "Gray" whcih does not define if it is linear Gray or sRGB type Gray.
It basically makes that case that a 'sGray' colorspace is needed.
The same thing happens for TXT: images.
Re: Linear Gray MIFF seems to be mistaken as "sGray" in 6.7.
Posted: 2012-04-19T05:22:37-07:00
by henrywho
Indeed, we have at least four combinations:
1) Linear Gray
2) S-Gray
3) Gray-only color image in Linear RGB
4) Gray-only color image in sRGB
Imagemagick will auto-magically convert (3)/(4) to (1)/(2), for some rationale I don't really understand.
Re: Linear Gray MIFF seems to be mistaken as "sGray" in 6.7.
Posted: 2012-04-19T18:04:25-07:00
by anthony
The reason for the change is default format handling in that it tried to make a MIFF image
(or PNG image) smaller by saving it as grayscale, with a single color channel (gray) instead of three color channels.
That is it tried to make the save file 1/3 the size with savings in disk I/O times, disk space, and data handling.
It was always present, it was just before the conversion from a input sRGB to linear RGB was very uncommon, and the colorspace converter think Gray as being linear Gray (rightly so).
because of this it was very rare to encounter it. Now it isn't so rare!