PureJsImage · JPEG XL
Exact JPEG recompression
Transfer eligible grayscale or color JPEG coefficients to JPEG XL and reconstruct the original JPEG bytes.
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…
Decoded preview
Result summary
- Status
- Waiting
Inspection and execution evidence
Waiting for local inspection.
Browser API
import { transcodeJpegToJpegXl, reconstructJpegFromJpegXl } from 'purejsimage/jpegxl'
const bytes = new Uint8Array(await file.arrayBuffer())
const jxl = await transcodeJpegToJpegXl(bytes, {reconstruction: 'required', onlyIfSmaller: false})
const original = await reconstructJpegFromJpegXl(jxl.data)
// Exact mode verifies every original byte before succeeding.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.