Page 1 of 1

possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX

Posted: 2013-05-03T10:36:53-07:00
by fmw42
This is very strange. When I convert to -colorspace RGB following -extent, the result is still colorspace sRGB with gamma=1 and not colorspace RGB. It happens with png, jpg and gif

convert rose: rose.png

Image: rose.png
Class: DirectClass
Colorspace: sRGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: srgb
Rendering intent: Perceptual
Gamma: 0.45455

convert rose.png -strip -background "rgb(112,106,106)" -extent 200x200 -colorspace RGB rose_ext_rgb.png


Image: rose_ext_rgb.png
Class: DirectClass
Colorspace: sRGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: srgb
Rendering intent: Perceptual
Gamma: 1

Re: possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX

Posted: 2013-05-03T13:56:40-07:00
by magick
Likely a PNG bug, we'll alert Glenn.

Re: possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX

Posted: 2013-05-03T14:56:30-07:00
by fmw42
magick wrote:Likely a PNG bug, we'll alert Glenn.
No. It gets the same wrong colorspace even when using jpg or gif. And in fact, does not convert to RGB or show gamma=1

convert rose: rose.jpg
Image: rose.jpg
Class: DirectClass
Colorspace: sRGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: srgb
Rendering intent: Perceptual
Gamma: 0.454545

Wrong output colorspace and gamma:
convert rose.jpg -strip -background "rgb(112,106,106)" -extent 200x200 -colorspace RGB rose_ext_rgb.jpg
Image: rose_ext_rgb.jpg
Class: DirectClass
Colorspace: sRGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: srgb
Rendering intent: Perceptual
Gamma: 0.454545


And if saved to PNG, it still has the wrong colorspace but has the correct gamma.
convert rose.jpg -strip -background "rgb(112,106,106)" -extent 200x200 -colorspace RGB rose_ext_rgb.png
Image: rose_ext_rgb.png
Class: DirectClass
Colorspace: sRGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: srgb
Rendering intent: Perceptual
Gamma: 1

Re: possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX

Posted: 2013-05-03T15:07:45-07:00
by glennrp
magick wrote:Likely a PNG bug, we'll alert Glenn.
Problem is that the PNG encoder uses the presence of rendering_intent to decide whether to write the sRGB chunk or not. I'll try to fix that.

Re: possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX

Posted: 2013-05-03T16:30:41-07:00
by fmw42
glennrp wrote:
magick wrote:Likely a PNG bug, we'll alert Glenn.
Problem is that the PNG encoder uses the presence of rendering_intent to decide whether to write the sRGB chunk or not. I'll try to fix that.

That may fix the write to PNG, but it does not fix the example above that starts with jpg and writes to jpg. It never gets converted to linear RGB. It still shows sRGB and gamma=0.4545 rather than RGB and gamma=1