Previous section To contents Next section

12.21 Image.XBM

DESCRIPTION

METHOD
Image.XBM.decode

SYNTAX
object decode(string data)

DESCRIPTION
Decodes a XBM image.

NOTE
Throws upon error in data.

METHOD
Image.XBM.encode

SYNTAX
string encode(object image)
string encode(object image,  mapping options)

DESCRIPTION
Encodes a XBM image.

The options argument may be a mapping containing zero or more encoding options.

normal options:
"name":"xbm_image_name"
The name of the XBM. Defaults to 'image'

METHOD
Image.XBM._decode

SYNTAX
object _decode(string data)
object _decode(string data,  mapping options)

DESCRIPTION
Decodes a XBM image to a mapping.

Supported options:
([
"fg":({fgcolor}),    // Foreground color. Default black
"bg":({bgcolor}),    // Background color. Default white
"invert":1,          // Invert the mask
])

NOTE
Throws upon error in data.

Previous section To contents Next section