by Carles P.V. (53 Submissions)
Category: Graphics
Compatability: VB Script
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (29 Votes)
A little module: AlphaBlt() and AlphaBlend() functions will let you render 32-bit-alpha bitmaps onto a given DC. Use first one (faster) when rendering onto solid-color surfaces. Use second one for a complete emulation of API's AlphaBlend. // W9x and WNT systems compatible, I hope. // ~115Kb. __________________________________________________
Update #1. Added cDIB32 class (simplified version accepting only 32-bit DIB sections). Useful in case loading a resource bitmap. All properties have been preserved to allow create/edit custom alpha DIBs. Thanks go to redbird77 for the new CreateFromResourceBitmap() function. Note: compile first if you want to test this function! (also you'll get about 10 times faster results).
__________________________________________________
Update #2. Added a mini-tool to export 32-bit bitmaps from icon/cursor resources (XP format). __________________________________________________ Update #3 (2005.05.03). Speed up: checked special alpha values (full opaque and full transparent).
Download API's AlphaBlend emulation (113 KB)