Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!udel!rochester!uhura.cc.rochester.edu!merlin.cvs.rochester.edu!tonyg From: tonyg@merlin.cvs.rochester.edu (Tony Giaccone) Newsgroups: comp.sys.mac.programmer Subject: PICT2 Summary: Somebody Explain this. Message-ID: <3084@ur-cc.UUCP> Date: 21 Sep 89 20:07:48 GMT Sender: news@uhura.cc.rochester.edu Reply-To: tonyg@cvs.rochester.edu (Tony Giaccone) Distribution: usa Organization: Univ. Roch. Center for Visual Sci. Lines: 38 Ok Folks, I've posted this question before, and it didn't get an answer then. Maybe we'll have a little better luck this time. I've written an application that takes sun raster files, and converts them in to PICT2 files. It's almost perfect. However, I've run into a problem that I don't know how to solve, and in fact the documentation seems to indicate I shouldn't be having at all. When I open the sun raster file, I use the sun color map to create a ColorTable. From that ColorTable, I create a Pallette with CTab2Palette. I then display the image in the window, and associate the palette with that window. This all works fine as the image displays using the colors from the sun map. My next step is to create the PICT2 file. I do this in the way suggested by the technotes, and the PICT File Format Notes. However, the colormap doesn't seem to get stored in the PICT2 file. When I display it using Apple's PICTViewer, the colors are subtley wrong. The image is obviously being displayed in the whatever the current colormap is set to. Not the colormap that I created for that file. Now the tech notes even talk about this, and I quote: "On the other hand, each CopyBits call that is made stores a complete copy of the color table into the picture." 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. Could someone at Apple please enlighten me? Tony Giaccone tonyg@cvs.rochester.edu