Page 1 of 1

PNG 64 Colors -> XPM causes 256 colors

Posted: 2011-05-07T08:49:46-07:00
by ciantic
Hi!

First I save my image from Photoshop as 64 color PNG8, then I try to do this:

convert my.png my.xpm and I get following file:

Code: Select all

/* XPM */
static char *add[] = {
/* columns rows colors chars-per-pixel */
"16 16 256 2",
"   c None",
".  c #F0F0F0",
"X  c #F0F0F0",
"o  c #F0F0F0",
"O  c #F0F0F0",
"+  c #F0F0F0",
"@  c #F0F0F0",
"#  c #F0F0F0",
"$  c #F0F0F0",
"%  c #F0F0F0",
"&  c #F0F0F0",
...
Simply it does 256 color XPM with multiple characters as same color, clearly this is waste of everything.

(Version: ImageMagick 6.6.1-8 2010-05-12 Q16 http://www.imagemagick.org, trying now with newer)

Update: FIXED! I updated to ImageMagick 6.6.9-8 and no more redundant colors.