Crates.io | zune-jpegxl |
lib.rs | zune-jpegxl |
version | 0.5.0-rc0 |
source | src |
created_at | 2023-11-16 16:12:02.585757 |
updated_at | 2024-04-07 16:06:48.906138 |
description | A simple, fast and fully safe modular jxl encoder |
homepage | |
repository | https://github.com/etemesi254/zune-image/tree/dev/crates/zune-jpegxl |
max_upload_size | |
id | 1037743 |
size | 80,630 |
A simple jpeg-xl encoder
This features a simple jpeg-xl lossless encoder with the following features
First add the latest into your cargo toml
By cargo add
cargo add zune-jpegxl
Or adding directly to your Cargo.toml
zune-jpegxl = "0.4"
Then use the JxlSimpleEncoder
struct to encode an image
use zune_core::bit_depth::BitDepth;
use zune_core::options::EncoderOptions;
use zune_jpegxl::JxlSimpleEncoder;
// this example won't work
fn main()->Result<(),JxlEncodeErrors> {
let mut encoder = JxlSimpleEncoder::new(&[255,0,255,0], EncoderOptions::new(2,2,co));
encoder.encode().unwrap();
}