Previous section To contents Next section

12.9 Image.ANY

DESCRIPTION
This method calls the other decoding methods and has some heuristics for what type of image this is.

Methods: decode, decode_alpha, _decode

SEE ALSO
Image

METHOD
Image.ANY._decode,
Image.ANY.decode,
Image.ANY.decode_alpha

SYNTAX
mapping _decode(string data)
object decode(string data)
object decode_alpha(string data)

DESCRIPTION
Tries heuristics to find the correct method of decoding the data, then calls that method.

The result of _decode() is a mapping that contains

"type":image data type (ie, "image/jpeg" or similar)
"image":the image object,
"alpha":the alpha channel or 0 if N/A

NOTE
Throws upon failure.

Previous section To contents Next section