inflation / jpegxl-rs

GNU General Public License v3.0
56 stars 11 forks source link

`encode_jpeg` produces warnings from libjxl #31

Closed xentec closed 8 months ago

xentec commented 8 months ago

Using the API like this

let jpeg_buf: Vec<u8> = /*<jpeg data>*/;
let mut enc = jpegxl_rs::encoder_builder()
    .use_container(true)
    .uses_original_profile(true)
    .build()?;

let jxl_buf = enc.encode_jpeg(&jpeg_buf)?;

...produces this warning from libjxl: ./lib/jxl/encode.cc:654: Basic info not yet set. ...which is caused by https://github.com/inflation/jpegxl-rs/blame/a72176ae03eb47ed957b5e4f19d8fa7e1c093a8d/jpegxl-rs/src/encode.rs#L504

inflation commented 8 months ago

Good catch. I forgot to remove the code when copying. Fixed in 8d285be.