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

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 22461
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-12-26T13:11:30-07:00

.
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

User avatar
magick
Site Admin
Posts: 10732
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick » 2017-12-26T13:22:27-07:00

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.

Post Reply