home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / 16049 < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.6 KB  |  43 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!mcsun!sun4nl!alchemy!prisma!rvloon
  3. From: rvloon@cv.ruu.nl (Ronald van Loon)
  4. Subject: Re: 256 grayscale levels with standard colormap
  5. Originator: rvloon@triton.cv.ruu.nl
  6. Sender: usenet@cv.ruu.nl (Usenet Network)
  7. Message-ID: <1992Sep2.135617.27565@cv.ruu.nl>
  8. Date: Wed, 2 Sep 1992 13:56:17 GMT
  9. References: <1992Sep2.040959.16164@walter.cray.com>
  10. Nntp-Posting-Host: triton.cv.ruu.nl
  11. Organization: University of Utrecht, 3D Computer Vision Research Group
  12. Keywords: Colormap Grayscale
  13. Lines: 28
  14.  
  15. In <1992Sep2.040959.16164@walter.cray.com> vincent@cadillac.cray.com (Vincent LE BARAZER) writes:
  16.  
  17.  
  18. |" Hi everybodyx,
  19. |"
  20. |" I'd like to create an X application that draw lines of pixels, with
  21. |"color level from 0 to 255 in a Grayscale visual.
  22. |" This application has to work either on 8 planes grayscale servers or
  23. |"on 24 planes color server.
  24. |"
  25. |" My first step was to Create a new colormap, allocate 256 levels of gray
  26. |"pixels ( red = green = blue ), and install this colormap .
  27. |"
  28. |" ... but other X clients running on the same server do not like this new
  29. |"colormap !
  30. |"
  31. |" So , how can I handle 256 gray levels without changing the color map ?
  32. |"I suppose that the Visual type has something to do with this ??....
  33.  
  34. Yes. Don't create a new colormap, but allocate from the default one. Color
  35. allocation will succeed on a 24-bit server anyway and if the servers are true
  36. gray-scale you shouldn't have problems with allocating the necessary 256 grays
  37. either.
  38. -- 
  39. Ronald van Loon (rvloon@cv.ruu.nl) 3DCV Group, Utrecht, The Netherlands.
  40.  
  41. "I believe the word you are looking for is "AAAAAAAAAARRRRRRRRRRGGGGGHHHH!"
  42.     - The Penguin (Batman ][)
  43.