Class Encoder

Constructors

Properties

Accessors

Methods

Constructors

  • Create a new encoder.

    Parameters

    • width: number
    • height: number
    • Optionalpalette: null | Uint8Array<ArrayBufferLike>

    Returns Encoder

Properties

height: number

The gif height.

width: number

The gif width.

Accessors

  • get palette(): null | Uint8Array<ArrayBufferLike>

    The global color palette.

    Returns null | Uint8Array<ArrayBufferLike>

Methods

  • Add a frame to the gif.

    • The size of buffer should match the expected size based on width, height.

    Parameters

    Returns void

  • Returns the gif buffer.

    Returns Uint8Array

  • Sets the repeat count for the gif. If the value is -1, the gif will repeat infinitely; otherwise, the gif will repeat a value number of times.

    Parameters

    • value: number

    Returns void