【发布时间】:2019-10-25 15:38:48
【问题描述】:
我想使用 ImageMagick 调整一批 Image 的大小。
我使用了在 stackOverflow 上找到的 this command。
同一级有两个目录
- "img_resize" 我想在其中放置调整大小的图像。
- “image_models”,其中有我的图像。
我用过:
magick mogrify -path "img_resize" -resize 512x512 -gravity Center -extent 512x512 "image_models"
得到:
mogrify: unable to open image 'img_resize': Permission denied @ error/blob.c/OpenBlob/3497.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/556.
我试过不使用两个目录:
cd image_models
magick mogrify -resize 512x512 -gravity Center -extent 512x512
它不显示错误;但还是什么都没做。
因此,“转换”命令运行良好。问题来自 mogrify。
我使用的是 Windows 10。我使用终端,终端以管理员身份运行。
我也尝试使用 ./dir 而不是“dir”
提前致谢。
【问题讨论】:
-
删除第一个命令中所有不必要的双引号并将最后一个参数更改为
image_models\*
标签: image powershell imagemagick image-manipulation imagemagick-convert