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
| Field | Type | Notes |
|---|---|---|
width | number | Pixel width. |
height | number | Pixel height. |
alphaType | AlphaType | Premultiplied / Unpremul / Opaque. |
colorType | ColorType | Pixel layout (RGBA_8888, RGBA_F16, …). |
See also
ImageInfo— same shape pluscolorSpace.Image.getImageInfo— returns this.