SDK JS
    Preparing search index...

    Interface WebpImageData

    A decoded WebP image: RGBA8 pixels plus dimensions, as returned by WebpDecoder.decode.

    interface WebpImageData {
        hasAlpha: boolean;
        height: number;
        rgba: Uint8Array;
        width: number;
    }
    Index

    Properties

    hasAlpha: boolean

    true when the source WebP carried an alpha channel.

    height: number

    Image height in pixels.

    rgba: Uint8Array

    Decoded pixels as 8-bit RGBA, one byte per channel (R,G,B,A), row-major from the top-left. Length is exactly width * height * 4 bytes. Ready to wrap in an ImageData or upload as a WebGL/WebGPU texture. Alpha is always present in this buffer; when WebpImageData.hasAlpha is false every alpha byte is 255.

    width: number

    Image width in pixels.