从终端方便地显示图像(PNM、PNG、JPEG等)。
项目描述
image-view使用pygame显示图像(PNM、PNG、JPEG等)。
主要动机是支持在OS X上查看PNM图像。对于常见图像类型,预览效果很好。对于PNM图像,Xee大部分工作正常,但它在从命令行显示图像子集时无法正常工作。如果有从相机捕获的一系列图像(captured-00*.pgm),并且您想显示其中的一部分,这很重要。
安装
首先以某种方式安装pygame依赖项。一个选项是使用这个分支,它在OS X上避免了X11
$ pip install --upgrade git+https://github.com/myint/pygame
然后安装实际程序
$ pip install --upgrade image-view
用法
典型用法
$ image-view captured-070*.pgm
使用左右箭头键在图像之间导航。
使用+/-键缩放图像。按0重置。
选项
usage: image-view [-h] [--colorize] [--little-endian] [--version] files [files ...] positional arguments: files paths to images optional arguments: -h, --help show this help message and exit --colorize color 16-bit PGM images with a rainbow gradient --little-endian interpret 16-bit PGM images as little endian; this is the opposite of Netpbm (and ImageMagick) --version show program's version number and exit