z80:Directives:INCBMP

From Learn @ Cemetech
Jump to: navigation, search

Loads a monochrome bitmap (BMP, PNG, GIF, JPEG) and include it directly into the program.

Syntax

   ;Load test.gif;
   ; force width to 32 and apply RLE.
   .incbmp "test.gif", rle, width = 32

Uses

The bitmap is padded with 0s to make it a multiple of 8 bits wide, and a 1 corresponds to a black pixel.

Any pixel darker than the threshold (defaults to 127) is considered black, any pixel brighter is white.

Specifying the flag RLE compresses the data after conversion.

Using the width/height flags forces the bitmap data to a particular size; note that the image is not scaled or repositioned in any way (merely aligned top-left and cropped to the final size).

See Also

incbin inctext