GNU/Linux 下EXIF相关小工具
来自Jack's Lab
(版本间的差异)
(以“== exiftags == 显示 JPG 图像内 EXIF 信息的工具: <pre> $ apt-get install exiftags # 显示EXIF中相机相关参数 $ exiftags -c 0.jpg Camera-Specifi...”为内容创建页面) |
|||
第4行: | 第4行: | ||
<pre> | <pre> | ||
− | $ apt-get install exiftags | + | $ sudo apt-get install exiftags |
# 显示EXIF中相机相关参数 | # 显示EXIF中相机相关参数 | ||
第19行: | 第19行: | ||
$ exiftags -a 0.jpg | $ exiftags -a 0.jpg | ||
</pre> | </pre> | ||
+ | |||
+ | <br><br> | ||
+ | |||
+ | == ImageMagick == | ||
+ | |||
+ | 强大的命令行图像处理包,内含 convert/identify/display/animate 等强大工具 | ||
+ | |||
+ | <pre> | ||
+ | $ sudo apt-get install imagemagick | ||
+ | |||
+ | # 获取图像拍照时相机的旋转方向 | ||
+ | $ identify -verbose orient-8.jpg | grep Exif:Orientation | ||
+ | Exif:Orientation: 08 | ||
+ | </pre> | ||
+ | |||
+ | Orientation 的值有 1 - 8 个整数值: | ||
+ | |||
+ | <pre> | ||
+ | Value | 0th Row | 0th Column | ||
+ | 1 top left side | ||
+ | 2 top right side | ||
+ | 3 bottom right side | ||
+ | 4 bottom left side | ||
+ | 5 left side top | ||
+ | 6 right side top | ||
+ | 7 right side bottom | ||
+ | 8 left side bottom | ||
+ | </pre> | ||
+ | |||
+ | 比如值为 8 时,表示图片第 0 行是当时相机屏幕的最左边;图片第 0 列是相机屏幕的底边。因此这个图需要逆时针转 90度 | ||
+ | |||
+ | 用 exiftags 的输出: | ||
+ | |||
+ | <pre> | ||
+ | $ exiftags orient-8.jpg | grep Orientation | ||
+ | Image Orientation: Left-Hand, Bottom | ||
+ | </pre> | ||
+ | |||
+ | <br><br> |
2013年12月31日 (二) 14:56的版本
1 exiftags
显示 JPG 图像内 EXIF 信息的工具:
$ sudo apt-get install exiftags # 显示EXIF中相机相关参数 $ exiftags -c 0.jpg Camera-Specific Properties: Equipment Make: SONY Camera Model: NEX-5R Camera Software: Adobe Photoshop Lightroom 5.0 (Macintosh) Maximum Lens Aperture: f/1.8 Focal Length (35mm Equiv): 75 mm # 显示EXIF中所有参数 $ exiftags -a 0.jpg
2 ImageMagick
强大的命令行图像处理包,内含 convert/identify/display/animate 等强大工具
$ sudo apt-get install imagemagick # 获取图像拍照时相机的旋转方向 $ identify -verbose orient-8.jpg | grep Exif:Orientation Exif:Orientation: 08
Orientation 的值有 1 - 8 个整数值:
Value | 0th Row | 0th Column 1 top left side 2 top right side 3 bottom right side 4 bottom left side 5 left side top 6 right side top 7 right side bottom 8 left side bottom
比如值为 8 时,表示图片第 0 行是当时相机屏幕的最左边;图片第 0 列是相机屏幕的底边。因此这个图需要逆时针转 90度
用 exiftags 的输出:
$ exiftags orient-8.jpg | grep Orientation Image Orientation: Left-Hand, Bottom