A tiny JPEG XL encoder in Rust, ported and reworked from libjxl/libjxl-tiny.
fn main() {
let output = "encoded_lossy2.jxl";
let image = image::open(Path::new("./assets/abstract_alpha.png")).unwrap();
let bytes = jixel::encode_image_with_alpha(
image.to_rgba8().as_raw(),
image.width() as usize,
image.height() as usize,
&EncodeConfig::default().with_quality(90.),
);
std::fs::write(&output, &bytes).expect("failed to write output");
}This project is licensed under either of
at your option.