Documented memory classes
JPEG MCU rows, PNG scanlines, TIFF strips, and experimental HEIF tiles use bounded paths where implemented. Full-frame fallbacks are identified and benchmarked separately.
First-party codec suite · zero runtime dependencies
PureJsImage builds portable first-party codecs around one shared image and raster pipeline for Node.js and modern browsers. Checked capability contracts, conformance corpora, bounded execution, and optional acceleration let each codec deepen without replacing the reference engine.
npm install purejsimageValidated seven-engine competitor profile
The August 10 profile compares default PureJsImage and its explicitly registered JPEG/PNG WASM accelerators with five other engines on the same pinned inputs and validated outputs. Every engine runs in isolation with its public defaults; quality is measured separately against an independently decoded exact-area reference. Sharp uses native libvips; PureJsImage WASM and jSquash use WebAssembly; default PureJsImage is compiled from strict TypeScript, while Jimp and image-js use JavaScript.
Reference-engine evidence · baseline JPEG
The first-party baseline JPEG path demonstrates the larger memory model: it retains one MCU row, pushes crop and resize toward decode, and releases source rows when they can no longer affect the output.
Implementation constraints
JPEG MCU rows, PNG scanlines, TIFF strips, and experimental HEIF tiles use bounded paths where implemented. Full-frame fallbacks are identified and benchmarked separately.
Dimensions, allocation budgets, box extents, truncation, and entropy reads are checked before allocation or indexing.
The default codecs require no native addons, WASM, GPU backend, external binaries, or runtime dependencies. Shipped JPEG and PNG WASM accelerators use separate explicit imports; future accelerators follow the same contract.
The acceleration roadmap defines how large jobs may progressively use optional WASM or WebGPU providers without changing the default package or output semantics.
Shared raster engine · measured TIFF depth
TIFF demonstrates how the same codec architecture serves ordinary conversion and specialized raster workloads. Capability cells follow upstream documentation or source; a separate 106-fixture RGBA comparison reports decode coverage, exact output, scientific rasters, and malformed inputs.
| Library | Browser | BigTIFF | Tiles | Region | Scientific raster | OME / WSI | Decode coverage |
|---|---|---|---|---|---|---|---|
| PureJsImagebenchmark snapshot · a1f20da · Strict TypeScript | Yes | Yes | Yes | Yes | Yes | Yes | 104/106 decoded57 exact2 oracle failures |
| GeoTIFF.js3.0.5 · Pure JavaScript | Yes | Partial | Yes | Yes | Yes | No | 84/106 decoded32 exact11 unsupported · 7 errors · 2 oracle failures · 2 crashes |
| UTIF.js (utif2)4.1.0 · Pure JavaScript | Yes | No | Yes | No | Partial | No | 74/106 decoded49 exact28 errors · 2 oracle failures · 2 timeouts · 3 crashes |
| image-js/tiff7.1.3 · Pure JavaScript | Yes | No | Yes | No | Yes | No | 41/106 decoded27 exact51 unsupported · 12 errors · 2 oracle failures |
| image-js1.7.0 · Pure JavaScript | Yes | No | Yes | No | Partial | No | 39/106 decoded33 exact51 unsupported · 14 errors · 2 oracle failures |
| Jimp1.6.0 · Pure JavaScript | Yes | No | Yes | No | No | No | 74/106 decoded49 exact28 errors · 2 oracle failures · 2 timeouts · 3 crashes |
| Sharp / libvips0.35.3 · Native wrapper | No | Partial | Yes | Partial | Partial | No | Not run |
Measured 2026-08-10 with v24.16.0 on linux/x64. Methodology, caveats, versions, and evidence.
Usage
The root API does not load codec implementations automatically.