我知道 convert 可以使用 -auto-orient 调整图像大小时正确旋转图像的参数,但我可以使用某种方式获取图像相对于 EXIF 方向的旋转大小吗 identify?

有帮助吗?

解决方案

识别不支持-auto-orient选项,因此您必须使用convert命令。使用下面的代码,您可以获得图像的尺寸:

// If you only need the width and height
convert -auto-orient image.jpg -format %wx%h info:

// If you want the same result as identify
convert -auto-orient image.jpg info:
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top