Skip to content

JPEG lossless in zune-jpeg #144

@Enet4

Description

@Enet4

I am reaching out to discuss the possibility of including support for JPEG lossless in the zune-jpeg crate.

The context is that jpeg-decoder is currently the only known library in pure Rust that can handle the decoding of images in JPEG lossless (ISO/IEC 10918-1 Annex H), a standard capability with very little support in the ecosystem, but with a prominent presence in medical imaging. However, after the image-rs project's interest in migrating to zune-jpeg, jpeg-decoder itself turned into maintenance mode, which puts this capability in a bit of a rough spot. The way I see it, bringing support for JPEG lossless into zune-jpeg would be the best way forward in the long term to ensure that JPEG lossless images can be decoded reliably and efficiently in Rust.

A few options are available here, but the most intuitive one would be migrating the lossless module from jpeg_decoder, which was already designed to be disentangled with the rest of the code. One would mostly have to replace some portions so as to depend on the existing implementation of Huffman coding (arithmetic encoding entropy coding is not supported by jpeg-decoder anyway). There may be other implications to the high level API that I am not yet aware of (do the current data structures consider the possibility of images having a bit precision other than 8 bits per sample?).

What are your thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions