#terminal #image #tui #widget


An image viewer widget for tui-rs

3 releases

0.2.2 Jul 24, 2022
0.2.1 Jul 3, 2022
0.2.0 May 10, 2021

#384 in Command-line interface

Download history 73/week @ 2023-02-03 74/week @ 2023-02-10 87/week @ 2023-02-17 64/week @ 2023-02-24 48/week @ 2023-03-03 60/week @ 2023-03-10 60/week @ 2023-03-17 42/week @ 2023-03-24 49/week @ 2023-03-31 51/week @ 2023-04-07 53/week @ 2023-04-14 46/week @ 2023-04-21 73/week @ 2023-04-28 70/week @ 2023-05-05 56/week @ 2023-05-12 57/week @ 2023-05-19

262 downloads per month
Used in steam-tui

MIT license

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.


  • block: Use this block instead of filling the container
  • color_mode: ColorMode::Luma or ColorMode::Rgb
  • alignment: The horizontal alignment of the image within the container
  • style: The Style used to composite the image against the background

Repography logo / Recent activity Time period

Pull request status graph Top contributors


~244K SLoC