Path: utzoo!censor!geac!jtsv16!uunet!brunix!iris.brown.edu!ejd From: ejd@iris.brown.edu (Ed Devinney) Newsgroups: comp.sys.mac.programmer Subject: Re: PICT2 Message-ID: <15891@brunix.UUCP> Date: 21 Sep 89 23:13:12 GMT References: <3084@ur-cc.UUCP> Distribution: usa Organization: IRIS/Brown University Lines: 36 In article <3084@ur-cc.UUCP> tonyg@merlin.cvs.rochester.edu (Tony Giaccone) writes: > So if that's the case why doesn't the copybits install a copy of the > current color table into the PICT2. Or, if it does how come PICTViewer > doesn't use that Color Table when it displays the file? It certainly seems > to use the color tables in other PICT2 files. I don't get it. If you use something like PictDetective*, you should see that CopyBits() does put a copy of the ColorTable into the PICT. This Table, though, will not assert its colors in the GDevice when you _draw_ the pict. The Table is used only as the source table when CopyBits does its color mapping on pict playback. I would bet that the reason that PICTViewer seems to use the ColorTable for other PICTs is that the colors in them may be closer to the default palette and don't get mapped too badly. What you probably want to do is to write or find a PICT-viewing program that allows import of Palettes as well as PICTs (tho' I don't know of any offhand); when writing your files you could also write a Palette resource, for instance. In sum, the PICT does hold a copy of the ColorTable. The ColorTable will be used by CopyBits() to map your PixMap's colors to those in the GDevice. The ColorTable currently in the GDevice will _not_ be affected by the ColorTable in your PixMap. It is the job of the displaying application to determine the appropriate Palette needed to display the PICT correctly, and to cause its Window to assert that Palette. ed - Former Junior Rocket Scientist for Color @ Cricket Software (RIP) [*PictDetective is a product of Palomar Software] ++++++ ed devinney...IRIS/Brown University, Providence, RI...ejd@iris.brown.edu -- There's a light on the hill, that's far out in the distance, ...it calls out my name, it calls out for a change...(Fishbone) --