更新: Unfortunately 菲姆 has been dropped from the Debian repository and as a result is no longer available in the latest version of 树莓派 . Take a look at How to Display Images 上 树莓派 Command Line with 联邦调查局相反。
如果您使用Pi来使用相机捕获图像,则在不启动桌面环境的情况下显示这些图像会很有用。实现此目的的方法之一是使用名为“fim”.
菲姆 is based 上 an image viewer called “fbi” and stands for “Fbi IMproved”.
注意 : 它使用系统’s的framebuffer可以直接从命令行显示图像。因此,最好将Pi直接连接到显示器和键盘。
Install 菲姆
要安装fim,请使用以下命令:
sudo apt-get update sudo apt-get -y install 菲姆
Use 菲姆
要使用“auto-zoom” option use :
菲姆 -a example.jpg
显示后,您可以使用各种键盘快捷键来操纵图像,例如旋转r / R键:
要显示当前目录中的所有图像,请使用以下命令:
菲姆 -a * .jpg
PageUp / PageDown键可用于循环浏览由“*.jpg” filter.
ASCII艺术
如果您使用“-t”选项,您可以用ASCII字符呈现图像。
要将图像显示为ASCII艺术作品,可以使用:
菲姆 -a -t example.jpg

做还是不做。没有尝试。
好的,所以最后一个的用处不大,但是可以从命令行减轻一些负担!
键盘控制
显示图像时,您可以使用以下键:
PageUp/Down  Prev/Next image +/-  Zoom in/out a Autoscale w Fit to width h Fit to height j/k Pan down/up f/m flip/mirror R/r Rotate 10 degrees CW/CCW ESC/q Quit
5条留言
我错过了您指出fbi的那一部分,所以请忽略我之前的帖子。我在启动时使用以下由rc.local调用的脚本来显示在第一个连接的USB驱动器上找到的所有图像的幻灯片显示。
#Create the mount point if it does not exist
if [ ! -d /mnt/usb ];
then
echo Creating mount point
mkdir -p /mnt/usb
else
echo Found existing mount point
fi
#Mount the device 上 to the mount point.
if [ -b /dev/sda1 ]
then
echo Mounting usb device
mount /dev/sda1 /mnt/usb 2>&1 >/dev/null
fi
#Start the slideshow
if [ "$(ls -A /mnt/usb)" ]
then
echo Starting slideshow
/usr/bin/fbi -m 1280x1024-75 -t 3 -a /mnt/usb/*.JPG
else
echo USB device not found. Resume normal operation
fi
Hi, is there a way to set up a slideshow using 菲姆? Or even set a time limit for 显示 ing a particular pic? Suggestions for accomplishing the same using other packages are also welcome. Thanks.
看起来杰西没有’t (yet?) have 菲姆, any idea where/how to build it from sources? fib is slow and buggy 上 a PiB2 running Jessie….
您可以直接安装“fbi” using “aptitude install 联邦调查局” and use 联邦调查局 for your need 😉
当前(截至2016年6月)Raspbian软件包似乎缺少FIM,并且可以’不能按照本文的建议与apt-get一起安装。