你可以使用以下命令获取图像文件的像素尺寸。在此示例中,plot.png 是你要检查的图像文件名。
image_size.sh
identify -format "%wx%h\n" plot.png示例输出:
image_size_output.txt
1550x1037如果不是图像文件的示例输出
image_size_error.txt
identify-im6.q16: no decode delegate for this image format `PY' @ error/constitute.c/ReadImage/580.