canvaskit-wasm 0.39 build 2026-04-29

PartialImageInfo

A plain JS object describing image dimensions and pixel format, without a color space. Returned by Image.getImageInfo. Use ImageInfo when a color space is also needed (most surface / image creation paths).

const info = image.getImageInfo();
// { width, height, alphaType, colorType }

Fields

FieldTypeNotes
widthnumberPixel width.
heightnumberPixel height.
alphaTypeAlphaTypePremultiplied / Unpremul / Opaque.
colorTypeColorTypePixel layout (RGBA_8888, RGBA_F16, …).

See also