IMI is an image format designed for fast decoding and compact files, even when every sample must be preserved exactly. It supports photographs, graphics, and scientific data.
As an alternative to TIFF, V4 supports lossless integer and floating-point samples up to 64 bits, named planes, multiple pages, ICC profiles, HDR metadata, and tiled pyramids. V4 also stores timed frame sequences for animation and video and carries structured CBOR metadata.
The Rust codec, imij, writes .imi files using V4. V4 is implemented and
remains experimental.
- Lossless and lossy compression. Choose lossless, Quick lossless, or lossy coding. Lossy coding offers XYB and YCoCg, two entropy coders, and decode-speed presets. Quick coding · Lossy coding
- Sample types and color. Preserve signed and unsigned integers up to 64 bits and 16-, 32-, and 64-bit floating-point samples. The format carries ICC profiles, CICP signaling, HDR metadata, and explicit alpha modes. Sample types · Color handling
- Region reads and pyramids. Read a crop from a slice or a positional source. Tiles put related groups in contiguous byte ranges and keep group decoding independently schedulable. Native pyramids index original, reduced, and preview views. Image views and region reads
- Bounded I/O. Accept strided rows and write lossless groups incrementally. The bounded lossy writer uses a seekable source and caller-supplied scratch. Streaming and bounded encoding
- Sequences. Store timed frames or mixed-format pages. Frames can use delta coding against an earlier decoded image. Frames and pages
- Structured and scientific metadata. Attach schema-labeled CBOR or JSON to images and sequence items. Record calibration, named axes, and coordinates for scientific samples and slices. Structured data · Scientific metadata
- Integrity checks. Verify encoded objects and reconstructed pixels. Readers can select group and tile pixel checks independently. Validation · V4 checks
use imij::{Channels, ImageInfo, ImageRef, ImiEncoderConfig, Metadata, SampleType};
fn roundtrip_rgb8(pixels: &[u8], width: u32, height: u32) -> Result<(), imij::Error> {
let info = ImageInfo::new(width, height, Channels::Rgb, SampleType::U8);
let image = ImageRef::packed(pixels, &info);
let file = ImiEncoderConfig::lossless().encode_samples(image, &Metadata::default())?;
let (_, decoded) = imij::decode(&file)?;
assert_eq!(decoded, pixels);
Ok(())
}Use ImiEncoderConfig::lossy(80.0) for lossy coding or
ImiEncoderConfig::quick() for Quick lossless coding. The codec also provides
caller-buffer and region decoding, with a no_std + alloc configuration.
API and Cargo features · zencodec adapters
imij-set packs images and other blobs into append-only archives with a paged
index. Applications can authorize and audit access to governed image and score
splits. Archive guide
cargo install --locked --path imij-set --features cli
imij-set pack images.imijset first.imi second.imi
imij-set list images.imijset
imij-set verify images.imijsetTo validate an individual image, pass the validator a fresh scratch path.
cargo run --locked --release -p imij --example validate -- image.imi validation.scratch- See tiled region reads and resolution changes in action on the 8.82-gigapixel VISTA Milky Way. Gigapixel Explorer
- Open an IMI file and follow the decoder from file bytes to image regions. Codestream Atlas
- Browse image pairs, thumbnails, and metric scores in an archive and download the original scoring inputs. IQA browser guide
- V4 wire specification
- V4 documentation guide
- Implementation and validation coverage
- Compatibility and historical archive
Project-authored source and documentation are available under either the MIT License or Apache License 2.0, at your option. Third-party material carries its applicable terms and notices. Third-party notices