「Linux」- 图片操作

图片查看应用

4 lightweight image viewers for the Linux desktop

Image Viewer

Any app on Ubuntu to open and/or convert HEIF pictures (.HEIC, High Efficiency Image File Format)?

The GNOME image viewer.

安装 apt install heif-gdk-pixbuf 之后,能够查看 HEIF 文件。

Shotwell

Apps/Shotwell – GNOME Wiki!

能够对图片进行编辑;

GPicView

Lightweight image viewer from LXDE project
http://wiki.lxde.org/en/GPicView

Mirage

显示文件夹中图片缩略列表、图片缩放、镜像图片、大小调整、剪裁;

Nomacs

功能强大,支持图片简单编辑,QT 界面;

Ristretto

显示文件夹中图片缩略列表、幻灯播放、图片缩放、镜像图片;

简单轻量工具

Feh,feh 命令能够用来显示图片;

display,是在 ImageMagic 中的命令,能够用来查看图片

ExifTool

Homepage: https://sno.phy.queensu.ca/~phil/exiftool
Wikipedia / ExifTool: https://en.wikipedia.org/wiki/ExifTool

Exiv2

Homepage: http://www.exiv2.org

GIMP

GIPHY

https://giphy.com/

GIF 图片检索站点

常用命令

在目录中,找到全部图片

ImageMagick – Format and Print Image Properties
command line – Find images in a Linux directory based on their resolution – Ask Ubuntu

通过 identify 命令,以获取图片格式:

# 如下命令,搜索比较宽泛:只要 identify 能够识别,则视为图片
find ./ -type f -print0 | xargs -0 -i bash -c 'test -n "$(identify -format "%m" "{}" 2>/dev/null)" && echo "{}"'

# 如下命令,缩小搜索范围(为了代码的可读性与美观,因此牺牲性能,但问题不大)
find ./ -type f -print0 | xargs -0 -i bash -c '
file_fmt="$(identify -format "%m" "{}" 2>/dev/null)"
test "${file_fmt}" = "PNG"  && echo "{}"
test "${file_fmt}" = "JPEG" && echo "{}"
'