feat: set defaults for jxl encoding explicitly
at least while there's no way to select options; this at least works for some usecases
This commit is contained in:
parent
9b9c04c470
commit
8627ec026f
1 changed files with 5 additions and 1 deletions
|
|
@ -234,7 +234,11 @@ impl State {
|
||||||
|
|
||||||
match path.extension().map(OsStr::to_string_lossy).as_deref() {
|
match path.extension().map(OsStr::to_string_lossy).as_deref() {
|
||||||
Some("jxl") => {
|
Some("jxl") => {
|
||||||
let mut encoder = jpegxl_rs::encoder_builder().build().unwrap();
|
let mut encoder = jpegxl_rs::encoder_builder()
|
||||||
|
.speed(jpegxl_rs::encode::EncoderSpeed::Glacier)
|
||||||
|
.lossless(true)
|
||||||
|
.build()
|
||||||
|
.unwrap();
|
||||||
let rgb_image = DynamicImage::from(image.to_owned()).into_rgb8();
|
let rgb_image = DynamicImage::from(image.to_owned()).into_rgb8();
|
||||||
let jxl = match encoder.encode::<u8, u8>(
|
let jxl = match encoder.encode::<u8, u8>(
|
||||||
&rgb_image,
|
&rgb_image,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue