Path: utzoo!attcan!uunet!cs.utexas.edu!samsung!cg-atla!hildreth From: hildreth@cg-atla.agfa.com (Lon Hildreth) Newsgroups: comp.sys.mac.programmer Subject: Re: PICT hacking question Keywords: PICT Message-ID: <8993@cg-atla.agfa.com> Date: 2 Jul 90 18:31:34 GMT References: <1732@mountn.dec.com> Reply-To: hildreth@cg-atla.UUCP (Lon Hildreth) Organization: Agfa Compugraphic Division Lines: 24 In article <1732@mountn.dec.com> minow@bolt.enet.dec.com (Martin Minow) writes: >The original image was scanned at 300 dpi. When I look at the output >image (even without processing), it is clearly at a coarser resolution >(probably 72 dpi). > >Could anyone tell me how I get the actual image at its intended resolution >(both into my program and out to a new PICT file)? Inside-Mac and the >TechNotes stack don't seem to have anything relevant. > You need to put yourself in the StdBits bottleneck during playback. The hRes and vRes fields of the srcBits passed in contain the horizontal and vertical resolution of the image in dots per inch. They're Fixed point numbers, so you can call Fix2Long on them to get usable numbers. First, make sure that srcBits is a PixMap by checking the high bit of rowBytes. For creating a new PICT, make sure that the hRes and vRes fields of your source pixmap is set properly. Also, the dest rect of the CopyBits call should be at 72 dpi. -- Lon Hildreth ...!{decvax,uunet,samsung}!cg-atla!hildreth Agfa Compugraphic or hildreth@cg-atla.agfa.com Wilmington, MA A Cub fan, but not a Bud man.