IM can't read png as pseudo-class

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
bom
Posts: 1
Joined: 2012-01-23T09:17:49-07:00
Authentication code: 8675308

IM can't read png as pseudo-class

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
Post Reply