CMD命令
有latex编译环境,待转化图片文件路径CMD一行命令就可以实现
bmeps -c image.jpg image.eps
批量转化
@echo off
setlocal enabledelayedexpansion
echo Please put the JPG files to be processed under this script directory
echo All outputs are located in ./eps/
echo;
pause
echo Start conversion
echo;
if not exist log\ md log\
if not exist eps\ md eps\
if exist log\list.txt del log\list.txt
dir /a/b *.png > log\list.txt
set /a count = 0
for /f "delims=." %%i in (log\list.txt) do (
if exist %%i.png (
bmeps -c %%i.png eps\%%i.eps
set /a count += 1
)
)
echo After conversion, a total of %count% files were processed
echo;
rd /s/q log
pause
压缩
相关软件安装
链接:https://pan.baidu.com/s/1RJdgMw5ym8u_q6qTIPWwlQ
提取码:qu0o建议默认C盘
指令1:
gswin64 -dBATCH -dNOPAUSE -q -sOutputFile=output.jpg -sDEVICE=jpeg -dJPEGQ=95 -r300x300 -dEPSCrop average_IoU_det_nms_0.eps
指令2:
magick output.jpg eps2:output.eps
.bat脚本文件
将上述指令写成.bat脚本文件,直接脚本直接扔到根目录运行,就可以替换所有eps文件了
@echo off
for /r %%i in (*.eps) do (
gswin64 -dBATCH -dNOPAUSE -q -sOutputFile=%%i.jpg -sDEVICE=jpeg -dJPEGQ=60 -r300x300 -dEPSCrop %%i
magick %%i.jpg eps2:%%i
)
pause
相关链接