Libraries
PNG Source Code
 previous   up   next 

Function Summary
PRIMITIVE_WINDOW
readPng (inout file: pngFile)
Reads a PNG file into a pixmap.
PRIMITIVE_WINDOW
readPng (in string: pngFileName)
Reads a PNG file with the given pngFileName into a pixmap.
string
str (in PRIMITIVE_WINDOW: pixmap, PNG)
Converts a pixmap into a string in PNG format.

Function Detail

readPng

const func PRIMITIVE_WINDOW: readPng (inout file: pngFile)

Reads a PNG file into a pixmap.

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

readPng

const func PRIMITIVE_WINDOW: readPng (in string: pngFileName)

Reads a PNG file with the given pngFileName into a pixmap.

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

str

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

Converts a pixmap into a string in PNG format.

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


 previous   up   next