Changed behavior of -colorspace?!

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
Lebostein
Posts: 8
Joined: 2011-09-13T11:07:46-07:00
Authentication code: 8675308

Changed behavior of -colorspace?!

Post by Lebostein »

Since years I convert images with alpha channel to the grey scale:

Code: Select all

convert input.png -colorspace Gray output.png
But since some weeks I get an other result as the years before! I see a white corona around my images!

This is the input (a RGBA image with grey colors only):
https://dl.dropboxusercontent.com/u/134 ... /input.png

This is the output with the old versions (looks exactly like the input, but with 256 colors):
https://dl.dropboxusercontent.com/u/134 ... tput_1.png

This is the output with the current version (I see an mysterious white corona, ImageMagick 6.9.2-0 Q16 x86_64 2015-09-11):
https://dl.dropboxusercontent.com/u/134 ... tput_2.png

What is wrong with the new version?

EDIT:
Other simple example: (you see the original png image vs. a screenshot of the gimp preview)

Original (rgba):
ImageImage

Converted with Gimp or with an older version of ImageMagic (8 bit greyscale+alpha):
ImageImage

Converted with current version of ImageMagic 6.9.2 (8 bit greyscale+alpha):
ImageImage

Here you can see the same problem of the sharpened white corona around the blurred edges! It seems the color values are mixed with the alpha values in a wrong way...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Changed behavior of -colorspace?!

Post by fmw42 »

I get the same bad result using IM 6.9.2.1 Q16 Mac OSX. So that does seem to be a bug.

But this seems to work for me

Code: Select all

convert circle_in.png -alpha off -colorspace gray -alpha on result.png
Lebostein
Posts: 8
Joined: 2011-09-13T11:07:46-07:00
Authentication code: 8675308

Re: Changed behavior of -colorspace?!

Post by Lebostein »

Thanks for the workaround. That seems to work until the bug(?) is fixed.
Lebostein
Posts: 8
Joined: 2011-09-13T11:07:46-07:00
Authentication code: 8675308

Re: Changed behavior of -colorspace?!

Post by Lebostein »

I saw in the changelog of version 2015-08-15 6.9.2-1 this entry:
Don't set image colorspace to gray for -alpha copy option

http://www.imagemagick.org/script/changelog.php

Could it be that changes in 6.9.2-1 causing the problem?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Changed behavior of -colorspace?!

Post by fmw42 »

I doubt it. But I could be wrong.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Changed behavior of -colorspace?!

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.9.2-2 Beta, available by sometime tomorrow. Thanks.
Post Reply