Primary crate
The public crate is j2k. Lower-level crates exist for native codec internals, shared contracts, JPEG input, and GPU backends.
cargo add j2k
Rust JPEG 2000 codec
Use j2k to inspect, decode, encode, and recode JPEG 2000 and HTJ2K codestreams and JP2/JPH files through safe Rust APIs. Unsafe implementation code remains behind documented boundaries.
Release status: See the changelog and crates.io for the current published version.
The public crate is j2k. Lower-level crates exist for native codec internals, shared contracts, JPEG input, and GPU backends.
cargo add j2k
J2K exposes safe Rust APIs for decode, encode, component planes, row streaming, tile-batch decode, scaled region decode, scratch pools, backend requests, and compressed-payload passthrough checks.
Raw J2K/J2C support covers Part 1 still-image codestream parse, inspect, decode, encode, signed samples, high-bit samples, component counts, ROI, progression, tile parts, packet markers, and precinct/layer behavior tracked by the support matrix.
JP2 still-image wrapping covers IHDR, COLR, BPCC, PCLR, CMAP, CDEF, ICC preservation paths, and codestream-brand validation for standard Part 1 still-image files.
JPX and JPEG 2000 Part 2 extensions are not supported, except where ordinary JP2/JPH decoding needs them.
GPU Backends, CUDA JPEG2000 Rust, Metal JPEG2000 Rust, and HTJ2K Rust.