home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!warwick!uknet!lsl!snail
- From: snail@lsl.co.uk
- Newsgroups: comp.windows.x
- Subject: Re: colors & pixels..
- Message-ID: <1992Nov23.133108.2671@lsl.co.uk>
- Date: 23 Nov 92 12:31:08 GMT
- References: <1ebdh6INN66a@uwm.edu> <1992Nov18.235931.7527@thunder.mcrcim.mcgill.edu>
- Organization: Laser-Scan Ltd., Cambridge
- Lines: 36
-
- In article <1992Nov18.235931.7527@thunder.mcrcim.mcgill.edu>, mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- > In article <1ebdh6INN66a@uwm.edu>, amit@point.cs.uwm.edu (Amit Srivastava) writes:
- >
- >> I am using DirectColor setting for colormaps. X has the rgb plane
- >> which has 24 bits to store the pixel. However it uses an unsigned
- >> long to store the pixel, does X care what u do with the remaining 8
- >> bits.
- >
- > (I assume that's supposed to be a question, in spite of the lack of a
- > question mark.)
- >
- > No. Pixel values are generally simply truncated to the correct number
- > of bits, rather than range-checking.
- >
- > But you can't count on those bits being there; it would be entirely
- > possible to have a 32-bit DirectColor visual with, say, 11 bits of red,
- > 11 of green, and 10 of blue....
-
- The other thing to watch out for is of course, what happens in the future,
- say X11R6/X12(?). Anyone remember all those foolish people who stored data in
- the upper 8 bits of the addresses on the MC68000 chip, and then apple moved to
- using 68020 in their computers. A lot of code died that day. In short, even if
- X doesn't give a flying f**k about those unused 8 bits, don't use then, because
- one day X may start giving a damn about it ( or even a different vendor's X
- server may care) and then your program is dead as well. And I bet it won't be
- an easy bug to track down, when it happens.
-
- You have been warned.
-
- Regards
- --
- snail@lsl.co.uk
-
- "para-phrasing an American's .sig"....
- For the record, I did not vote for Bill Clinton
- :-)
-