CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fading Bitmaps
Here's how we do it:
1) Get a DIB of the destination bitmap using GetDIBits
2) Re-map any references in the DIB to the 20 standard system colors
3) Using AnimatePalette, fade the source bitmap to black
4) Change the palette in the destination DIB to be an "identity palette".
Check out DIB_PAL_COLORS for dibs. Usually, you just remap the bmiColors
of the DIB to be 0-255, but it depends on what your desination palette
looks like.
5) Using StretchDIBits (or whatever) and DIB_PAL_COLORS, copy the dest
DIB to the (now black) screen. Because of the identity palette, Windows
won't remap your colors.
6) Use AnimatePalette to go from black to your new palette.
+===================================================+
| Jonathan Arnold (mailto:jdarnold@world.std.com) |
| Programmer Roger Wagner Publishing |
| http://world.std.com/~jdarnold |
+===================================================+
W Komornicki's Home Page |
Main Index |
Thread Index