Pixel Data JS - v0.28.0
    Preparing search index...

    Interface IndexedImage

    Represents an image using a palette-based indexing system. Instead of storing 4 bytes (RGBA) per pixel, this class stores a single index into a color palette. This format is optimized for memory efficiency and high-speed pattern matching or recoloring operations.

    interface IndexedImage {
        data: Uint32Array;
        h: number;
        palette: Uint32Array;
        transparentPalletIndex: number;
        w: number;
    }
    Index

    Properties

    data: Uint32Array

    Flat array of palette indices. Index = x + (y * width).

    h: number

    The height of the image in pixels.

    palette: Uint32Array

    The palette of unique 32-bit colors (ABGR/RGBA packed) found in the image.

    transparentPalletIndex: number

    The specific index in the palette reserved for fully transparent pixels.

    w: number

    The width of the image in pixels.