@dusrel/image API
    Preparing search index...

    Function encode

    @dusrel/image-png

    PNG codec via the Rust png crate (WASM, lazy-loaded). Separate encode/decode entries, each built from the same crate with a different cargo feature (see native/rust). Lossless: the encode options trade CPU and size, never pixels.

    • Encodes raw RGBA pixels (an ImageData) into lossless PNG bytes.

      Parameters

      Returns Promise<ArrayBuffer>