Closed vsaase closed 2 years ago
I now implemented Lossless decoding in my fork: https://github.com/vsaase/jpeg-decoder/tree/lossless
This is at the moment however a breaking change, as the decode
function returns u16 instead of u8 and also internally data is now u16. We could use generics to support both.
Other image-rs crates use &[u8]
slices to store pixel data, even when the pixels themselves are u16's or f32's. Think that could work here?
Ok, I changed it so that for 16bit images decode
now returns big endian u8 bytes, like the png crate.
If possible, native endian would be preferable to big endian. In the main image crate we actually end up having to swap the byte order for PNG's
I also prefer native endian, changed it. I don't see the JPEG standard making a statement to that.
Lossless JPEG has been implemented in #193; I believe this issue can be closed.
Hi,
in the medical community the Lossless JPEG format (SOF type 0xc3, not JPEG-LS or JPEG2000) is very popular due to the DICOM standard. It is used for graytone images, 16 bit or 12 bit most of the time.
Some links:
Implementations of JPEG Lossless (SOF type 0xc3):
Is anyone aware of Rust implementations? Is there maybe a quick way to do it using existing code of this library? Probably the main difficulty would be to support 16 bit?