Page 1 of 1

Changed behavior of -colorspace?!

Posted: 2015-09-14T15:04:50-07:00
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...

Re: Changed behavior of -colorspace?!

Posted: 2015-09-15T09:40:22-07:00
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

Re: Changed behavior of -colorspace?!

Posted: 2015-09-15T12:22:46-07:00
by Lebostein
Thanks for the workaround. That seems to work until the bug(?) is fixed.

Re: Changed behavior of -colorspace?!

Posted: 2015-09-15T23:10:41-07:00
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?

Re: Changed behavior of -colorspace?!

Posted: 2015-09-16T08:59:57-07:00
by fmw42
I doubt it. But I could be wrong.

Re: Changed behavior of -colorspace?!

Posted: 2015-09-19T04:57:18-07:00
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.