@dusrel/image API
    Preparing search index...

    Function encode

    @dusrel/image-qoi

    QOI ("Quite OK Image") codec via the Rust qoi crate (WASM, lazy-loaded). Separate encode/decode entries, each built from the same crate with a different cargo feature (see native/rust). Lossless, extremely fast, tiny modules — a niche format for pipelines that control both ends.

    • Encodes raw RGBA pixels (an ImageData) into QOI bytes. QOI is lossless and has no quality knobs: the header is written with 4 channels and the sRGB colorspace tag (the tag is informative only — it never changes pixels). Wrap the result in a Blob with type "image/qoi" if you need one.

      Parameters

      • data: ImageData

      Returns Promise<Uint8Array<ArrayBufferLike>>