用ImageMagick批处理批量压缩图片
作者: 发布时间:2020-03-11 来源:佚名
点击数:
1.首先到 http://www.imagemagick.org这个网站上下载ImageMagick的安装包
下载地址在:https://imagemagick.org/script/download.php
2.安装ImageMagick
3.在安装目录中找一convert.exe这个执行文件,复制到你要执行批处理的位置
4.写批处理
@echo off
:: 大图
copy "Ipad\\大图\\底.png" "..\\Ipad\\ui_back_1.png" /y
copy "Ipad\\大图\\框2.png" "..\\Ipad\\ui_back_3.png" /y
copy "Ipad\\大图\\框a.png" "..\\Ipad\\ui_panel_1.png" /y
copy "Ipad\\大图\\框b.png" "..\\Ipad\\ui_panel_2.png" /y
copy "Ipad\\大图\\框1.png" "..\\Ipad\\ui_panel_3.png" /y
copy "Ipad\\大图\\框d.png" "..\\Ipad\\ui_panel_4.png" /y
copy "Ipad\\大图\\面4.png" "..\\Ipad\\ui_panel_5.png" /y
copy "Ipad\\大图\\框f.png" "..\\Ipad\\ui_panel_6.png" /y
copy "Ipad\\大图\\框g.png" "..\\Ipad\\ui_panel_7.png" /y
copy "Ipad\\大图\\框h.png" "..\\Ipad\\ui_panel_8.png" /y
copy "Ipad\\大图\\框i.png" "..\\Ipad\\ui_panel_9.png" /y
copy "Ipad\\大图\\面3.png" "..\\Ipad\\ui_panel_10.png" /y
copy "Ipad\\大图\\技能面板.png" "..\\Ipad\\ui_panel_11.png" /y
copy "Ipad\\大图\\面4.png" "..\\Ipad\\tmp.png" /y
copy "Ipad\\小图\\图标.png" "..\\Ipad\\icon_2.png" /y
copy "Ipad\\小图\\NEW.png" "..\\Ipad\\icon_1.png" /y
copy "Ipad\\小图\\VS.png" "..\\Ipad\\icon_txt_3.png" /y
copy "Ipad\\小图\\倒计时底板.png" "..\\Ipad\\icon_pane_1.png" /y
copy "Ipad\\小图\\字1.png" "..\\Ipad\\icon_txt_1.png" /y
copy "Ipad\\小图\\字2.png" "..\\Ipad\\icon_txt_2.png" /y
copy "Ipad\\小图\\开始按钮.png" "..\\Ipad\\icon_btn_12.png" /y
copy "Ipad\\小图\\按钮.png" "..\\Ipad\\icon_btn_1.png" /y
copy "Ipad\\小图\\按钮1.png" "..\\Ipad\\icon_btn_2.png" /y
copy "Ipad\\小图\\按钮2.png" "..\\Ipad\\icon_btn_3.png" /y
copy "Ipad\\小图\\按钮3.png" "..\\Ipad\\icon_btn_4.png" /y
copy "Ipad\\小图\\按钮4.png" "..\\Ipad\\icon_btn_5.png" /y
copy "Ipad\\小图\\按钮5.png" "..\\Ipad\\icon_btn_6.png" /y
copy "Ipad\\小图\\按钮6.png" "..\\Ipad\\icon_btn_7.png" /y
copy "Ipad\\小图\\按钮7.png" "..\\Ipad\\icon_btn_8.png" /y
copy "Ipad\\小图\\按钮8.png" "..\\Ipad\\icon_btn_9.png" /y
copy "Ipad\\小图\\按钮9.png" "..\\Ipad\\icon_btn_10.png" /y
copy "Ipad\\小图\\按钮a.png" "..\\Ipad\\icon_btn_11.png" /y
copy "Ipad\\小图\\排名底板.png" "..\\Ipad\\icon_pane_3.png" /y
copy "Ipad\\小图\\方向1.png" "..\\Ipad\\icon_dir_1.png" /y
copy "Ipad\\小图\\方向2.png" "..\\Ipad\\icon_dir_2.png" /y
copy "Ipad\\小图\\方向3.png" "..\\Ipad\\icon_dir_3.png" /y
copy "Ipad\\小图\\方向4.png" "..\\Ipad\\icon_dir_4.png" /y
copy "Ipad\\小图\\条.png" "..\\Ipad\\icon_progress_3.png" /y
copy "Ipad\\小图\\条2.png" "..\\Ipad\\icon_progress_2.png" /y
copy "Ipad\\小图\\条3.png" "..\\Ipad\\icon_progress_back_1.png" /y
copy "Ipad\\小图\\条4.png" "..\\Ipad\\icon_progress_1.png" /y
copy "Ipad\\小图\\条5.png" "..\\Ipad\\icon_lbl_back_1.png" /y
copy "Ipad\\小图\\框c.png" "..\\Ipad\\icon_slot_2.png" /y
copy "Ipad\\小图\\框j.png" "..\\Ipad\\icon_slot_3.png" /y
copy "Ipad\\小图\\洞察装饰放大镜.png" "..\\Ipad\\icon_btn_19.png" /y
copy "Ipad\\小图\\点1.png" "..\\Ipad\\icon_btn_15.png" /y
copy "Ipad\\小图\\点2.png" "..\\Ipad\\icon_btn_16.png" /y
copy "Ipad\\小图\\箭1.png" "..\\Ipad\\icon_btn_17.png" /y
copy "Ipad\\小图\\箭2.png" "..\\Ipad\\icon_btn_18.png" /y
copy "Ipad\\小图\\箭3.png" "..\\Ipad\\icon_btn_13.png" /y
copy "Ipad\\小图\\箭4.png" "..\\Ipad\\icon_btn_14.png" /y
copy "Ipad\\小图\\胜率底板.png" "..\\Ipad\\icon_pane_4.png" /y
copy "Ipad\\小图\\道具框.png" "..\\Ipad\\icon_slot_1.png" /y
copy "Ipad\\小图\\面1.png" "..\\Ipad\\icon_pane_2.png" /y
dir /b /a ..\\IPAD\\*.png >> tmp.txt
for /f %%i in (tmp.txt) do (
@echo 正在将'%%i'压缩到Iphone目录
convert ..\\IPAD\\%%i -resize "50%%x50%%" "..\\Iphone\\%%i"
)
del /s /q /f tmp.txt
pause