Merge pull request #4 from luxedo/main

Rename write_jpeg argument "compression" to "quality"
main
Julius Riegel 1 year ago committed by GitHub
commit 90958c54e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,9 +51,9 @@ impl Thumbnail {
} }
/// Writes the bytes of the image in a jpeg format /// Writes the bytes of the image in a jpeg format
pub fn write_jpeg<W: Write + Seek>(self, writer: &mut W, compression: u8) -> ThumbResult<()> { pub fn write_jpeg<W: Write + Seek>(self, writer: &mut W, quality: u8) -> ThumbResult<()> {
let image = DynamicImage::ImageRgb8(self.inner.into_rgb8()); let image = DynamicImage::ImageRgb8(self.inner.into_rgb8());
image.write_to(writer, ImageOutputFormat::Jpeg(compression))?; image.write_to(writer, ImageOutputFormat::Jpeg(quality))?;
Ok(()) Ok(())
} }

Loading…
Cancel
Save