echo off & title 批量获取图片分辨率和像素尺寸 By 依梦琴瑶cd /d %~dp0setlocal enabledelayedexpansionset Pic=*.jp*g,*.png,*.bmp,*.gifcall :CreatVBS(for %%a in (%Pic%) do ( for /f "tokens=1-3 delims=x" %%b in ('cscript -nologo "%tmp%\GetImgInfo.vbs" "%%~sa"') do ( for /f "tokens=1,2 delims=." %%e in ("%%~d") do ( set "dpi=%%~e" set "Deci=%%~f" set "Deci=!Deci:~,1!" ) if defined Deci ( if !Deci! gtr 4 set /a dpi+=1 set "Deci=" ) echo %%~nxa 像素: %%~bx%%~c 分辨率: !dpi! dpi )))>图片信息.txtpauseexit:CreatVBS(echo '获取图片文件的宽、高、DPI By 依梦琴瑶echo On Error Resume Nextecho Dim Imgecho Set Img = CreateObject^("WIA.ImageFile"^)echo Img.LoadFile WScript.Arguments^(0^)echo Wscript.Echo Img.Width ^& "x" ^& Img.Height ^& "x" ^& Img.HorizontalResolution)>"%tmp%\GetImgInfo.vbs"goto :eof这个四舍五入后取整了。...