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 = "*"
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"))]