plate-engine - v0.1.0
    Preparing search index...

    Function encodeIndexedPNG

    • Encode tone indices with their palette as a palette-indexed PNG, at the smallest bit depth that fits (1 bit for 2 colours, 2 for 4, 4 for 16).

      Parameters

      • indices: Uint8Array
      • width: number
      • height: number
      • palette: Palette

      Returns Promise<Uint8Array<ArrayBufferLike>>