Re: [gtk-list] Re: how to encode for 256 color pixmap?
- From: "Emmanuel DELOGET" <logout free fr>
- To: <gtk-list redhat com>
- Subject: Re: [gtk-list] Re: how to encode for 256 color pixmap?
- Date: Mon, 8 Nov 1999 16:36:49 +0100
> On Wed, Oct 13, 1999 at 02:01:28PM +0200, Erik Mouw wrote:
> > On Wed, 13 Oct 1999 10:30:26 +0800, shigang wrote:
> > > I have a pixmap file which have 256 grey colors. Because of using
ASCII
> > > code, each pixel is
> > >
> > > descibed by two characters. This make xpm file as twice larger as raw
data
> > > file.
> > >
> > > Can someone tell me how to encode xpm file so each byte can
instead a
> > > pixel?
> >
> > It can't be done: ASCII is a 7 bit character set, 256 colors needs 8
bits,
> > so you need two bytes to encode it.
>
> what about using some kind of 8bit ASCII encoding, like latin1 for example
?
This is not possible at all, since the the first 32 char of latin1 are not
printable
characters - moreover, you cannot have a \0 in any of the xpm string (since
this will cut a line...). So you need 2 chars to encode these 256 colors.
Regards,
Emmanuel
>
> Friendly,
>
> Sven LUTHER
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]