3 releases
0.2.2 | Jul 24, 2022 |
---|---|
0.2.1 | Jul 3, 2022 |
0.2.0 | May 10, 2021 |
#787 in Command-line interface
359 downloads per month
Used in 2 crates
12KB
193 lines
An image display widget for tui-rs
This widget displays an image using ASCII art.
Beware: This is work in progress and the API is very likely to change.
There are currently two modes:
- Luma: Single color display using block intensity
- RGB: Relies on a RGB compatible terminal to show filled blocks with full RGB color.
You can either provide an image using Image::with_img
which will be resized to fit in the container, or you can provide a function with Image::with_img_fn
which receives the container size and returns an image of the correct dimensions.
At the moment it only accepts RGBA images and will halve the vertical resolution since terminal characters are roughly twice as high as wide.
Options
block
: Use this block instead of filling the containercolor_mode
:ColorMode::Luma
orColorMode::Rgb
alignment
: The horizontal alignment of the image within the containerstyle
: The Style used to composite the image against the background
/ Recent activity
Dependencies
~8–19MB
~171K SLoC