This small function allows you to add an alpha channel (mask) to the specified GDI+ bitmap (see screenshots). Source bitmap and mask may be of any color depth. The output bitmap is always 32 bits-per-pixel with alpha channel. Optionally, the alpha channel may be generated from any channel of the specified mask (1 - Red, 2 - Green, 3 - Blue, or 0 - Alpha). The example below is written for Autoit 3.3.12.0. #Include <GDIPlus.au3>
If StringRegExpReplace(@AutoItVersion, '(?<!\d)(\d)(