- draw bitmap image

Low-level graphics
(AFL 4.20)

SYNTAX GfxDrawImage( "filename", x, y )
FUNCTION The function draws bitmap image given in file. Top left corner of the image is specified by x, y. Currently GfxDrawImage supports BMP and PNG files.

Per-pixel transparency (alpha channel) is supported ONLY for 32-bit PNG files. PNG files with 32-bit depth are rendered with AlphaBlend which is not be available on oldest systems (Win95). BMP files PNG files of lower depths are rendered without transparency using BitBlt (fast and always available)

Loading and drawing BMP files is much faster than PNG (as much as 10 times faster), approx load and rendering time is 0.3 ms for BMP, 3 ms for PNG (alphablended). Timings that you get from Code check and profile are misleading for Gfx functions because they don't include actual on-screen rendering.

EXAMPLE GfxDrawImage( "wizard.bmp", 100, 0 ); // bitmap - fast
GfxDrawImage( "logo.png", 30, 30 ); // png - supports per-pixel alpha channel / transparency


The GfxDrawImage function is used in the following formulas in AFL on-line library:

More information:

Updated on-line reference