1

有没有办法使用 imagemagick 将图像的大小调整为比原始图像小 10 像素,但不知道原始图像大小?

我知道对于 100x100 的图像

convert input.png -resize 90x90! +repage output.png

可以解决问题,但我想用类似的东西删除 90x90 部分

convert input.png -resize -10x-10! +repage output.png

以便它可以处理具有其他尺寸的图像。

4

1 回答 1

0

尝试使用类似的子调用

identify -format "%[fx:w]x%[fx:h]" image.jpg
于 2014-07-10T10:21:36.393 回答