Repository navigation
J2K 0.13.1
J2K 0.13.1 publishes all 25 workspace crates and requires Rust 1.99.0. The shared kernel crates j2k-types and j2k-codec-math retain Rust 1.96 support. No public API item changed, so projects that depend on j2k = "0.13" get this release from cargo update.
CpuBatchDecoder and MetalBatchDecoder region and region-plus-reduced requests now allocate only the sub-band and IDWT windows the region reads. On an 18000 x 12000 image, 1024 px tiles at full and half resolution no longer fail on the CPU with ImageTooLarge (#299), and no longer fall back from Metal to the CPU. Reduced-resolution regions that end where a tile begins no longer fail preparation with "failed to decode code-block" (#298). Owned batch preparation accepts images whose components use different sampling factors, such as YCbCr 4:2:2, and MetalBatchDecoder decodes full-image Aperio 33003 tiles in one command buffer.
CPU decodes of codestreams whose tile-part headers set their own COD or COC coding style now give the right samples (#295). j2k-tilecodec LZW decode no longer reports valid TIFF strips and tiles as truncated. All-stage Metal lossy encodes now write packet headers identical to the CPU's.
CPU classic code-block decoding is 9 to 11% faster. Serial 8-bit region decodes stream rows into the caller's buffer, so a 1024 x 1024 RGB region of an 18000 x 12000 image peaks at about 3.5 to 6 MiB of heap instead of 14 to 16 MiB (#287, #294). Decoded samples are unchanged. See the changelog for details and measurements.
Behavior change: subsampled images in a region or reduced Metal request, or in a CUDA batch, now fail as a group with UnsupportedMetalRequest or UnsupportedCudaRequest instead of an indexed NonRepresentableBatchOutput preparation error. Callers that fall back to single-image decode on NonRepresentableBatchOutput should do the same for these errors.
Security: the lockfiles take libz-sys 1.1.31, which fixes RUSTSEC-2026-0418. Its build script printed the build environment into target/ when built with cc 1.6 or later on Unix. J2K's locked builds use cc 1.2 and were not affected; cargo install --locked j2k-cli now builds the fixed version.
Hosted validation and CUDA and Metal hardware validation passed for the tagged source. The release verifier checked the five attached T.803 reports: CPU on Linux x86-64, macOS arm64, and Windows x86-64, CUDA on an NVIDIA GeForce RTX 4070 SUPER, and Metal on an Apple M4 Pro. Each passes all 160 selected decoder cases with no skips, and their encoder checks pass. Both GPU reports have 81 hybrid cases and 79 CPU-only cases.
The public API comparison and review compare with 0.13.0. No ordinary API item changed in any crate; j2k-native adds five rustdoc-hidden items.