Crate ueberzug[][src]

Expand description

Ueberzug-rs

Ueberzug-rs This project provides simple bindings to that ueberzug to draw images in the terminal.

This code was inspired from the termusic to convert their specilized approach to a more general one.

Examples

this example will draw image for 2 seconds, erase the image and wait 1 second before exiting the program.

use std::thread::sleep;
use std::time::Duration;
use ueberzug::{UeConf,Scalers};

let a = ueberzug::Ueberzug::new();
// Draw image
// See UeConf for more details
a.draw(&UeConf {
    identifier: "crab",
    path: "ferris.png",
    x: 10,
    y: 2,
    width: Some(10),
    height: Some(10),
    scaler: Some(Scalers::FitContain),
    ..Default::default()
});
sleep(Duration::from_secs(2));
// Only identifier needed to clear image
a.clear("crab");
sleep(Duration::from_secs(1));

Structs

The configuration struct for the image drawing.

Main Ueberzug Struct

Enums

Action enum for the json value

Scalers that can be applied to the image and are supported by ueberzug