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
possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX
Re: possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX
Likely a PNG bug, we'll alert Glenn.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX
No. It gets the same wrong colorspace even when using jpg or gif. And in fact, does not convert to RGB or show gamma=1magick wrote:Likely a PNG bug, we'll alert Glenn.
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
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.magick wrote:Likely a PNG bug, we'll alert Glenn.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug RGB colorspace IM 6.8.5.4 Q16 Mac OSX
glennrp wrote: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.magick wrote:Likely a PNG bug, we'll alert Glenn.
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