Rust wrapper for MozJPEG library
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 = with_markers
.from_path?;
d.width;
d.height;
d.color_space == JCS_YCbCr;
for marker in d.markers
let image = d.rgb.unwrap;
image.width;
image.height;
image.color_space == JCS_RGB;
Error handling
The libjpeg library will in some cases panic!()
on error. You can use catch_panic()
to handle these errors.