PureJsImage · JPEG XL

JPEG XL encoder and decoder

Open JPEG XL, JPEG, PNG or TIFF. Encode supported native integer pixels, compare decoded output, or resize and export a display image.

These tools use the current repository build. Repository functionality may be newer than the npm release. Static lossy encoding is qualified; lossy animation remains Experimental.

Interactive workbench

Encode pixels, inspect JPEG XL, or transcode JPEG

Loading a deterministic JPEG sample…

Source

Decoded preview

Result summary

Status
Waiting
Inspection and execution evidence
Waiting for local inspection.

Browser API

import { createImageLibrary } from 'purejsimage/browser'
import { pngCodec } from 'purejsimage/codecs/png'
import { jpegxlCodec } from 'purejsimage/codecs/jpegxl'
const images = createImageLibrary([pngCodec, jpegxlCodec])
const image = await images.open(file)
const bytes = await image.jpegxl({mode: 'lossless', effort: 1}).toUint8Array()

Color JPEG: 320 × 240 four-color pattern from web-platform-tests contributors, generated with Squoosh MozJPEG (BSD 3-Clause). Grayscale JPEG and transparent PNG: generated repository fixtures (MIT). WPT license. No camera or personal data.