|
||
|
Alpha Image CreatorA handy utility for creating Windows DIBs with pre-multiplied alpha. As described in the Alpha DIBSection article, if you want to draw an image which has per-pixel-alpha using the AlphaBlend call, then you need a bitmap with an alpha channel and R,G,B components which have been pre-multiplied. These bitmaps are hard to come across in the wild, hence this utility to assist with creating them. About The UtilityThe utility is very simple: there are two slots; one to load the source image and the other a bitmap representing the alpha channel to apply. The alpha value is taken from the red component of the bitmap: use a grey-scale image for the alpha bitmap for the most predictable results. Once both images are loaded, a new alpha image will be created automatically from the intersecting areas. Where the alpha bitmap is black, the result will be completely transparent, whereas where it is white it will be completely opaque. Grey shades in between result in translucent pixels. The image creator portion of this utility is provided as a DLL. This allows you to use the alpha bitmap functionality (for example) as part of an ASP installation where you could dynamically create alpha-blended images. Note the DLL has no dependencies except on VB6 run-times; the front-end uses a Win32 Scroll Bar library that relies on SSubTmr6.DLL. The code will compile under VB5 if you need it to as well.
|
|
|