Rename write_jpeg argument "compression" to "quality"

pull/4/head
Luiz Eduardo Amaral 1 year ago
parent 9ad9ccf778
commit 4994f7f758

@ -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