diff --git a/Cargo.toml b/Cargo.toml index a10cba4..13ab2ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "image_thumbs" -version = "0.2.1" +version = "0.2.2" edition = "2021" repository = "https://github.com/tweedegolf/image-thumbs" keywords = ["GCS", "image", "thumbnails"] @@ -18,7 +18,7 @@ name = "basic" [dependencies] object_store = { version = "0.9", features = ["gcp"] } -image = { version = "0.24", default-features = false, features = ["png", "jpeg"] } +image = { version = "0.25", default-features = false, features = ["png", "jpeg"] } config = { version = "0.14", default-features = false, features = ["yaml"] } thiserror = "1.0" serde = { version = "1.0", features = ["derive"] } @@ -26,4 +26,4 @@ tokio = { version = "1.32", features = ["full"] } bytes = "1.5" futures = "0.3" mime = "0.3" -sequential-test = "0.2" \ No newline at end of file +sequential-test = "0.2" diff --git a/src/image.rs b/src/image.rs index 6b9ec81..93da1a4 100644 --- a/src/image.rs +++ b/src/image.rs @@ -55,11 +55,11 @@ impl ImageThumbs { }; match format { - ImageFormat::Png => { + ImageFormat::Jpeg => { let encoder = JpegEncoder::new_with_quality(writer, params.quality); thumbnail.write_with_encoder(encoder)?; } - ImageFormat::Jpeg => { + ImageFormat::Png => { let encoder = PngEncoder::new_with_quality( writer, CompressionType::default(),