olxgroup-oss / libvips-rust-bindings

Rust bindings for libvips
MIT License
95 stars 41 forks source link

jpegsave_*: no property named `subsample-mode' #22

Open whiskeycola opened 2 years ago

whiskeycola commented 2 years ago
 let image = VipsImage::new_from_buffer(&body, "").unwrap();
    let resized = ops::resize(&image, 0.5).unwrap();
    let options = ops::JpegsaveBufferOptions {
        q: 70,
        background: vec![255.0],
        strip: true,
        optimize_coding: true,
        optimize_scans: true,
        interlace: true,
        ..ops::JpegsaveBufferOptions::default()
    };
    match ops::jpegsave_buffer_with_opts(&resized, &options) {
        Err(_) => println!("error: {}", img.vips_app.error_buffer().unwrap()),
        Ok(_) => (),
    }

I get the same no matter where to save to a file or to a buffer. I also tried different propertiy: Auto, On, Off, Last. vips version vips-8.9.1

whiskeycola commented 2 years ago

sorry, libvips 8.10 worked