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