Applies in-place, ordered dithering using provided dither matrix (or matrix size) and desired number of dither levels, optionally specified individually (per channel). Each channel is be processed independently. Channels can be excluded from dithering by setting their target colors to zero or negative numbers.
dither matrix/size
num target colors/steps
Flips image vertically.
Returns pixel value at given position. If pos is outside the defined region, returns a suitable zero value.
Returns scaled version of this buffer using given sampler or filter (default: "linear"
) for interpolation. Syntax sugar for PackedBuffer.resize.
Returns the contents of the pixel buffer as HTML canvas ImageData
.
Creates a new pixel buffer from given HTML image element with optional support for format conversion (default: ABGR8888 & resizing.
Generated using TypeDoc
Converts and blits pixels into given canvas (or canvas context) at position
x
,y
(0,0 by default). If canvas is smaller than source buffer, only the top-left region will be written.