Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use FIM to view images under Linux

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use FIM to view images under Linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Use FIM to display the image in the terminal

FIM means Fbi IMproved. For those who don't know, Fbi refers to the frame buffer imageviewer in Linux. It uses the system's frame buffer to display images directly from the command line. By default, it can display bmp, gif, jpeg, PhotoCD, png, ppm, tiff and xwd with terminals. For other formats, it attempts to use the transformation of ImageMagick.

Based on Fbi, FIM is a highly customizable and scripted image browser that is ideal for users using software such as Vim text editors or Mutt. It displays the image in full screen and can be controlled by keyboard shortcuts (such as resizing, flipping, zooming). Unlike Fbi, FIM is generic: it can open many file formats and display pictures in the following video modes:

Using Linux framebuffer device, rendering graphically under X / Xorg, using SDL library, rendering graphically under X / Xorg, using Imlib2 library, rendering graphically. Use the AAlib library to render as ASCII character drawings in any text console

FIM is completely free and open source.

Install FIM inside

DEB-based systems, such as Ubuntu and Linux Mint, can obtain FIM image viewers from the default repository. Therefore, you can install fbi using the following command:

$sudo apt-get install fim

If it does not include FIM in the repository of the Linux distribution you are using, you can download the source code for compilation and installation, as shown below.

Wget http://download.savannah.nongnu.org/releases/fbi-improved/fim-0.6-trunk.tar.gzwget http://download.savannah.nongnu.org/releases/fbi-improved/fim-0.6-trunk.tar.gz.siggpg-- search 'dezperado autistici org'# follow the instructions on the screen Import key gpg from the key server-- verify fim-0.6-trunk.tar.gz.sigtar xzf fim-0.6-trunk.tar.gzcd fim-0.6-trunk./configure-- help=short# read. / configure-- output of help=short: you can add the option in. / configure. / configuremakesu-c "make install" FIM usage

After the installation is complete, you can use the following command to "automatically zoom" the displayed image:

$fim-a dog.jpg

Here is a sample output of my Ubuntu host.

As you can see in the screenshot above, FIM does not use any external GUI image browsers. Instead, it uses our system's frame buffer to display images.

If there are multiple .jpg files in the current directory, you can use wildcards to open all the files, as shown below.

$fim-a * .jpg

To open all images in the directory, such as Pictures, run:

$fim Pictures/

We can also recursively open the images in the folder and its subfolders, and then sort the list as follows.

$fim-R Pictures/-- sort to render images in ASCII format, you can use the-t flag. $fim-t dog.jpg

To exit Fim, press ESC or Q.

Keyboard shortcuts

You can use various keyboard shortcuts to manage images. For example, to load the next image and the previous image, press PgUp / PgDown. To zoom in or out exponentially, use the + /-key. The following are common buttons for controlling images in FIM.

PageUp / Down: previous / next picture + / -: zoom in / out a: auto zoom w: adaptive width h: adaptive height j / k: translation / upward f / m: flip / mirror r / R: rotate (clockwise / counterclockwise) ESC / Q: exit

For complete details, see the man pages.

The above $man fim is all the contents of the article "how to use FIM to view images under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report