From: Bernie Innocenti Date: Sun, 14 Oct 2018 16:17:19 +0000 (+0900) Subject: Update to image 0.20 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=7b99fbed004ff914c33c2762c8b40c32d7b3a557;p=mandelwow.git Update to image 0.20 --- diff --git a/Cargo.toml b/Cargo.toml index 5d8d385..c64b1f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ opt-level = 3 cgmath = "*" glium = "0.22" glutin = "0.18" -image = { version = "0.18", features = ["png_codec"], optional = true } +image = { version = "0.20", features = ["png_codec"], optional = true } libxm = "1.0.0" rust-rocket = { path = "rust-rocket", optional = true } rand = "*" diff --git a/lib.rs b/lib.rs index 21e7a4c..3ec2b55 100644 --- a/lib.rs +++ b/lib.rs @@ -29,7 +29,7 @@ pub fn screenshot(display : &glium::Display) { let image = image::DynamicImage::ImageRgba8(image).flipv().to_rgb(); let image = image::DynamicImage::ImageRgb8(image); let mut output = std::fs::File::create(&std::path::Path::new("screenshot.png")).unwrap(); - image.save(&mut output, image::ImageFormat::PNG).unwrap(); + image.write_to(&mut output, image::ImageFormat::PNG).unwrap(); } #[cfg(not(feature = "image"))]