Path: utzoo!mnetor!uunet!husc6!mailrus!ames!pasteur!ucbvax!decwrl!labrea!polya!kaufman From: kaufman@polya.STANFORD.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Spooling a PICT2 Message-ID: <2788@polya.STANFORD.EDU> Date: 9 May 88 15:36:38 GMT References: <2620@thorin.cs.unc.edu> Reply-To: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Organization: Stanford University Lines: 22 In article <2620@thorin.cs.unc.edu> steele@unc.UUCP (Oliver Steele) writes: >I need to save a color bitmap as a PICT file. Here's what I've tried: [trials deleted] > (LSC bug: a CGrafPort's grafProcs is defined as a QDProcsPtr >instead of a CQDProcsPtr.) This is because the first routines in a CQDProcs list are identical to the routines in a QDProcs list, and if you are only going to change, e.g. TextProc, you don't have to check the Graf type or Ptr type (Apple seems to do this lots of places, not just here). To get back to the original problem: Why not open a NEW CGrafPort, with NO storage for the PixMap (portRect = (0,0,0,0)), and spool to that. It works, and gains back the space you had allocated to the PixMap. I think that if this is an Offscreen GrafPort, the color table will be saved to the spool file, since it is not the same as the source color table (you may have to twiddle the CLUT ctSeed in the Offscreen port to convince QuickDraw this is the case). Marc Kaufman (kaufman@polya.stanford.edu)