ImageMagick 批量处理图片脚本

例如:

(1) 批量生成当前目录下的jpg文件的 25%x25%的缩略图:

for /f %%i in ('dir /b *.jpg') do convert -sample 25%%x25%% %%i %%i-x.jpg

(2) 批量生成当前目录下的jpg文件的 120x120(保持图片比例)的缩略图:

for /f %%i in ('dir /b *.jpg') do convert -resize "120x120>" %%i %%i_120x120.jpg
原文地址:https://www.cnblogs.com/kylindai/p/3083757.html