Libraries
PPM Source Code
 previous   up   next 

Function Summary
PRIMITIVE_WINDOW
readPpm (inout file: ppmFile)
Reads a PPM file into a pixmap.
PRIMITIVE_WINDOW
readPpm (in string: ppmFileName)
Reads a PPM file with the given ppmFileName into a pixmap.
string
str (in PRIMITIVE_WINDOW: pixmap, PPM)
Converts a pixmap into a string in PPM format.

Function Detail

readPpm

const func PRIMITIVE_WINDOW: readPpm (inout file: ppmFile)

Reads a PPM file into a pixmap.

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

readPpm

const func PRIMITIVE_WINDOW: readPpm (in string: ppmFileName)

Reads a PPM file with the given ppmFileName into a pixmap.

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

str

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

Converts a pixmap into a string in PPM format.

Parameters:
pixmap - Pixmap to be converted.
Returns:
a string with data in PPM format.


 previous   up   next