Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!nosc!humu!uhccux!mikem From: mikem@uhccux.uhcc.hawaii.edu (Mike Morton) Newsgroups: comp.sys.mac.programmer Subject: Re: Dissolving BitMaps Keywords: BitMap Dissolve Message-ID: <2888@uhccux.uhcc.hawaii.edu> Date: 26 Dec 88 02:37:18 GMT References: <17619@vax5.CIT.CORNELL.EDU> Organization: University of Hawaii Lines: 36 In a recent article, wing (?) wrote: > Anybody know a fast way of dissolving one BitMap into another? (like > HyperCard) I remember coming across an assembly example but can't find it > in sumex. An example in C would be nicer. I also remember reading > something about this in Byte, but I can't seem to locate issue. Some years back, I wrote a subroutine called DissBits, patterned after CopyBits, which copies the bits from one bitmap to another in a pseudo- random order, giving the effect of the dissolve. It's written up in: "A Digital Dissolve for Bitmapped Graphics Screens," Dr. Dobb's Journal, November '86. or "DissBits: A subroutine to do 'dissolve' shots", MacTutor, December '85. The former article is much more complete, with diagrams and some C code which is usable on any machine. (To get real speed, you must use an assembler version, or copy more than one pixel at a time.) I mention the latter article only in case you don't have DDJ. Caveat: the subroutine works only with bitmaps, not pixmaps. I've heard many people discuss using "blending" to fade one picture to another on a color screen, but haven't seen it done. I believe that one could apply the DissBits approach to chunky color screens, and in 8-bit mode it could even run faster than in 1-bit. 2- and 4-bit would be a pain. The only source I have for the routine is in Lisa Assembler (remember TLASM? :-) If someone has one for the Mac, please feel free to post it if there's interest (semaphore with me first, to avoid multiple postings?). -- Mike Morton // P.O. Box 11378, Honolulu, HI 96828, (808) 676-6966 HST Internet: msm@ceta.ics.hawaii.edu (anagrams): Mr. Machine Tool; Ethical Mormon; Chosen Immortal; etc.