Functions for creating image objects.

Static methods

staticload(buffer:String, ?premult:Bool):Null<ImageLoadResult>

Load image (PNG or JPEG) from buffer.

Parameters:

buffer

image data buffer

premult

premultiply alpha. optional and defaults to false

Returns:

object with the following fields: width, height, type and buffer (raw data). nil is returned if loading fails.