readBmp
const func PRIMITIVE_WINDOW: readBmp (inout file: bmpFile)
-
Reads a BMP file into a pixmap.
- Parameters:
- bmpFile - File that contains a BMP image.
- Returns:
- A pixmap with the BMP image, or PRIMITIVE_WINDOW.value if the file does not contain a BMP magic number.
- Raises:
- RANGE_ERROR - The file is not in the BMP file format.
readBmp
const func PRIMITIVE_WINDOW: readBmp (in string: bmpFileName)
-
Reads a BMP file with the given bmpFileName into a pixmap.
- Parameters:
- bmpFileName - Name of the BMP file.
- Returns:
- A pixmap with the BMP image, or PRIMITIVE_WINDOW.value if the file cannot be opened or does not contain a BMP magic number.
- Raises:
- RANGE_ERROR - The file is not in the BMP file format.
str
const func string: str (in PRIMITIVE_WINDOW: pixmap, BMP)
-
Converts a pixmap into a string in BMP format.
- Parameters:
- pixmap - Pixmap to be converted.
- Returns:
- A string with data in BMP format.
writeBmp
const proc: writeBmp (in string: bmpFileName, in PRIMITIVE_WINDOW: pixmap)
-
Writes the pixmap to the file with the given bmpFileName in BMP format.
- Parameters:
- bmpFileName - Name of the BMP file to be created.
- pixmap - The pixmap to be written in BMP format.