[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gimp-developer
Subject:    Re: [gimp-devel] xpm output: is RGB a legal xpm format?
From:       Simon Budig <Simon.Budig () unix-ag ! uni-siegen ! de>
Date:       2000-08-22 12:19:14
[Download RAW message or body]

Uwe Koloska (uwe.koloska@mailbox.tu-dresden.de) wrote:
> With this (and possibly later versions) it is possble to save an RGB image
> to xpm format.  I don't know the xpm format, but the xpm code from kde 1.1
> isn't possible to load such an not-indexed xpm image.
> 
> So two questions:
> o is it legal to save an xpm image in not-indexed format?
> o is the header of this not-indexed format right?  Maybe there is missing
>   the indication for the RGB format

AFAIK the xpm format does not make a difference between "indexed" and
"rgb". From the xpm point of view everything is indexed - with an
arbitrary number of colors.

With a small number of colors it assigns every color an character - 
you can easily understand the format if you read an xpm file.
However with this you run into problems if you have more than ~ 100
colors, because then you would have to use nonprintable/non-ascii
characters. So the xpm-format can use strings (of the same length)
for different colors: "aa" could be red, "ab" green etc.
So the strin "aaab" would mean a red and a green pixel.

I believe this is standard, this bug should be fixed in KDE.

Bye,
        Simon
-- 
      Simon.Budig@unix-ag.org       http://www.home.unix-ag.org/simon/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic