Project documentation
J2K: Rust JPEG 2000 / HTJ2K GPU Codec
Rust crates for JPEG 2000 and HTJ2K inspection, decode, encode, recode, and JPEG-to-J2K/HTJ2K transcode workflows. CPU is the portable baseline; CUDA and Apple Metal adapter crates cover supported GPU paths.
Install
Most applications should start with the public facade crate.
cargo add j2k
Optional GPU crates
Add backend crates only when the application needs explicit device integration.
cargo add j2k-cuda --features cuda-runtime cargo add j2k-metal
Package map
| Crate | Use |
|---|---|
j2k |
Public API for JPEG 2000 / HTJ2K inspection, decode, encode, and recode. |
j2k-cuda |
NVIDIA CUDA adapter for supported JPEG 2000 and HTJ2K backend paths. |
j2k-metal |
Apple Metal adapter for supported macOS GPU paths. |
j2k-transcode |
JPEG-to-J2K/HTJ2K transcode primitives and shared transcode contracts. |
Topic pages
- Rust JPEG 2000 CodecDecode, encode, JP2/J2K codestreams, and crate selection.
- GPU JPEG2000 RustBackend behavior, CPU fallback, CUDA, Metal, and strict device requests.
- CUDA JPEG2000 RustNVIDIA adapter crates and runtime feature boundaries.
- Metal JPEG2000 RustApple Metal adapter crates for macOS GPU-backed paths.
- HTJ2K RustHigh-throughput JPEG 2000 APIs, recode, and transcode routes.
Backend behavior
CPU output is the correctness baseline. BackendRequest::Auto may return CPU output when a device path is unavailable, unsupported, or not benchmarked for the requested shape.
Explicit CUDA and Metal requests are strict. Unsupported shapes return errors instead of silently changing backend.
Benchmark claims should cite host hardware, operating system, input source, exact command, comparator availability, and comparator versions.