Rust JPEG XR Codec

jxr inspects and decodes JPEG XR codestreams and Annex-A still-image files with a portable CPU baseline and optional Apple Metal or NVIDIA CUDA reconstruction.

Keep the pixels your source contains

Inspect before decoding, select an explicit output representation, and preserve the metadata needed by the surrounding imaging application.

Images, regions and thumbnails

Decode full images or regions. Frequency-mode inputs support native one-quarter and one-sixteenth width-and-height output without reconstructing unneeded higher-frequency bands on the CPU.

High bit depth, alpha and color

Request grayscale, RGB/BGR, CMYK, multichannel, planar YUV, integer or floating-point samples. Preserve integrated or separate alpha and access embedded ICC profile bytes.

Prepared batches and GPU output

Prepare inputs once, group compatible shapes and reuse CPU workers or GPU sessions. Supported GPU output can remain resident for downstream device workflows. The CUDA source build uses Rust kernels compiled with cuda-oxide; see the CUDA build guide.

Supported JPEG XR formats

In scope

Main profile still images

Raw JPEG XR codestreams and Annex-A still-image files are supported within the published Main-profile syntax boundary.

Container work

Annex-A wrapping validated metadata

Package an existing raw codestream with validated metadata and optional separate alpha. Inspection exposes dimensions, tiling, orientation and color information.

Not a pixel encoder

Unsupported features

Pixel-to-codestream encoding, Advanced-only output syntax, Annex-F/HEIF sequences and transcoding are outside the current scope.

Exact supportUse the maintained JPEG XR support guide for format, output and GPU coverage.

Start on the CPU

The default build needs no GPU runtime or reference codec. Add an integration crate only when the application needs that surface.

DecoderPortable
$ cargo add jxr

Inspection, full-image, region, reduced-resolution and batch APIs.

IntegrationsOptional
$ cargo add jxr-image
$ cargo add jxr-mpsgraph

Transfer supported buffers to the image crate or Apple MPSGraph.

Use JXR in an imaging stack