@dusrel/image API
    Preparing search index...

    Function encode

    @dusrel/image-jpeg

    MozJPEG codec (WASM, lazy-loaded). Separate encode/decode entries. The WASM artifacts live in this package's codec/ folder and are built reproducibly from mozilla/mozjpeg v4.1.5 (see native/mozjpeg).

    • Encodes raw RGBA pixels (an ImageData) into a JPEG byte buffer with the MozJPEG encoder.

      Parameters

      Returns Promise<ArrayBuffer>