Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!portal!sv!daven From: daven@svc.portal.com Newsgroups: comp.sys.mac.programmer Subject: Re: distort bitmaps ... Message-ID: <1990Dec14.194201.2001@svc.portal.com> Date: 14 Dec 90 19:42:01 GMT References: <12279@hacgate.UUCP> Organization: Software Ventures 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. > > Does anyone know some short algorithms to do this? > Yes, it's called "CopyBits". It takes as part of it's parameters the rectangle that surrounds the bits to be copied, and a rectangle that surrounds the destination. If the destination rectangle is larger than the source rectangle it will "scale" your image to fit the destination - probably what you want. It will also shrink an image if the destination rectangle is smaller than the source's. -- ------------------------------------------------------------------------------- Dave Newman | daven@svc.portal.com | AppleLink: D0025 Sofware Ventures Corp. | AOL: MicroPhone | CIS: 76004,2161 Berkeley, CA 94705 | WELL: tinman@well.sf.ca.us | (415) 644-3232