image-rs / jpeg-decoder

JPEG decoder written in Rust
Apache License 2.0
149 stars 87 forks source link

Lossless JPEG decoding #193

Closed vsaase closed 2 years ago

vsaase commented 3 years ago

Hi,

this adds support for lossless decoding. As this is a special need mostly in medical imaging I tried to touch as little code as possible. Performance is a bit low at the moment, help would be appreciated here.

If you think this is too special a use case I might also publish it in its own crate.

vsaase commented 3 years ago

Just one question, can you specify precisely where the 1.40 requirement comes from?

This is not related to my changes. When running cargo check in the master branch with the current version 1.34.2 under Windows I get this error in crossbeam-utils, which is a dependency of rayon: error[E0161]: cannot move a value of type dyn std::ops::FnOnce() + std::marker::Send: the size of dyn std::ops::FnOnce() + std::marker::Send cannot be statically determined --> C:\Users\vsaas\.cargo\registry\src\github.com-1ecc6299db9ec823\crossbeam-utils-0.8.5\src\thread.rs:449:44

I thought I saw also some issues with 1.39, but that was maybe related to an old Cargo.lock file. Now the lowest working version seems to be 1.36, I changed it to that.