Page 2 of 2

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-02T20:16:51-07:00
by henrywho
"Gray problems" seem to pop up a while after the other. I try to avoid them by adding "-set colorspace srgb" immediately after the input image. So far it works.

Edit: oops... not for 6.8.4-5

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-02T20:52:57-07:00
by fmw42
henrywho wrote:"Gray problems" seem to pop up a while after the other. I try to avoid them by adding "-set colorspace srgb" immediately after the input image. So far it works.

Edit: oops... not for 6.8.4-5

I am not sure that process you mention will not work with grayscale images. It fails for me when the input gray images is already non-linear sRGB gray (as per the images for the above post). It is probably fine for color images, since mostly they are already sRGB. So it really does not matter if you add that.

6.8.4.5 had particular issues that I also found. Hopefully, I think 6.8.4.7 (beta) is more solid, since all of the problems I have found were worked out in 6.8.4.6 and the .7 beta.

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-02T20:54:38-07:00
by snibgo
jhuckaby wrote:Try to view output.jpg. It will be much darker than the original.
snibgo wrote:But other programs don't follow this convention, and think g2.jpg is in sRGB colorspace, and display it accordingly.
I should perhaps say that IMdisplay, the viewer included in ImageMagick, displays both images the same (for v6.8.4-6). It recognises that one image is sRGB and the other is RGB. Gimp and Microsoft tools don't, so they display the output too dark.

One day, we will proudly say that IM led the vanguard for standardising Gray=RGB. Maybe.

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-03T01:22:28-07:00
by henrywho
fmw42 wrote:I am not sure that process you mention will not work with grayscale images. It fails for me when the input gray images is already non-linear sRGB gray (as per the images for the above post).
It worked a year ago when Imagemagick treated gray images (no matter grayscale or "color" images with gray shades only) as linear scale.

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-03T08:46:48-07:00
by glennrp
IM-6.8.4-6 is writing a gamma chunk in PNG output even when the iCCP chunk is also being written with a different effective gamma. I've checked in a change to IM-6.8.4-7 that will omit writing the gAMA and cHRM chunks when either the sRGB or iCCP chunk is being written. This may change the appearance (brightness/darkness) of some PNG ouput files when they are read by other applications that don't use the iCCP chunk.

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-03T10:49:02-07:00
by fmw42
henrywho wrote:
fmw42 wrote:I am not sure that process you mention will not work with grayscale images. It fails for me when the input gray images is already non-linear sRGB gray (as per the images for the above post).
It worked a year ago when Imagemagick treated gray images (no matter grayscale or "color" images with gray shades only) as linear scale.
That is reasonable, since RGB and sRGB were reversed then. So using -set colorspace sRGB in the older versions is like using -set colorspace RGB in the newer versions.

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-03T17:15:35-07:00
by henrywho
fmw42 wrote:That is reasonable, since RGB and sRGB were reversed then. So using -set colorspace sRGB in the older versions is like using -set colorspace RGB in the newer versions.
That's after the reversion of "-colorspace RGB" and "-colorspace sRGB"

Re: ImageMagick 6.8.4 darkening grayscale images on convert

Posted: 2013-04-03T17:34:29-07:00
by fmw42
That's after the reversion of "-colorspace RGB" and "-colorspace sRGB"

My apologies.

From your earlier post
ImageMagick 6.8.4-5 Q8 - Bug is reproducible
ImageMagick 6.8.3-10 Q8 - NOT REPRODUCIBLE
6.8.3.10 was after the swap in colorspace (which was from about 6.7.6.7 to about 6.7.7.7), though there was a change that occurred at about that time 6.8.3.9, 6.8.3.10 and 6.8.4.0. 6.8.3.10 was rather odd from my tests. However, I do not know if this relates to your issue.