ajrcarey / pdfium-render

A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project.
https://crates.io/crates/pdfium-render
Other
364 stars 59 forks source link

fix tests: use rgb8 instead of rgba8 for saving JPEG #143

Closed DorianRudolph closed 5 months ago

DorianRudolph commented 6 months ago

The save_with_format call failed with Unsupported(UnsupportedError { format: Exact(Jpeg), kind: Color(Rgba8) }), since JPEG does not have an alpha channel.

ajrcarey commented 5 months ago

Hi @DorianRudolph , thank you for making these changes. I believe they're necessary to support the image crate v0.25.0 and later. I have some concerns that this may break compatibility with image <= 0.24.x but I will look into that separately.