#image #terminal #graphics

ueberzug

Unofficial Ueberzug bindings to use in rust projects

1 unstable release

0.1.0 Dec 26, 2021

#880 in Graphics APIs

Download history 5/week @ 2024-11-13 8/week @ 2024-11-20 15/week @ 2024-11-27 18/week @ 2024-12-04 33/week @ 2024-12-11 5/week @ 2024-12-18 4/week @ 2025-01-01 3/week @ 2025-01-08 9/week @ 2025-01-15 18/week @ 2025-01-22 5/week @ 2025-01-29 35/week @ 2025-02-05 23/week @ 2025-02-12 12/week @ 2025-02-19 9/week @ 2025-02-26

80 downloads per month
Used in 4 crates (3 directly)

MIT license

11KB
187 lines

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.

Note: This project needs ueberzug to be installed and be in the system path.

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));

No runtime deps