At a glance
The current reference implementations are first-party strict TypeScript and never runtime-import native libraries, WASM modules, browsers, or system tools. Future WASM codec providers and WebGPU compute providers will use explicit opt-in imports and registration; the TypeScript codecs remain the default implementations and portable fallbacks.
| Codec | Decode | Encode | Primary boundary |
|---|---|---|---|
| JPEG | ● Yes | ● Yes | Static 8-bit Huffman JPEG, including AVI1/MJPEG frames with omitted standard tables. The explicit purejsimage/hdr entry adds bounded SDR-base Ultra HDR XMP and ISO 21496-1 gain-map inspection, selected-boost rendering, paired transforms, and compound JPEG output with an sRGB ICC primary. HDR-base JPEG gain-map relationships, arithmetic, lossless, 12-bit, omitted nonstandard external tables, unrelated SDR/HDR synthesis, and general MPO selection remain unsupported. |
| PNG | ● Yes | ● Yes | No APNG frame decode, indexed output, or grayscale-alpha output without RGBA expansion |
| WebP | ● Yes | ● Yes | Static images only; compressed RIFF input and compact VP8L transform maps remain source-sized |
| BMP | ● Yes | ● Yes | Common Windows and OS/2 raster subsets; no embedded JPEG or PNG |
| TIFF | ● Yes | ● Yes | Broad validated IFD-graph and strip/tile decode plus public TIFF document, lightweight tag metadata, native scientific-raster, explicit calibrated ordinary TIFF ScientificDocument, typed scientific GeoTIFF spatial references, a generated compression audit and public COG structural inspector, OME-TIFF, deterministic profile, whole-slide and explicit Aperio ScientificDocument access with configurable WSI limits, bounded HTTP-range access, and explicit scientific display-mapping APIs; structured strip, tile, Classic TIFF, BigTIFF, multi-page, and SubIFD-pyramid RGB/RGBA output; no implicit Z/time interpretation of ordinary pages without ImageJ or DigitalMicrograph evidence, inferred FEI field-of-view calibration without fixture proof, implicit display conversion for arbitrary scientific multiband data, general CMYK ICC profile classes, multi-area vendor slide composition, or alternate compression encode profiles |
| GIF | ● Static / explicit frame 0 | No | Static images decode directly; animated inputs require explicit frame 0 selection; no animation editing or GIF output |
| ICO | ● Yes | No | Static ICO decode only; no CUR or ICO output |
| JPEG 2000 / JP2 | ● Yes | No | Static Part 1 JP2 decode for 1-16-bit integer grayscale, RGB, sYCC, palette, and cdef alpha images using the documented MQ-coded wavelet subset; excludes POC, packed packet headers, arithmetic-bypass and pass-termination styles, JPX/JPM, HTJ2K, animation, and encode |
| AVIF | ● Yes | ● Limited | Common still-image AVIF decode plus selected independently decodable spatial layers and animation key samples; dependent inter frames and uncommon documented AV1/ISOBMFF syntax remain explicit unsupported boundaries. Decode supports the documented compatible 8/10/12-bit monochrome, YUV 4:2:0, YUV 4:2:2, and YUV 4:4:4 syntax; alpha auxiliaries; grids; orientation; exact integer and half-integer clean apertures; spatial segmentation maps with alternate quantizer and loop-filter features; gain maps; SDR and HDR-to-SDR NCLX color conversion; compatible ICC conversion and preservation; EXIF preservation; super-resolution; film grain; and post-filters. The explicit purejsimage/hdr entry adds exact ISO gain-map inspection, extraction, caller-selected linear output for matching declared sRGB or Display P3 base and alternate primaries, paired transforms, and constrained opaque sRGB one-channel gain-map output. Cross-primary gain-map rendering remains unsupported. Ordinary constrained encode accepts gray8, rgb8, and rgba8 input, composites alpha against white or an explicit solid background, writes one single-tile reduced-still-picture av01 primary item, preserves requested EXIF and compatible RGB ICC metadata, and uses deterministic 4x4 DC-predicted transform blocks without encoder search. |
| HEIF / HEIC (experimental) | ● Experimental | No | Experimental opt-in common intra-only HEVC still subsets plus common uncompressed stills; excluded from the default allCodecs set; auxiliary alpha including mismatched sizes and matching grids; no encoding |
| JPEG XL | ● Stable common static | ● Stable lossless, static lossy and exact transcode | The documented static Modular and VarDCT subsets support all eight orientations, structured color, native integer precision, high-depth and float VarDCT output, independent alpha precision, and explicit HDR display conversion. Source metadata and emitted pixel semantics are distinct: gray plus alpha expands to RGBA with RGB semantics. The explicit sequence API adds rational animation timing, frame replay, composition, streamed lossless writing and Experimental lossy animation writing. Native channel APIs preserve exact unsigned samples through the JPEG XL maximum of 31 bits in Uint32 storage, legal floating-point bit patterns, grouped shifted extra channels, black channels and matching GRAY/RGB/CMYK ICC profiles. Level 10 native and general forward VarDCT output uses a container with jxll=10; writers choose the minimum valid level from depth, dimensions, pixel count, profile size and channel metadata, and reject conflicting raw or Level 5 requests. Forward VarDCT selects Level 10 automatically for exact Modular alpha above 12 bits and accepts an explicit Level 10 request across its existing integer gray/RGB/RGBA subset. Streamed Level 10 animation uses an unbounded jxlc box instead of buffering the completed output. Explicit finite-range IEEE binary16/binary32 gray/RGB-to-RGBA16 conversion accepts integer or IEEE alpha, including associated and shifted alpha; it emits straight alpha and records source and output meaning. Profile-defined CMYK-to-RGBA8 conversion accepts straight integer or IEEE alpha and shifted black/alpha planes. Explicit GRAY/RGB/CMYK ICC-to-sRGB16 conversion accepts 8- through 16-bit integer color, mixed integer or IEEE alpha, and associated alpha; the 8-bit CMYK API still rejects associated alpha. Native planes with shifts 0 through 3 can be written across multiple 1024-pixel Modular groups. Ordinary native Modular decoding accepts legal JPEG XL floating-point fields, including the independently checked 24-bit/8-exponent and 16-bit/4-exponent layouts, as finite Float32 rows. Integer gray/RGB with floating alpha emits normalized rgbaf32. Alpha may use unsigned depths through 31 bits. Opaque unsigned color through 31 bits retains exact gray32/rgb32 samples and depth on re-encode. Integer color with wide or floating alpha uses normalized Float32 and reports precision loss. Wider integer VarDCT display remains unsupported. The ordinary pixel pipeline converts supported GRAY and RGB ICC integer samples through 16 bits to sRGB, including gray plus alpha, mixed integer alpha precision, associated alpha and the checked constant 2x shifted alpha case. High-depth conversion emits full-range sRGB16 and straight alpha. Lossless ordinary JPEG XL encoding preserves explicitly retained matching GRAY/RGB ICC profiles for integer and Float32 samples. Equal expanded gray-alpha RGB channels fold back to native grayscale; unrelated RGB samples cannot use a GRAY profile. Explicit ordinary structured SDR conversion supports linear, gamma, BT.709, P3 and Rec. 2020 color through 16-bit integer precision, including mixed and associated alpha. Relative custom white points and primaries also convert to sRGB at 8- through 16-bit precision. Structured samples remain native by default. Ordinary static full-canvas Modular IEEE binary16/binary32 gray and RGB input emits grayf32, rgbf32 or rgbaf32 rows, retaining finite signed values, subnormals and highlights. Mixed integer or IEEE alpha can be preserved or straightened; gray alpha expands to RGB. Explicit pixel-format range conversion supports integer output. Float source color is preserved by default. Explicit colorOutput: srgb converts structured SDR binary16/binary32 gray and RGB to straight sRGB16, including integer or IEEE alpha, linear, gamma, BT.709, sRGB, P3, Rec. 2020 and relative custom chromaticities. Associated color is straightened before source samples are clipped to [0,1]; converted gamut values are clipped at the SDR output boundary. Float ICC conversion supports GRAY curves and RGB matrix/TRC, mAB, LUT8 and LUT16 A2B0 profiles. RGB legacy LUT XYZ conversion is independently qualified against LittleCMS. Structured PQ/HLG/linear HDR supports relative custom primaries; source-primary linear output retains highlights and tone-mapped output uses sRGB8. Nonrelative custom conversion and profiles without supported HDR transfer metadata remain unsupported. Explicit PQ/HLG or linear HDR output supports sRGB, Display P3 and Rec. 2020 primaries: linear-float retains source primaries and highlight headroom, while tone-map-srgb uses 203-nit reference white and source-gamut Reinhard mapping. Native Modular float composition precedes ICC conversion or HDR tone mapping. Lossless ordinary JPEG XL encoding accepts grayf32/rgbf32/rgbaf32, retains finite binary32 sample bits and associated alpha, and preserves matching embedded GRAY/RGB profiles through keepIcc. GRAY ICC plus alpha folds equal expanded RGB channels back into native grayscale when re-encoding. Other conversion profile families remain unsupported. Ordinary static full-canvas Modular CMYK uses integer color and black through 16 bits with a supported embedded mft2 A2B0 ICC profile. It emits straight sRGB8 or sRGB16 rows, including mixed integer/IEEE alpha, associated alpha and the checked constant 2x black/alpha grids. Selected composed CMYK frames use source-domain native planes before supported mft2 ICC conversion, including cropped layers, references and associated IEEE alpha. Animation requires an explicit displayed-frame index. Ordinary native Modular CMYK with a supported embedded mft2 A2B0 profile accepts unsigned C/M/Y/black through 31 bits or legal floating samples. It emits straight sRGB8/16 with mixed or associated alpha. Floating black is supported. Source CMYK preservation requires native extraction. Other CMYK profile families remain unsupported; constant 2x black/alpha grids retain their earlier independent rendered qualification. Other non-alpha extra channels and nonrelative custom-color conversion remain unsupported. Native extraction is separate from rendering; raw layers reconstruct patch and progressive dependencies; uncommon display layouts remain explicit errors. Stable static forward VarDCT encoding supports integer gray/RGB/RGBA, exact straight alpha with lossy replacement of fully transparent color samples, DCT8 with effort-5/7/9 Hornuss and rectangular half-block choices, local chroma-from-luma, adaptive quantization, and optional two-pass output. Ordinary grayf32/rgbf32/rgbaf32 output defaults to bit-exact lossless binary32 in a Level 10 container. Explicit lossy mode rounds color mantissas in Modular coding while preserving Float32 storage and exact alpha. This mode has no progressive passes and no perceptual quality equivalence claim. Float32 animation writing and selected HDR XYB VarDCT frame rendering are supported. HDR reference composition uses linear color before the output transfer curve. Forward integer VarDCT writing accepts HLG, relative custom chromaticities, associated alpha and nondefault intensity targets. Eligible regular effort-7/9 opaque standard-sRGB RGB8/RGBA8 photos with more than 2,048 visible colors can also select 32x32, 16x32 and 32x16 DCT at distance 2 or above when 4x4-block context fits and optional working storage is available. This photo policy has no pixel-count window. Other larger DCT and AFV choices and Gaborish remain unsupported by the forward writer. Residual-scaled edge-preserving restoration is available for opaque standard-sRGB gray/RGB at effort 5/7/9 and distance 2 or above when most blocks need filtering. Exact JPEG reconstruction accepts checked one- or three-component 8-bit Huffman baseline and progressive JPEGs, orientation absent or 1, and absent or independently checked sRGB profile signaling. Native re-encode inherits depths and luminance metadata; storage conversion retains luminance fields, while explicit HDR-to-SDR conversion replaces incompatible signaling. Display-window and LUT re-encode cannot inherit source color meaning. Explicit sessions support embedded previews and selective XYB VarDCT DC/pass output for 8- or 16-bit SDR RGB, 16-bit linear or PQ RGB, and straight or associated integer alpha through 16 bits in global or grouped native planes, including a 2x shifted alpha grid. Grouped alpha dependencies may read HF and later AC passes before an early color stage; global Squeeze requires every alpha group. Other dependencies use declared complete static fallbacks or strict rejection; unavailable native stages are errors. Forward lossy distance remains 0.25 through 25; quantized AC magnitudes above 4095 are explicit unsupported-operation errors. Ordinary XYB VarDCT binary16/binary32 and checked custom floating color metadata emits Float32 rows; floating alpha is preserved. Selective progressive float stages retain their declared static fallback. Slow effort 9 retains effort 7 tools and adds complete AC iteration, RGB strategy, luma-context, cone-frame and exhaustive advanced Modular DC alternatives, gated by effort rather than image area or channel count. Lossless effort 9 uses effort 7 search policy. |
| Radiance HDR / RGBE | ● Yes | ● Yes | Radiance RGBE pictures with standard scanline RLE or legacy scanlines; no XYZE or color-correction pipeline |
| QOI | ● Yes | ● Yes | Complete QOI Specification v1 RGB and RGBA still images |
| Netpbm and PFM | ● Yes | ● Yes | Single-image PBM, PGM, PPM, standard PAM grayscale/RGB tuples, and Netpbm PFM convention |
| TGA / TARGA | ● Yes | ● Yes | Uncompressed and RLE color-mapped, truecolor, and grayscale TGA still images; no interleaving or developer-area metadata |
allCodecs and requires the direct purejsimage/codecs/experimental/heic import. HEIC commonly carries HEVC/H.265 data that may be subject to third-party patent rights. The MIT license grants no third-party patent rights; users and distributors must assess their own licensing obligations.Codec details
JPEG
Decode + encodeDecodes common 8-bit baseline, extended-sequential, multi-scan, and progressive grayscale, YCbCr, RGB, CMYK, and YCCK JPEGs with chroma-aware interpolation, plus AVI1/MJPEG baseline frames that use omitted standard Huffman tables. Encodes baseline and scan-optimized refinement-based progressive JPEG with configurable quality, chroma sampling, native grayscale, and restart markers. The opt-in purejsimage/hdr entry discovers, extracts, renders, transforms, and writes one-channel and three-channel SDR-base Ultra HDR and ISO gain-map JPEGs while ordinary JPEG decode continues to return the SDR primary.
Full JPEG checklist →PNG
Decode + encodeDecodes every legal grayscale, truecolor, indexed, and alpha combination at 1-16 bits, including Adam7, palettes, transparency, and supported color profiles. Legal 16-bit input remains gray16, rgb16, or rgba16 through supported pipeline transforms. Encodes streaming 8-bit or 16-bit grayscale, RGB, or RGBA PNG with adaptive filters, exact representable native color signaling, and opt-in EXIF and compatible ICC preservation.
Full PNG checklist →WebP
Decode + encodeDecodes static VP8 lossy, VP8L lossless, extended alpha, and odd RIFF padding. Encodes first-party static lossy, exact lossless, or near-lossless WebP with effort-based size optimization plus opt-in EXIF and compatible ICC preservation. Animation is detected and rejected for pixel decode.
Full WebP checklist →BMP
Decode + encodeDecodes common Windows and OS/2 headers, indexed 1/4/8-bit pixels, RLE4/RLE8, RGB555/RGB565, top-down images, bitfields, and explicit alpha. Encodes 24-bit RGB and 32-bit RGBA BMP.
Full BMP checklist →TIFF
Decode + encodeDecodes Classic TIFF and BigTIFF top-level frames and reduced-resolution SubIFDs across common display and scientific sample layouts. A checked compression registry distinguishes fully COG-tested paths, implemented but weakly COG-tested paths, recognized unsupported assignments, and known unimplemented assignments; unsupported compression diagnostics include the numeric ID and assigned name. Supported display compression includes first-party LERC/LERC-plus-Deflate, Zstandard, CCITT, JPEG, JPEG 2000, SGILog, and explicitly composed WebP in addition to TIFF baseline schemes, while the native raster surface is intentionally narrower. Public APIs expose bounded tag reads and payload-free tag metadata, a COG structural inspector, native-precision N-channel rasters, an explicitly registered ordinary TIFF scientific reader with compatible-page axes, incompatible series, SubIFD levels, bounded selected metadata, standard TIFF, ImageJ, DigitalMicrograph, FEI SFEG/Helios, or Zeiss SEM calibration evidence, and typed GeoTIFF CRS, affine, inverse, bounds, raster interpretation, nodata, and JSON-safe source metadata while keeping reads in raster pixel coordinates. OME Z/C/T planes, deterministic vendor profiles, whole-slide region access, an explicitly registered configurable Aperio scientific-document reader, validator-protected HTTP range reads, and explicit range/scale/palette mapping of scientific planes to display pixels remain separate public paths. Structured document encoding writes Deflate-predicted RGB/RGBA strips or tiles as Classic TIFF or BigTIFF, including top-level pages and reduced-resolution SubIFD pyramids.
Full TIFF checklist →GIF
Parses GIF87a/GIF89a, palettes, transparency, interlace, LZW data, frame rectangles, and static images. Metadata counts animation frames. Animated pixel decode fails unless frame 0 is explicitly selected; later frames and GIF encoding are unsupported.
Full GIF checklist →ICO
Decode onlyDecodes multi-image Windows icons backed by embedded PNG or common DIB pixels. Selection is deterministic; AND masks, partial alpha, and the legacy all-zero-alpha fallback are preserved.
Full ICO checklist →JPEG 2000 / JP2
Decode onlyDecodes common static Part 1 JP2 images with reversible 5/3 or irreversible 9/7 wavelets, all five progression orders, multiple tiles and tile-parts, RCT/ICT, maxshift ROI, restricted RGB matrix/TRC ICC profiles, palettes, channel mapping, and straight or premultiplied alpha.
Full JPEG 2000 / JP2 checklist →AVIF
Decode + limited encodeProduction decode supports common static AVIF still images across independently validated libaom, dav1d, rav1e, SVT-AV1, Sharp/libvips, FFmpeg, ImageMagick/libheif, and Chromium workflows. The compatible set includes 8-bit and documented high-depth monochrome and YUV paths, alpha auxiliaries, grids, clean apertures, orientation, selected layers and animation key samples, palette and intra-block-copy content, super-resolution, film grain, compatible NCLX and ICC conversion, ISO gain maps, and documented post-filters. The ordinary codec returns its established RGBA output, including its existing HDR-to-SDR policy. The explicit purejsimage/hdr entry preserves exact gain-map metadata and returns caller-selected linear rgbf32 or rgbaf32 pixels for supported SDR-base and HDR-base files with matching declared sRGB or Display P3 primaries. It can write one narrow ISO gain-map AVIF subset with an opaque sRGB SDR base and a one-channel map. Ordinary encoding remains a deterministic opaque 8-bit Main Profile YUV 4:2:0 path with fixed quantization. Cross-primary gain-map rendering, dependent inter frames, general animation, gain-map output with alpha or RGB maps, wide-gamut gain-map output, external item data, and general multi-item authoring remain unsupported and fail explicitly.
Full AVIF checklist →HEIF / HEIC (experimental)
Optional experimental decoder available only through the direct purejsimage/codecs/experimental/heic entry. Decodes common opaque, same-dimension, and mismatched-size alpha Main, Main Still Picture, selected Main 10 YUV 4:2:0, and 8-bit Range Extension YUV 4:4:4 intra stills, direct images, identity-derived primaries, grid primaries including matching grid alpha, and common uncompressed unci stills including packed RGB and zlib or deflate generic compression. Native HEIF transforms take precedence over EXIF orientation. Bounded XMP MIME items can be parsed without pixel decode. It is not registered by the default allCodecs set.
Full HEIF / HEIC (experimental) checklist →JPEG XL
Decode + limited encodeDecode common static JPEG XL with native precision, color, alpha and HDR; read wider Modular integer and floating samples, convert supported ICC and relative custom HDR color, preserve matching ICC and finite Float32 output, compose native float/CMYK or HDR VarDCT frames, stream lossless or Experimental lossy animation, and reconstruct eligible JPEGs byte for byte.
Full JPEG XL checklist →Radiance HDR / RGBE
Decode + encodeDecodes Radiance RGBE pixels to native float32 RGB rows, including every legal axis direction, standard channel RLE, legacy scanlines, EXPOSURE, and GAMMA. Encodes deterministic RGBE with standard scanline RLE.
Full Radiance HDR / RGBE checklist →QOI
Decode + encodeDecodes and encodes every QOI chunk operation with strict dimensions, pixel counts, channel fields, colorspace fields, and end markers.
Full QOI checklist →Netpbm and PFM
Decode + encodeDecodes and encodes PBM P1/P4, PGM P2/P5, PPM P3/P6, PAM P7 grayscale and RGB tuples with optional alpha, and little- or big-endian float32 PFM.
Full Netpbm and PFM checklist →TGA / TARGA
Decode + encodeDecodes indexed, grayscale, RGB555/RGB5551, 24-bit BGR, and 32-bit BGRA TGA in all four origin directions. Encodes deterministic 24-bit RGB or 32-bit RGBA with optional TGA RLE.
Full TGA / TARGA checklist →Scientific readers use a separate registry
The scientific platform now has 31 explicit readers spanning common raster and whole-slide images, electron microscopy, AFM and surface metrology, medical and volume interchange, spectroscopy and detector interchange, and raw numeric interchange. These readers use the shared scientific dataset and RasterBlock architecture, support direct range reads where the format permits them, and preserve native quantitative values instead of forcing data through RGBA.
Coverage includes DM3 and DM4, TIA SER and EMI, NCEM and Velox EMD, 4D-STEM data, NIfTI, NRRD, MRC, OME-TIFF, and Aperio SVS. Open the generated scientific format reference for exact imports, extensions, resource models, precision, support boundaries, and benchmark coverage →
GSF example
Strict single-channel float32 AFM and surface-metrology reading and writing, physical extents and offsets, units, arbitrary metadata, and bounded region reads.
Full GSF checklist →ENVI example
Paired header/binary reading for BSQ, BIL, and BIP, seven scalar types, both byte orders, spectral metadata, and calculated band/ROI reads. Writing is not implemented.
Full ENVI checklist →Bruker Nanoscope .spm is not implemented. Read the capability investigation for the format ambiguity, CC0 corpus candidate, and validation work required before a safe read-only subset.
Memory classes
The public API is common, but codec structure determines the working set. “Supported” does not automatically mean “bounded independently of source dimensions.”
| Path | Current working model |
|---|---|
| JPEG | Ordinary decode uses incremental entropy input, bounded MCU-row baseline output, restart-aware region seeking, and scaled IDCT; progressive decode and encode retain compact Int16 coefficient planes. HDR inspection reads bounded metadata and validated range boundaries, and untransformed HDR composition retains bounded rows. Paired transforms retain caller-limited 8-bit base and encoded-map rasters. Transformed adapted output uses independent 32-row Float32 blocks and never retains a complete linear base or adapted Float32 image. |
| PNG | Sequential scanlines and bounded output blocks; Adam7 retains compact requested samples |
| WebP | VP8 uses two macroblock rows; VP8L uses a fixed maximum 4 MiB entropy history plus scanline transform buffers. Decode still retains compressed input and compact transform maps. Lossless encode retains one 32-bit transformed frame, a fixed maximum 4 MiB match table, and one encoded payload. |
| BMP | Region-based row reads; RLE uses compact full-frame index storage |
| TIFF | Selected-frame, ordinary TIFF scientific-dataset, GeoTIFF, OME plane, whole-slide region, and Aperio scientific-dataset reads remain strip- or tile-bounded; IFD traversal, profile detection, and scientific document construction do not read unselected pixel segments or complete ICC payloads merely to enumerate metadata. The ordinary reader admits selected optional tag values under aggregate and per-tag byte limits and records oversized or unreadable optional metadata without blocking pixels. TIFF document options independently bound physical segment count, the raw-plus-converted segment-table construction peak, and each encoded segment before the corresponding payload read. Aperio readers use explicit source, dimension, directory, region-pixel, decoded-byte, and associated-image limits while allowing large lazy sources, and tiled regions decode sequential native-tile intersections. Direct TIFF display and raster reads preflight the aggregate live decoded segments, largest intersecting encoded segment, largest output block, and predictor scratch before segment payload reads. HTTP range reads use a bounded deduplicating LRU cache and reject resource changes. LERC, Zstandard, bit-order normalization, color conversion, prediction, raster/display output, and embedded codec pixels are bounded to the current metadata table or admitted segment set and emitted in bounded rows. JPEG 2000 reconstructs complete component state only for the current TIFF segment, not the source slide. Encoding retains compressed segment payloads until their offsets are known but never stages a full uncompressed frame. |
| GIF | Retains compact first-frame palette indices, then emits bounded RGBA rows |
| ICO | Decodes one selected entry; DIB pixels are emitted in bounded rows |
| JPEG 2000 / JP2 | Metadata inspection reads bounded headers only. Decode retains the compressed jp2c plus the selected-resolution component planes for one tile row, emits ordered 32-row pixel blocks, skips unrelated tiles for regions, and selects lower wavelet levels for large resize; full-resolution single-tile decode remains an explicit full-component fallback. |
| AVIF | Metadata reads are bounded and all decoded RGBA is emitted in ordered 32-row blocks without a source-sized RGBA bitmap. AVIF track sample counts are checked against maxFrames before sample-table allocation. Every decoder path enforces a 64 MiB aggregate coded-payload and conservatively estimated working-state limit. Compatible opaque, single-item, filter-free AV1 frames reconstruct through two-superblock YUV, prediction, palette, and coefficient-context rings, with finalized bands copied before reuse. Layered items and animation tracks retain unselected OBUs or samples only as bounded source views; only the selected complete frame enters reconstruction, without OBU concatenation or copies. Compatible filter-free alpha auxiliaries with aligned orientation reconstruct through a synchronized second row ring. Compatible full-aperture 2x, 4x, and 8x resize input is box-filtered directly from bounded YUV rows before RGBA conversion. Supported clean-aperture regions convert only contributing samples; mirroring and rotation remain ordered block transforms backed by the runtime temporary store when reverse row access is required; opaque grids retain one contributing tile row, CDEF uses delayed 8-row bands, and restoration retains deblocked stripe-boundary rows plus delayed 4-row output bands. Compatible filter-free single-tile super-resolution reuses bounded upscaled luma and chroma band buffers while retaining the source chroma halo across ring reuse. Gain-map resampling retains two decoded gain rows and one aligned base block; gain-map grids inherit bounded contributing tile-row retention. Film-grain frames retain padded full-frame YUV plus bounded template and two-stripe noise buffers. Filtered super-resolution, rotated-alpha, grid, and multi-tile paths retain padded full-frame YUV reconstruction state; filtered super-resolution additionally retains the upscaled YUV planes. Sequential multi-tile decoders allocate entropy, transform, palette, CDEF, and skip contexts for one tile rectangle at a time and merge compact frame-wide post-filter metadata. Filtered 10-bit and 12-bit paths also retain padded full-frame native-depth YUV through post-filtering. The constrained encoder retains padded full-frame target and reconstructed 8-bit YUV planes plus frame-wide coefficient contexts and one encoded tile payload; it never retains a source-sized RGBA copy. The explicit HDR renderer keeps aligned base and gain rows for untransformed output. Paired transforms and constrained gain-map writing use a caller-limited full-frame fallback. Encoder dimensions, pixels, estimated working bytes, and the 4096-wide single-tile boundary are checked before allocation. |
| HEIF / HEIC (experimental) | Explicitly registered grid workflows decode requested tile rows; uncompressed stills materialize a full RGBA buffer; large compatible inputs remain explicitly measured |
| JPEG XL | The pixel encoder retains full input and accounts for owned backing buffers before allocation through maxWorkingBytes, defaulting to maxDecodedBytes (1 GiB by default). Optional DCT32 and 16x32/32x16 photo selection uses bounded source tiles and transform scratch plus staged block maps, precision and compact DC arrays. It adds no full source-sized XYB or AC cache. All optional storage is admitted before changing the original geometry; allocation-limit failure keeps the preceding transform path and cancellation releases optional state. It adds encoding work. It includes candidates, entropy state, writer growth and sections. Optional effort-7 denser prediction training retains the previous complete group and uses up to 262,144 deterministic positions per plane, with the original 256-leaf and depth-16 bounds. Group-local training and entropy scratch count against maxWorkingBytes; ties or optional allocation-limit failure keep the previous complete stream. This adds encoding work without another source-sized input bitmap. Optional effort-7 per-histogram layout search reuses the learned tree and retains one additional bounded group of packed residuals plus small histogram scratch; working or output allocation-limit failures retain the prior stream. Optional effort-7 reversible color search reserves at most 394,240 bytes of sample scratch and one additional bounded group of planar samples and entropy state. It retains the ordinary stream when optional search exceeds working storage. Forward VarDCT retains compact DC/control planes and reuses group-local AC storage; progressive output reuses quantized candidates across passes; caller input, sink storage and JavaScript object overhead are separate. maxOutputBytes bounds encoded output including metadata, up to 128 MiB. Explicit session DC preview retains compact LF state and restoration bands without full-resolution color working planes; early alpha retains its complete native plane. Grouped-alpha DC plans report full native alpha storage plus DC restoration; locating AC alpha retains one temporary color coefficient group and the required HF metadata. Spatial alpha transforms require all alpha groups even for a color viewport. Pass and final VarDCT stages retain full output; common 8-bit sRGB uses bounded restoration bands. High-depth, float and compositing paths retain full working planes. JPEG-derived decode uses compact coefficients and bounded component rows. Exact grayscale transcode temporarily allocates one zero coefficient plane for two unused VarDCT channels and accounts for it in managed peak bytes and maxDecodedBytes. Grouped Modular palettes without spatial prediction retain global tables and intersecting bands. Global Squeeze, spatial Palette prediction and shifted prefix layouts use compact full-frame channel planes with explicit planner fallback reporting. Large VarDCT scratch and dequantization tables are allocated only for strategies present; preflight reserves geometry-compatible large transforms. ICC and metadata have separate limits. Ordinary ICC and high-depth structured SDR conversion modify emitted rows without an additional frame; conservative color-table storage is reserved from maxDecodedBytes before native working allocation and included in planner estimates. Sequence decoding retains a full canvas, the current layer and up to four references, with cumulative replay-work limits and no decoded sequence cache. Native planar writing emits bounded 1024-pixel AC group sections, puts shift-3 planes in DC group sections, and preserves encoded sample grids. The caller retains input planes and the writer retains compressed sections until output assembly. Independent unshifted native Modular groups decode intersecting crop bands without retaining full source channel planes. Global transforms, shifted extras, dependent groups and composition retain their declared native-plane or canvas/reference fallbacks. Output rows and color tables are reserved before decoding. Native integer/float encoding stages planar samples and retains compressed sections and output assembly within configured budgets. Normalized and upsampled selected extras, output rows and CMYK ICC tables are reserved before native allocation. Structured float SDR conversion reserves 4 KiB for matrix construction and scratch; it evaluates float transfer functions directly without image-sized lookup tables. There is no additional full rendered output bitmap. Float ICC tables and HDR scratch are reserved before native allocation. Float-preserving ordinary encoding stages planar binary32 bits once and retains native compressed sections and assembled output; it enforces maxWorkingBytes and maxOutputBytes before consuming rows. Composed native float and CMYK decoding uses the sequence canvas/reference budget and cumulative replay limit, then converts output rows without a second full rendered bitmap. Optional regular effort-7 RGBA8 artwork search through 1,048,576 pixels retains full Modular candidate planes and compressed sections, plus a full RGBA8 normalization copy for nonzero fully transparent colors or eligible opaque palette-edge quantization. The latter uses at most 2,048 colors and three 4,096-slot typed lookup arrays, all within maxWorkingBytes. The previous Modular winner is retained while the optional quantized candidate runs. Classifier, normalization and candidate storage share one maxWorkingBytes scope; only winning output escapes, and optional storage-limit failure retains the previous complete stream. This search adds encoding work. Optional effort-7 learned palette search retains the complete previous group candidate while evaluating bounded group-local training and entropy scratch. Only smaller output escapes; losing candidates are released before later searches and working-limit failures keep the previous complete stream. The same bounded search evaluates the three existing reordered RGBA8 palettes at effort 7, through 1,048,576 pixels with no delta colors. Each extra search keeps all prior ordered variants as a complete size floor and retains them on optional working-limit failure. It adds group-local training and entropy scratch and encoding work. |
| Radiance HDR / RGBE | Common Y-major decode and all encode paths use bounded scanline storage; uncommon X-major input uses a compact source-sized RGBE transpose buffer, and region access retains one numeric offset per source scanline |
| QOI | Sequential decode and encode use bounded row blocks plus the fixed 64-entry QOI index |
| Netpbm and PFM | Header parsing is capped and integer decode and encode use bounded rows; PFM decode uses bounded rows while PFM encode retains one float frame to reverse top-down input into the required bottom-to-top raster |
| TGA / TARGA | Uncompressed decode and all encode paths use bounded rows; RLE decode retains compact packet state per source row, and palettes are bounded by the declared color-map length |
Choose an output
- JPEG: Photographs and broadly compatible lossy output.
- PNG: Exact alpha, screenshots, graphics, and lossless round trips.
- WebP: Use lossless WebP for graphics, interface captures, screenshots, and other repeated structure; use lossy WebP for photographs, or PNG when exact lossless photographic preservation is required. Compare sizes for the actual source because lossless WebP can be larger than PNG on photographic content. Use effort 0 for faster lossless encoding or effort 6 for the smallest output.
- BMP: Legacy Windows bitmap interoperability.
- TIFF: Broad display-image input compatibility, native ordinary scientific and GeoTIFF raster access, validated OME and whole-slide pyramids, explicit Aperio scientific documents, structurally inspected and deterministic-corpus-tested selective remote COG reads, explicit frame/pyramid selection, and structured Deflate RGB/RGBA strip, tile, BigTIFF, multi-page, and SubIFD-pyramid output.
- AVIF: Decode common AVIF still images in Node.js and modern browsers; use the exact capability boundary for animation and uncommon AV1 syntax, and treat AVIF encoding as constrained.
- JPEG XL: Use native pipelines when the target can preserve source precision and color. Request supported GRAY/RGB ICC or structured SDR conversion with colorOutput: srgb; high-depth conversions emit sRGB16. Custom white points and primaries require relative intent. Ordinary static CMYK converts supported profiles to sRGB, with integer or IEEE alpha. Static IEEE float input preserves source samples; use explicit convertPixelFormat with a finite range before integer encoding, or request structured SDR colorOutput: srgb for straight sRGB16. Use native extraction for other supported layouts. Pixel-lossless encoding preserves samples; exact JPEG transcode preserves eligible original bytes. Use onlyIfSmaller when JPEG output size is a hard requirement. The approved M7 checks cover 240 SDR source families at up to 2 MP, eight fixed original-size cases, and separate HDR and transparent classes. Lossless passes its reviewed compression gates. The documented static lossy subset is Stable after the finite visual-defect, compression, interoperability and resource qualification. Missing or reference-limited quality comparisons remain unscored. Lossy animation remains Experimental. Distance controls quantization without guaranteeing a perceptual score.
- Radiance HDR / RGBE: Radiance environment maps and other RGBE interchange where native HDR samples must remain floating point.
- QOI: Simple lossless RGB or RGBA interchange.
- Netpbm and PFM: Portable anymap interchange, simple test fixtures, and native float32 PFM data.
- TGA / TARGA: Legacy TGA still-image interchange.
Planned formats
CUR is not a current codec entry point. Decode common static JPEG XL with native precision, color, alpha and HDR; read wider Modular integer and floating samples, convert supported ICC and relative custom HDR color, preserve matching ICC and finite Float32 output, compose native float/CMYK or HDR VarDCT frames, stream lossless or Experimental lossy animation, and reconstruct eligible JPEGs byte for byte. The linked scope documents define the exact implemented and unsupported boundaries.