home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15335 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.9 KB

  1. Path: sparky!uunet!cs.utexas.edu!usc!wupost!waikato.ac.nz!ldo
  2. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: CopyBits question
  5. Message-ID: <1992Sep11.184624.10765@waikato.ac.nz>
  6. Date: 11 Sep 92 18:46:24 +1200
  7. References: <1992Sep11.001409.13276@cs.cornell.edu>
  8. Organization: University of Waikato, Hamilton, New Zealand
  9. Lines: 27
  10.  
  11. In article <1992Sep11.001409.13276@cs.cornell.edu>, csuley@cs.cornell.edu (Christopher Suley) writes:
  12. > I have a color image residing in an offscreen pixmap that I want to
  13. > CopyBits to the screen.  Not too hard, but there's a catch.  I want
  14. > all of the white pixels in the offscreen image to become a certain
  15. > color when they appear on the screen.
  16.  
  17. This is easy, provided the offscreen pixmap is an indexed one. In an indexed
  18. pixmap, a pixel represents white because it indexes into a CLUT entry containing
  19. white. Want that pixel value to represent a colour other than white? Just
  20. change the CLUT entry!
  21.  
  22. > Setting the background color to the color I want would work, but it
  23. > would colorize the rest of the image. (right?  I am programming on
  24. > an SE, so this color stuff is mostly a mental experiment until I
  25. > run up the massive hill to school and test it on a color computer
  26. > there... talk about an expensive code/compile/run cycle. ;)
  27.  
  28. Aye, that it would. Also remember that the colouring effect is different
  29. between System 6 and System 7; the effect under System 6 is dependent on
  30. a whole bunch of other entries in the CLUT (the gory details are in TN 163),
  31. whereas System 7 interpolates between the foreground and background colours.
  32.  
  33. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  34. Computer Services Dept                     fax: +64-7-838-4066
  35. University of Waikato            electric mail: ldo@waikato.ac.nz
  36. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
  37. I don't claim to be consistent. Yes I do!
  38.