From 4994f7f758baf1a5f1ab4127dab6ece5b2f1a26e Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Amaral Date: Fri, 23 Jun 2023 09:25:33 -0300 Subject: [PATCH] Rename write_jpeg argument "compression" to "quality" --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d72b1f8..40b48fd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,9 +51,9 @@ impl Thumbnail { } /// Writes the bytes of the image in a jpeg format - pub fn write_jpeg(self, writer: &mut W, compression: u8) -> ThumbResult<()> { + pub fn write_jpeg(self, writer: &mut W, quality: u8) -> ThumbResult<()> { let image = DynamicImage::ImageRgb8(self.inner.into_rgb8()); - image.write_to(writer, ImageOutputFormat::Jpeg(compression))?; + image.write_to(writer, ImageOutputFormat::Jpeg(quality))?; Ok(()) }