JPEG encoder
JPEG encoder written in Rust
Features
- Baseline and progressive compression
- Chroma subsampling
- Optimized huffman tables
- 1, 3 and 4 component colorspaces
- Restart interval
Example
use ;
// An array with 4 pixels in RGB format.
let data = ;
// Create new encoder that writes to a file with maximum quality (100)
let mut encoder = new_file?;
// Encode the data with dimension 2x2
encoder.encode?;
Minimum Supported Version of Rust (MSRV)
This crate needs at lest 1.47 or higher.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in jpeg-encoder by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.