How to View Images at the Linux Command Line

There are many GUI applications for viewing images in Linux, but this can be cumbersome for those who often work from the command line. What I'm going to introduce today are 3 useful CLI image viewers to view images on the terminal, so that those who use the CLI can work more efficiently.

1. END

FIM is the acronym for Fbi IMproved, which means Fbi improved version.

Some people may not know Fbi, the full name of Fbi is linux framebuffer imageviewer. It uses the system's framebuffer to display images directly from the command line. The default image formats it displays are bmp, gif, jpeg, PhotoCD, png, ppm, tiff and xwd. For other formats, it will try to convert using ImageMagick.

Next, we will briefly introduce its installation and use.

Install FIM

FIM is available in the default repositories on deb based systems (eg Ubuntu, Linux Mint), so these users can install FIM with the apt-get command:

$ sudo apt-get install fim

If you can't install it directly, you may need to go to the "Download and build instructions" section of the official documentation page to download the source code and compile and install it.

Use of FIM

Once installed, you can display images with the "autoscale" option ( -a ) using the command:

$ fim -a dog.jpg

FIM supports opening multiple files at one time. For example, if there are many .jpg files in the current directory, you can use the wildcard * to open these files:

$ fim -a * .jpg

Or, to open all images in a directory, such as Pictures:

$ fim Pictures/
我们还可以递归地打开文件夹及其子文件夹中的图像,然后对列表进行如下排序:
$ fim -R Pictures/ --sort
要以 ASCII 格式呈现图像,可以使用 -t 选项:
$ fim -t dog.jpg

To quit FIM press ESC or q.

Finally, some common shortcut keys for controlling images in FIM are introduced:

  • PageUp/Down: previous image/next image

  • +/-: zoom in/out

  • a: auto zoom

  • w: suitable width

  • h: suitable height

  • j/k: pan down / pan up

  • f/m: Flip/Specular

  • r/R: rotate (clockwise and counterclockwise)

  • ESC /q: quit

To learn more, please refer to its man page:

$ man fim

- END -

If you see this, it means you like this article, please forward and like it . Scan the QR code below or search for " perfect_iscas " on WeChat. After adding friends, you can get 10 sets of programmer full-stack courses + 1000 sets of PPT and resume templates . Private chat with me about the word "join the group " to enter the high-quality exchange group .

Scan the QR code to enter the group↓

Like the article , click to read 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326855700&siteId=291194637
Recommended