Page 1 of 1

Separating alpha channel yields values that are too low.

Posted: 2014-02-18T17:42:59-07:00
by bram
Hello,

So I have a PNG with alpha in it.
Created with inkscape, I created a white 64x64 image with alpha value 90.

When I extract the alpha channel with NetPBM, I get a proper result: value 90.

When I extract the alpha channel with ImageMagick, I get the value 26 instead, far too low.

Code: Select all

$ pngtopnm -alpha white.png > white.pgm
$ pgmhist white.pgm 
value	count	b%	w%
-----	-----	--	--
90	4096	  100%	  100%
$ convert white.png -channel A -separate out.pgm
$ pgmhist out.pgm 
value	count	b%	w%
-----	-----	--	--
26	4096	  100%	  100%
Why doesn't ImageMagick output the proper values?
Version: ImageMagick 6.7.7-10 2013-09-10 Q16

Thanks,

Bram

Re: Separating alpha channel yields values that are too low.

Posted: 2014-02-18T18:48:34-07:00
by snibgo
The numbers correspond to a RGB/sRGB problem. Your IM is old, at a time when it made strange assumptions that greyscale files were RGB. Try a more modern version.