Page 1 of 1

IM can't read png as pseudo-class

Posted: 2012-01-23T09:46:49-07:00
by bom
Hi!
System:
OS: CentOS 5.5
Version: ImageMagick 6.6.5-10 2010-11-26 Q16 http://www.imagemagick.org

I have a problem.
When I "identify" a png file, the result showed:
Class: DirectClass

But, this png file has indexed-colors(palette, colormap).
So, I want IM to indetify it as "PseudoClass", and I want to get infomations of indexed-colors(palette, colormap).

----------------------

And, the indexed-colors(palette, colormap) of the png have an alpha value.
So, with IM ( I use perlmagick ), I want to get color infomations that contain alpha value by doing following :
$color = $image->Get( "colormap[ $i ]" )



Sorry for my clumsy English.
Thanks.

Re: IM can't read png as pseudo-class

Posted: 2012-01-23T12:29:11-07:00
by fmw42
in command line, one would add -type palette (or palettematte if transparency). I do not use APIs so cannot help you in that environment. Also you may want to upgrade IM as the PNG format has undergone quite a bit of improvement over many releases.