相关疑难解决方法(0)

ImageMagick可以返回图像大小吗?

我从命令行使用ImageMagick来调整图像大小:

convert -size 320x240 image.jpg
Run Code Online (Sandbox Code Playgroud)

但是,我不知道如何确定最终图像的大小.由于这是比例图像比例,因此新图像很可能是100x240或320x90(不是320x240).

我可以调用'convert'命令来调整图像大小并返回新的图像尺寸吗?例如,伪代码:

convert -size 320x240 -return_new_image_dimension image.jpg   // returns the new resized image dimensions
Run Code Online (Sandbox Code Playgroud)

unix command-line image imagemagick image-processing

33
推荐指数
3
解决办法
2万
查看次数