jxl-oxide

repository·main·Indexed 19 days ago

https://github.com/tirr-c/jxl-oxide

A spec-conforming JPEG XL decoder implemented in pure Rust. It is available as a high-level library, a command-line tool (jxl-oxide-cli), and a WebAssembly build with JavaScript/TypeScript bindings (jxl-oxide-wasm). The project is modular, consisting of specialized crates including jxl-bitstream for bitstream reading, jxl-coding for entropy decoding, jxl-color for color space conversions, jxl-frame for frame abstractions, jxl-image for header metadata, and jxl-render for the core rendering logic.

Tokens
51.5K
Snippets
194
Records
267
Agent score
66%

What's inside jxl-oxide

  1. Overview of jxl-oxide

    main
    jxl-oxide is a JPEG XL decoder implemented in pure Rust. The project is modular, organized into several specialized crates (such as jxl-bitstream, jxl-coding, jxl-color, etc.), while the jxl-oxide crate serves as a high-level wrapper providing a simplified interface for decoding JPEG XL images.
  2. Overview of the jxl-vardct crate

    main

    The jxl-vardct crate provides the data structures and types necessary to represent VarDCT (Variable Discrete Cosine Transform) frames. It is primarily used for handling the components of a VarDCT frame, including:

    • varblock transform types: Types representing the block transforms.
    • LF images: Low-frequency image representations.
    • Dequantization matrices: Matrices used in the dequantization process.
    • HF coefficients: High-frequency coefficient representations.

    Note: This crate is a data representation layer only. It does not perform the actual decoding, dequantization, or rendering of these frames.

  3. Overview of the jxl-color crate

    main
    The jxl-color crate provides functions for handling color encodings as defined by the JPEG XL specification. Its primary capability is performing color space conversions from the XYB colorspace to any of the "enum colorspaces" supported and signaled in a JPEG XL image header.
  4. Use jxl-image for JPEG XL image header metadata

    main
    The jxl-image crate provides types for handling JPEG XL image headers. It is primarily used to access metadata such as image dimensions (size), color encoding details, and animation timing information (Ticks Per Second/TPS). Most of this metadata is encapsulated within the ImageMetadata struct.
  5. Read JPEG XL bitstreams with jxl-bitstream

    main

    The jxl-bitstream crate provides a reader for JPEG XL bitstreams. It is capable of handling both bare codestreams and the container format. The reader can automatically detect which format is being provided.

    // Use Bitstream::new_detect to create a reader that automatically
    // detects whether the input is a bare codestream or a container format.
    let reader = Bitstream::new_detect(input_data);
  6. Use AlignedGrid and PaddedGrid from jxl-grid

    main
    The jxl-grid crate provides two primary grid abstractions used for image processing tasks: AlignedGrid and PaddedGrid. These structures are designed to manage spatial data layouts in various image-related contexts within the jxl-oxide ecosystem.
  7. Understand JPEG XL frames in jxl-frame

    main
    The jxl-frame crate provides the core types and abstractions for handling JPEG XL frames. In the JPEG XL format, an image is composed of one or more frames. Each frame acts as a single unit of image data that can either be displayed directly or used as a reference by other frames (such as in temporal or hierarchical coding).