# 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, this routine may be required to run legacy code, as part of porting to newer methods, perhaps. 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
pwa/p2js: | Not supported
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`)
Implementation: | See builtins\image.e (an autoinclude) for details of the actual implementation.
See Also: | save_bitmap