Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!gatech!ncsuvx!ecemwl!jnh From: jnh@ecemwl.ncsu.edu (Joseph N. Hall) Newsgroups: comp.sys.mac.programmer Subject: Re: Rotating Bit Images. Keywords: Bitmaps Message-ID: <3736@ncsuvx.ncsu.edu> Date: 23 Aug 89 15:11:15 GMT References: <1495@unocss.UUCP> Sender: news@ncsuvx.ncsu.edu Reply-To: jnh@ecemwl.UUCP (Joseph N. Hall) Organization: North Carolina State University Lines: 18 In article <1495@unocss.UUCP> ft035@unocss.UUCP (ft035) writes: >I am trying to rotate some bit images and was wondering if anyone >has any routines already written to do this. This would be preferable to >writing 4 different images (all rotations) of the same object. Since some >of these images are large I'd rather not. There is an elegant algorithm for 90-degree rotations that is fast and efficient. The simplest version requires that your source pattern be both square and a power of two bits along each side. You can read about it in "Smalltalk-80: The Language," by Adele Goldberg et al. It's fairly well known, too, so there may be someone on the net who has an adequate implementation of it on the Mac. (It's used for all of the 90-degree rotations in the early Mac programs.) v v sssss|| joseph hall || 4116 Brewster Drive v v s s || jnh@ecemwl.ncsu.edu (Internet) || Raleigh, NC 27606 v sss || SP Software/CAD Tool Developer, Mac Hacker and Keyboardist -----------|| Disclaimer: NCSU may not share my views, but is welcome to.