NiimBlueLib Docs
    Preparing search index...

    Class ImageEncoder

    Currently ImageEncode color modes:

    PageColorType.Grayscale:

    • White (0xffffff) - background
    • Black (0x000000) - dot

    PageColorType.DoubleColor:

    • White (0xffffff) - background
    • Black (0x000000) - dot
    • Red (0xff0000) - second color dot (lower temperature)

    PageColorType.Grayscale:

    • 16-level grayscale mode. Pixel colors are converted to luminance and packed as two 4-bit dots per byte (0 = white, 15 = black).
    Index

    Constructors

    Methods

    • Convert a 0xRRGGBB color to a 4-bit grayscale level. 0 is white and 15 is black.

      Parameters

      • color: number

      Returns number

    • Parameters

      • data: Uint8Array

        Pixels encoded by encodeCanvas (byte is 8 pixels)

      Returns Uint8Array

      Array of indexes where every index stored in two bytes (big endian)