Page 1 of 1

possible bug -set colorspace RGB with PNG and JPG

Posted: 2013-05-04T15:55:27-07:00
by fmw42
This is probably related to viewtopic.php?f=3&t=23337

When converting to miff or mpc, the colorspace is properly RGB and gamma=1. But when doing the same with PNG and JPG, neither becomes colorspace=RGB and only the PNG gets gamma=1.


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


convert rose: -set colorspace RGB rose.png
Image: rose.png
Class: DirectClass
Colorspace: sRGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: srgb
Rendering intent: Perceptual
Gamma: 1

convert rose: -set colorspace RGB rose.miff
Image: rose.miff
Class: DirectClass
Colorspace: RGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: rgb
Rendering intent: Perceptual
Gamma: 1

convert rose: -set colorspace RGB rose.mpc
Image: rose.mpc
Class: DirectClass
Colorspace: RGB
Type: TrueColor
Depth: 8-bit
Alpha: False
Channels: rgb
Rendering intent: Perceptual
Gamma: 1

Re: possible bug -set colorspace RGB with PNG and JPG

Posted: 2013-05-04T17:53:16-07:00
by magick
You'll need to associate a color profile with the JPEG format to distinguish linear from non-linear JPEG. Otherwise its assumes sRGB. Hopefully Glenn will respond about the PNG image format.