【发布时间】:2017-12-04 00:50:12
【问题描述】:
我想知道下面的 Imagemagick 命令到底做了什么:
转换 input.jpg -auto-orient out.jpg
它只是读取和更新 exif 吗? 还是它也会旋转图像中存在的像素?
【问题讨论】:
标签: imagemagick jpeg imagemagick-convert image-rotation uiimageorientation
我想知道下面的 Imagemagick 命令到底做了什么:
转换 input.jpg -auto-orient out.jpg
它只是读取和更新 exif 吗? 还是它也会旋转图像中存在的像素?
【问题讨论】:
标签: imagemagick jpeg imagemagick-convert image-rotation uiimageorientation
从我的相机拍摄一张垂直照片(Exif 数据中的方向):
IM identify 说:
Test.jpg JPEG 5472x3648 5472x3648+0+0 8-bit sRGB 6.907MB 0.000u 0:00.000
Linux file 命令说(摘录):
Test.jpg: JPEG image data, Exif standard: [... orientation=lower-left, ... ], ... , 5472x3648, ...
转换后,
IM identify 说:
Test-out.jpg JPEG 3648x5472 3648x5472+0+0 8-bit sRGB 7.082MB 0.000u 0:00.010
还有file:
Test-out.jpg: JPEG image data, Exif Standard: [... orientation=upper-left, ...], ... , 3648x5472, ...
很明显,JPEG 被重写为具有通常的方向并与不处理 EXIF 方向的 JPEG 阅读器兼容。
【讨论】: