Page 1 of 1

possible bug icc-color(gray...) no linear

Posted: 2017-12-26T13:11:30-07:00
by fmw42
.
I believe icc-colors should support both linear and non-linear colors in IM 6.9.9.28 and 7.0.7.16

Code: Select all

convert xc:"icc-color(srgb,1,0,0)" -format "%[colorspace] %[gamma]\n" -write info: non-linear_red.png
sRGB 0.454545 <-- correct

Code: Select all

convert xc:"icc-color(rgb,1,0,0)" -format "%[colorspace] %[gamma]\n" -write info: linear_red.png
RGB 1 <-- correct

Code: Select all

convert xc:"icc-color(sgray,1)" -format "%[colorspace] %[gamma]\n" -write info: non-linear_white.png
sGray 0.454545 <-- correct

convert xc:"icc-color(gray,1)" -format "%[colorspace] %[gamma]\n" -write info: linear_white.png
sGray 0.454545 <-- incorrect -- should be Gray 1

identify -verbose linear_white.png
Colorspace: sGray <-- incorrect -- should be Gray 1
Type: Bilevel
Gamma: 0.45455 <-- incorrect -- should be Gray 1

Re: possible bug icc-color(gray...) no linear

Posted: 2017-12-26T13:22:27-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.