bmap_to_alpha (BMAP*, var percent);

Generates an alpha transparency channel for the given bitmap, by multiplying the pixel brightness with a percent factor (-100..100).

Parameters:

BMAP* BMAP* pointer to be converted. The bitmap must be in a 16-bit or 24-bit RGB format, and is converted to the 4444 or 8888 format. Modifications to the bitmap are lost.
percent Factor of the alpha-map in percent (-100..100), or 0 for creating overlay transparency on a one-bit alpha channel. Negative percent factors produce an inverse alpha map. Useful percent values are in the range of 10..100.

Modifies:

BMAP*

Speed:

Slow

Example:

bmap_to_alpha(bmap_for_entity(my,1),15);

See also:

alpha, TRANSPARENT, BRIGHT ► latest version online