| Extracted from Pike v7.8 release 700 at 2013-06-08.

[Top]
Image
Image.ANY

# Method Image.ANY.decode()

Method decode

  `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" : string` | File type information as MIME type (ie "image/jpeg" or similar)
  `"image" : Image.Image` | the image object
  `alpha : int` | the alpha channel or 0 if N/A

Note

  Throws upon failure.