cursive-image 0.0.6

Image view for the Cursive TUI library
Documentation
use {
    cursive::{views::*, *},
    cursive_image::*,
};

const FILE: &str = "assets/media/linux.gif";

fn main() {
    let mut cursive = default();

    cursive.add_layer(Panel::new(ImageView::default().with_image(
        // GIFs will always be RGBA
        Image::new_stream_from_gif_file(FILE).expect("new_stream_from_gif_file"),
    )));

    cursive.add_global_callback('q', |cursive| cursive.quit());

    cursive.run();
}