read_bitmap

Definition: object x = read_bitmap(string st)
Description: Deprecated. Most graphics are now 24 or 32 bit which this routine does not support. However, as long as 256 colours (8-bit) or less is acceptable, this routine remains perfectly useable, and may still be the right choice for simple cross-platform applications.

st is the name of a .bmp "bitmap" file. The file should be in the bitmap format. Only low-res uncompressed variations of the format are supported. If the file is read successfully the result will be a 2-element sequence. The first element is the palette, containing intensity values in the range 0 to 255. The second element is a 2-d sequence of sequences containing a pixel-graphics image.

Bitmaps of 2, 4, 16 or 256 colors are supported. If the file is not in a good format, an integer error code is returned instead:
    global constant BMP_SUCCESS = 0,
                BMP_OPEN_FAILED = 1,
             BMP_UNEXPECTED_EOF = 2,
         BMP_UNSUPPORTED_FORMAT = 3
Comments: You can create your own bitmap picture files using Windows Paintbrush and many other graphics programs. You can then incorporate these pictures into your phix programs.
Example:
x = read_bitmap("c:\\windows\\arcade.bmp")
-- note: double backslash needed to get single backslash in
-- a string
Example Program: demo\dos32\bitmap.ex
See Also: save_bitmap