/termimgview

A terminal image viewer utility tool with lots of customization

Primary LanguageRust

Terminal Image Viewer

This is a simple image viewer for the terminal. It is written in Rust and uses crossterm, image, and clap.
Inspiration and alternatives: tiv, timg, termimage, imgcat, viu, or pixterm.

Installation

> git clone https://github.com/WilliamRagstad/termimgview.git
> cd termimgview
> cargo install --path .

Usage

Usage: termimgview [OPTIONS] <FILE>

Arguments:
  <FILE>  Path to the image file to be displayed

Options:
  -m, --shade-method <SHADE_METHOD>                Shading method [default: blocks]
  -s, --scale <SCALE>                              The scale of the image [default: 1]
  -g, --grayscale                                  Grayscale image?
  -i, --invert                                     Invert image?
  -a, --adjust-aspect-ratio <ADJUST_ASPECT_RATIO>  Adjust aspect ratio [default: 0.47058824]
  -b, --brightness <BRIGHTNESS>                    Brightness of the image [default: 1]
  -r, --hue-rotation <HUE_ROTATION>                Rotate the hue of the image [default: 0]
  -h, --help                                       Print help
  -V, --version                                    Print version

Shade methods:
 - ascii: ' .-:=+*#%@'
 - blocks: ' ░▒▓█'
 - custom: 'your characters here'

Example usage:
 - termimgview .\tests\1.png -s 0.15 -m " -:!|#@@@@@@@@"
 - termimgview .\tests\2.jpg -s 1 -i -m ascii

Examples

1.png -s 0.5 -m half 2.jpg -s 0.5 -m ascii -i 3.png -s 0.5 -g
1.png 1.png 1.png