Libraries
PBM Source Code
 previous   up   next 

Function Summary
PRIMITIVE_WINDOW
readPbm (inout file: pbmFile)
Reads a PBM (portable bitmap) image file into a pixmap.
PRIMITIVE_WINDOW
readPbm (in string: pbmFileName)
Reads a PBM file with the given pbmFileName into a pixmap.
string
str (in PRIMITIVE_WINDOW: pixmap, PBM)
Converts a pixmap into a string in PBM format.
void
writePbm (in string: pbmFileName, in PRIMITIVE_WINDOW: pixmap)
Writes the pixmap to the file with the given pbmFileName in PBM format.

Function Detail

readPbm

const func PRIMITIVE_WINDOW: readPbm (inout file: pbmFile)

Reads a PBM (portable bitmap) image file into a pixmap.

Parameters:
pbmFile - File that contains a PBM image.
Returns:
A pixmap with the PBM image, or PRIMITIVE_WINDOW.value if the file does not contain a PBM magic number.
Raises:
RANGE_ERROR - The file is not in the PBM file format.

readPbm

const func PRIMITIVE_WINDOW: readPbm (in string: pbmFileName)

Reads a PBM file with the given pbmFileName into a pixmap.

Parameters:
pbmFileName - Name of the PBM file.
Returns:
A pixmap with the PBM image, or PRIMITIVE_WINDOW.value if the file cannot be opened or does not contain a PBM magic number.
Raises:
RANGE_ERROR - The file is not in the PBM file format.

str

const func string: str (in PRIMITIVE_WINDOW: pixmap, PBM)

Converts a pixmap into a string in PBM format.

Parameters:
pixmap - Pixmap to be converted.
Returns:
A string with data in PBM format.

writePbm

const proc: writePbm (in string: pbmFileName, in PRIMITIVE_WINDOW: pixmap)

Writes the pixmap to the file with the given pbmFileName in PBM format.

Parameters:
pbmFileName - Name of the PBM file to be created.
pixmap - The pixmap to be written in PBM format.


 previous   up   next