Hi !
I'd like to do the following, but i'm kinda clueless:
Imagine a BMP which after a second or two of showing starts fading away pixel by pixel...
As if the pixels that conform the BMP would 'unpaint' themselves in a random fashion..some sort of 'desintegration'..hehe :)
Since my graphics coding knowledge is close to NULL, any poiter is appreciated :)

Thanks in advace.

Posted on 2001-09-10 09:59:01 by latigo
The simplest thing is to have an image of what you want to show behind the fading bitmap in memory and randomly paint this onto the bitmap when you want it to disappear.

If its a big bitmap the best way to ensure that no lone pixels are missed is to not simply spread the random selection across the whole bitmap but rather to select a random point inside a 64*64 box (or smaller) and tile this pattern across the bitmap.

I'm not sure if thats clear, its hard to describe in words.
Posted on 2001-09-10 10:37:19 by Eóin
I used to do something like your asking in Qbasic.
I would check a pixel at random and if it were set i would store the color value and coordinates to a file then set the pixel to off.

Then i could use the file to write the pixels to the screen and the picture would fade in quite nicely. You could use the same file to fade it out also using just the coordinate members. Making the file might take some time since if its checking pixels at random there would be more time consumption as fewer and fewer pixels remained. I believe it took about 3 hrs for my pic which was nearly the size of the screen. I've never made a file with Masm so don't ask.

Actually a better way might be to unset every second third or fourth pixel. Like if the bitmap is 100 wide unset 50 then 25 then 75 then 12 then 30 on each line...you know what i mean

Posted on 2001-09-10 11:30:41 by titan