使用ImageMagick检测EXIF方向并旋转图像 [英] Detect EXIF Orientation and Rotate Image using ImageMagick

查看:1229
本文介绍了使用ImageMagick检测EXIF方向并旋转图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

佳能数码单反相机似乎以横向方式保存照片,并使用 exif :: orientation 进行旋转。

Canon DSLRs appear to save photos in landscape orientation and uses exif::orientation to do the rotation.

问题:如何使用imagemagick将图像重新保存到预期的方向,使用exif方向数据,以便不再需要exif数据以正确的方向显示?

Question: How can imagemagick be used to re-save the image into the intended orientation using the exif orientation data such that it no longer requires the exif data to display in the correct orientation?

推荐答案

你可以使用自动定向选项转换为执行此操作。

You could use the auto-orient option of convert to do this.

convert your-image.jpg -auto-orient output.jpg

这篇关于使用ImageMagick检测EXIF方向并旋转图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆