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.
Free and open source · zero runtime dependencies
PureJsImage combines portable image codecs and native scientific raster processing in one strict TypeScript engine for Node.js and modern browsers. Bounded rows and tiles reduce memory pressure where formats permit it, while the same API runs across servers, browsers, serverless, edge, and restricted deployments.
Use each info button for the source, workflow, and measurement details.
npm install purejsimageWeb codec benchmarks
The 2026-08-24 profile compares default PureJsImage and its explicit JPEG, PNG, and WebP WASM accelerators with Jimp, Sharp, Sharp single-thread, image-js, and jSquash on the same inputs. Each engine runs in isolation and every displayed output is validated before timing is admitted.
JPEGPNGWebPTIFFAVIF
Choose a web codec benchmark chart
Median wall time · logarithmic scale · lower is better
Scroll chart horizontally
Premultiplied-RGBA PSNR · higher is better
Scroll chart horizontally
Median peak RSS · lower is better
Scroll chart horizontally
Built with PureJsImage
The first app built on the scientific platform: a local-first browser workbench for electron microscopy files. It is still in progress.
One scientific application
Whole-slide pathology is one example: the browser reads the original Aperio SVS pyramid through HTTP Range and decodes only the visible tiles.

Low-memory JPEG demo
The 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.
Scientific and instrument imagery
This table covers TIFF, OME microscopy, whole-slide pathology, and geospatial rasters. It separates documented features from a 106-file test of decode coverage and output.
The main columns on a phone. The full TIFF table is still on this page below.
Strict TypeScript
Pure JavaScript
Pure JavaScript
Pure JavaScript
Pure JavaScript
Pure JavaScript
Native wrapper
Scroll table horizontally
| Library | Browser | BigTIFF | Tiles | Region | Scientific raster | OME / WSI | Decode coverage |
|---|---|---|---|---|---|---|---|
| PureJsImagebenchmark snapshot · 3be4530 · Strict TypeScript | Yes | Yes | Yes | Yes | Yes | Yes | 104/106 decoded57 exact · 47 pixel mismatches2 oracle-unavailable cases |
| GeoTIFF.js3.0.5 · Pure JavaScript | Yes | Partial | Yes | Yes | Yes | No | 84/106 decoded32 exact · 52 pixel mismatches11 unsupported · 7 errors · 2 oracle-unavailable cases · 2 crashes |
| UTIF.js (utif2)4.1.0 · Pure JavaScript | Yes | No | Yes | No | Partial | No | 74/106 decoded49 exact · 25 pixel mismatches28 errors · 2 oracle-unavailable cases · 2 timeouts · 3 crashes |
| image-js/tiff7.1.3 · Pure JavaScript | Yes | No | Yes | No | Yes | No | 41/106 decoded27 exact · 14 pixel mismatches51 unsupported · 12 errors · 2 oracle-unavailable cases |
| image-js1.7.0 · Pure JavaScript | Yes | No | Yes | No | Partial | No | 39/106 decoded33 exact · 6 pixel mismatches51 unsupported · 14 errors · 2 oracle-unavailable cases |
| Jimp1.6.0 · Pure JavaScript | Yes | No | Yes | No | No | No | 74/106 decoded49 exact · 25 pixel mismatches28 errors · 2 oracle-unavailable cases · 2 timeouts · 3 crashes |
| Sharp / libvips0.35.3 · Native wrapper | No | Partial | Yes | Partial | Partial | No | Not run |
Oracle unavailable is not an engine failure: the independent Sharp/ImageMagick ground-truth path could not decode the same two fixtures for every measured engine. PureJsImage's 47 non-exact decodes comprise 38 at or above 40 dB PSNR, 6 from 20 to below 30 dB, and 3 below 10 dB, derived from recorded RMSE. Jimp uses utif2 for TIFF internally, so its matching aggregate outcomes are expected.
Measured 2026-08-13 with v24.16.0 on linux/x64. Methods, caveats, versions, and sources.
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, PNG, and WebP WASM accelerators use separate explicit imports.
The acceleration roadmap defines how large jobs may progressively use optional WASM or WebGPU providers without changing the default package or output semantics.
Frequently asked questions
These answers describe the default package. The codec and reader documentation lists exact support boundaries.
PureJsImage is an image codec and raster-processing library written in strict TypeScript. It runs in Node.js and modern browsers and has no runtime dependencies.
Yes. The shared codec, pipeline, transform, source, sink, and public APIs support Node.js 22 or later and modern browsers. Browser applications use File, Blob, ArrayBuffer, Uint8Array, fetched bytes, or an ImageSource instead of local path strings.
PureJsImage supports JPEG, PNG, WebP, BMP, TIFF, GIF, ICO, JPEG 2000, AVIF, JPEG XL, Radiance HDR, QOI, Netpbm, and TGA. Read, write, and format-subset support varies, so use the codec matrix for exact boundaries.
Yes. Explicit reader imports cover microscopy, whole-slide pathology, medical imaging, astronomy, structural biology, hyperspectral, geospatial, and multidimensional array formats. Readers preserve native numeric samples where the format and API permit it.
No. The default package uses strict TypeScript reference codecs and does not load native addons, external binaries, or WebAssembly. Optional JPEG, PNG, and WebP WebAssembly accelerators require explicit imports and registration.
PureJsImage uses bounded rows, tiles, regions, source reads, and compact coefficient storage where each format permits them. Full-frame fallbacks are explicit and benchmarked separately.
Usage
PureJsImage is free and open source under the MIT license. The root API does not load codec implementations automatically.