#[cfg(feature = "image")]
pub fn screenshot(display : &glium::Display) {
- let image: glium::texture::RawImage2d<'_, u8> = display.read_front_buffer();
+ let image: glium::texture::RawImage2d<'_, u8> = display.read_front_buffer().unwrap();
let image = image::ImageBuffer::from_raw(image.width, image.height, image.data.into_owned()).unwrap();
let image = image::DynamicImage::ImageRgba8(image).flipv().to_rgb();
let image = image::DynamicImage::ImageRgb8(image);
#[cfg(feature = "image")]
fn c64_font() -> (u32, u32, Vec<u8>) {
- use image;
let image = image::load_from_memory_with_format(
&include_bytes!("textures/c64-font.png")[..],
image::PNG,