X-Git-Url: https://codewiz.org/gitweb?p=mandelwow.git;a=blobdiff_plain;f=lib.rs;h=3ec2b55117d9850a3dae3a59f122ceba6a32202e;hp=21e7a4cb5da748a70ff29479742999f38d626466;hb=7b99fbed004ff914c33c2762c8b40c32d7b3a557;hpb=dc34aed50b5cb3840468af2591c2a0ea0f8abc29 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"))]