ygxj@vax5.CIT.CORNELL.EDU (12/26/88)
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. wing ygxj@vax5.cit.cornell.edu ygxj@cornella.bitnet
mikem@uhccux.uhcc.hawaii.edu (Mike Morton) (12/26/88)
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.