Viuwa is a simple terminal ANSI image viewer trying to maintain bare-minimum compatibility with the wasm32-wasi target.
We use the image, clap, and the crossterm crates for cli tooling, image manipulation, and UNIX/Windows platform specific tui tooling.
It uses almost exclusively ANSI escape codes to display images in the terminal.
Kitty, Sixel, and Iterm2 protocols are not supported, There are better tools such as viu or timg for cross-protocol terminal image viewing, please go and give them love.
Pull requests implementing different protocols are allowed as long as they don't break wasm32-wasi+ANSI compatibility.
bash
cargo install viuwa
bash
viuwa [image]
bash
viuwa [image] --inline
bash
viuwa --help
VIUWA_INLINE
: If set to true
, viuwa will print the image directly to stdout instead of using the tui.VIUWA_SIZE
: When inline is set, this variable will be used to set the size of the output ANSI image. e.g. VIUWA_SIZE=100x100
will set the output image to 100x100 characters. (if you have $COLUMNS or $LINES set, you can also set VIUWA_SIZE="${COLUMNS}x${LINES}")VIUWA_FILTER
: Set the filter type to use when resizing the image. Possible values are Nearest
, Triangle
, CatmullRom
, Gaussian
, Lanczos3
. Defaults to Nearest
.VIUWA_COLOR
: Set the color type of the output ansi image. Possible values are Truecolor
, 256
, Grey
. Defaults to Truecolor
.VIUWA_QUIET
: If set to true
, viuwa will not print any messages or warnings.Not yet implemented, but will be implemented in the future.
This project is licensed under MIT or Apache-2.0.
See CONTRIBUTING.md.