Page 1 of 1

XPM icons malformed colour definition

Posted: Tue Mar 01, 2005 12:17 pm
by armink
Hi again,

I try to embed an icon on win/cygwin and transformed the icon from .ico to .xpm, included the xpm, it compiles fine.

But when I start the app, errors like "maformed colour definition ..." appear.

I converted the ico with "GraphicsMagick" on X-Cygwin, tried to convert with CMYK, RGB ... always the same, only "monochrome" is accepted.

Has anybody a clue what the problem is with the colours ?

Example from the XPM file:

/* columns rows colors chars-per-pixel */
"32 32 64 1",
" c #0043BE00",
". c #0049C700",
"X c #0056D200",

etc ...

Posted: Tue Mar 01, 2005 12:41 pm
by mjs
Hi,

what is the color format of the hex values?
#0043BE00

Is it:
00 = R
43 = G
BE = B
00 = ??

or:
00 = ??
43 = R
BE = G
00 = B

The best would be that you use only 6-digit hex values ...

Regards,
Mark

xpm

Posted: Tue Mar 01, 2005 12:47 pm
by armink
That was it !

Format was "RGB00", I just removed the trailing "00"s, now it works fine.

Thanx ! :)