Update to image 0.20
[mandelwow.git] / lib.rs
diff --git a/lib.rs b/lib.rs
index 21e7a4cb5da748a70ff29479742999f38d626466..3ec2b55117d9850a3dae3a59f122ceba6a32202e 100644 (file)
--- 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"))]