possible bug -set colorspace RGB with PNG and JPG

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: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug -set colorspace RGB with PNG and JPG

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
Post Reply