CreateCanvasFromRawBlob (open)

Create a canvas from raw image data

Syntax

LOADLIB "wh::graphics/canvas.whlib";

OBJECT FUNCTION CreateCanvasFromRawBlob(BLOB infile, RECORD inputformat)

Parameters

BLOB infile

Data to read

RECORD inputformat
INTEGER height

Input height

STRING pixelformat

Pixelformat (currently RGBA anD ARGB are supported)

BOOLEAN premultiplied

If true, expect the input to have its color channels premultiplied with the alpha channel, and undo that

INTEGER width

Input width

Return value

OBJECT