Viu in Termux | Command-Line Image Viewer

Viu is a command-line image viewer that lets you display images inside the terminal. It supports different image formats and provides options to resize images, change their position, display GIFs, and view images from directories. You can use simple commands to display and control images from your terminal.

Here’s what you can do with viu tool:

  • Display images in the terminal.
  • Resize images by width or height.
  • Change the image position using X and Y offsets.
  • Display images from directories recursively.
  • Display transparent images.
  • View GIF animations.
  • Control GIF playback speed.
  • Display only the first frame of a GIF.

Install Viu in Termux

You can easily install Viu on Termux using the following commands below. Just copy and run the command in your terminal.

First, update and upgrade the packages:

pkg update && pkg upgrade -y

Install Viu:

pkg install viu -y

Once the installation is complete, Viu is ready to use in your Termux terminal.

Use Viu in Termux

Viu provides several options for displaying and controlling images in Termux.

Navigate to the folder where your images are stored:

cd folder_name

For Android internal storage, first allow Termux storage access:

termux-setup-storage

Then navigate to your image folder:

cd folder_name

Display an image:

viu image.jpg

Replace image.jpg with the image file name that you want to display.

Display multiple images:

viu image1.jpg image2.png

Display all supported images from a directory:

viu *.jpg

Resize an image to a specific width:

viu -w 50 image.jpg

Resize an image to a specific height:

viu -h 20 image.jpg

Set the X offset:

viu -x 10 image.jpg

Set the Y offset:

viu -y 5 image.jpg

Use absolute X and Y offsets:

viu -a -x 10 -y 5 image.jpg

Recursively display images from directories:

viu -r images/

Force block output:

viu -b image.jpg

Show the file name before the image:

viu -n image.jpg

Show the file name after the image:

viu -c image.jpg

Display transparent images with a transparent background:

viu -t image.png

Play a GIF at a specific frame rate:

viu -f 10 animation.gif

Play a GIF only once:

viu -1 animation.gif

Show only the first frame of a GIF:

viu -s animation.gif

Read an image from standard input:

cat image.jpg | viu -

Show the help menu:

viu -H

Show the installed version:

viu -V

These commands let you control how images are displayed, including their size, position, animation, transparency, and output format.

End Note

Viu is a useful command-line image viewer for viewing images in the terminal without using a graphical image viewer. It also provides options for resizing images, displaying GIFs, changing image positions, and viewing multiple images from directories.

SHARE THIS POST: