home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / 19465 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.8 KB

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