3

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

4

1 回答 1

1

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:
于 2014-04-14T11:04:40.583 回答