Version 2 of Creating a new Image Type - An Example

Updated 2002-06-03 13:56:12

I needed some high performance image type for Windows which supports transparency. I achieved up to 100 fps on my Pentium III/500 using device independant bitmaps (DIB's) and the BitBlt() API function.

Here is the source code:

For each image there are two bitmaps, one palettized 8 color image (there is space for 256 colors but only the first eight entries are defined). And a 32 bits per pixel RGB bitmap. For the formar bitmap the colors are defined as follows:

 0 black (#000)
 1 red (#F00)  
 2 green (#0F0)
 3 yellow (#FF0)
 4 blue (#00F)
 5 magenta (#F0F)
 6 cyan (#0FF)
 7 white (#FFF)

questions/comments: mailto:[email protected]