Creates an image of the specified pixel size; fills with a color or copies RGBA8 bytes, defaulting to black.
sizecolorOrPixelsOptionalWritable extension; old views retain old images after resize or load.
Copies sourceRect (the entire source by default) to dest; applyAlpha enables alpha blending. Returns whether it succeeded.
sourcedestsourceRectOptionalapplyAlphaSets the alpha of pixels exactly matching color to alpha (default 0), preserving RGB.
coloralphaFlips pixels horizontally in place.
Flips pixels vertically in place.
Empty images have no pixel pointer. Constness is enforced by TypeScript.
Reads and decodes an image file asynchronously, replacing pixel storage on success; returns whether it succeeded.
filenameDecodes encoded image bytes such as PNG/JPEG asynchronously and returns whether it succeeded.
dataDecodes an image asynchronously from a seekable input stream; stream errors reject the Promise.
streamRebuilds pixel storage and fills with a color or copies RGBA8 data; previous pixels views retain the old storage.
sizecolorOrPixelsEncodes and saves an image asynchronously using the file extension; returns whether it succeeded.
filenameEncodes asynchronously to format (such as png) and returns bytes; returns undefined if encoding fails.
formatCopies a color into the specified pixel; throws RangeError for out-of-bounds coordinates.
coordscolor
Native-owned RGBA8 pixels with asynchronous file and codec operations.