Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: distort bitmaps ... Message-ID: <22211@well.sf.ca.us> Date: 17 Dec 90 07:03:14 GMT References: <12279@hacgate.UUCP> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 22 In article <12279@hacgate.UUCP> waung@rscene.hac.com (Franklin Waung) writes: > I have a bit map of say 80 by 100 pixels 1 bit deep (black or white), >and I want to expand the image on the bitmap to say 120 by 150 pixels. Copybits has this kind of distortion built in. example: Rect src, dest; SetRect(&src, 0, 0, 80, 100); SetRect(&dest, 0, 0, 120, 150); CopyBits(&thePort->portBits, &thePort->portBits, &src, &dest, srcCopy, NIL); If you are running on a macine with color quickdraw, and you have 32-bit color quickdraw installed either becasue it is a CI or newer, or because you re running a new enough system or because you have the 32-bit Color quickdraw file in your system folder, then CopyBits has a new transfer mode, srcCopyDithered, that does much better interpolation when stretching bitmaps, particularly gray-scale pixmaps. -- -- David Phillip Oster - At least the government doesn't make death worse. -- oster@well.sf.ca.us = {backbone}!well!oster