21 releases
0.8.24 | Feb 10, 2021 |
---|---|
0.8.21 | Nov 14, 2020 |
0.8.20 | Jul 20, 2020 |
0.8.15 | Jan 4, 2020 |
0.8.5 | May 9, 2018 |
#3 in #jpeg
3,121 downloads per month
Used in 6 crates
(3 directly)
54KB
1K
SLoC
Rust wrapper for MozJPEG library
This library is compatible with Rust 1.46 or later.
This library offers convenient reading and writing of well-compressed JPEG images using a safe Rust interface.
The interface is still being developed, so it has rough edges and may change.
Decoding
let d = mozjpeg::Decompress::with_markers(mozjpeg::ALL_MARKERS)
.from_path("tests/test.jpg")?;
d.width();
d.height();
d.color_space() == mozjpeg::ColorSpace::JCS_YCbCr;
for marker in d.markers() {}
let image = d.rgb().unwrap();
image.width();
image.height();
image.color_space() == mozjpeg::ColorSpace::JCS_RGB;
Dependencies
~5MB
~97K SLoC