1 @echo off & setlocal enableextensions enabledelayedexpansion
\r
2 :: ============================================================
\r
3 :: This script compresses all .png images.
\r
5 :: By default all images in all languages will be handled.
\r
6 :: You can specify several distinct files or a group of files to
\r
7 :: process using parameters, e.g.
\r
8 :: adjustimages en\Rev*.png
\r
9 :: adjustimages en\AboutDlg.png en\BrowseRef.png
\r
10 :: adjustimages en\AboutDlg.png en\BrowseRef.png en\Rev*.png
\r
12 :: ============================================================
\r
15 if '%1' == '' goto :DoDefault
\r
17 for %%? in (%1) do Call :ProcAdjustFile %%?
\r
19 if '%1' == '' endlocal & goto:EOF
\r
23 for %%? in (en\*.png) do Call :ProcAdjustFile %%?
\r
24 endlocal & goto :EOF
\r
25 ::===============================================================
\r
26 :ProcAdjustFile FileName
\r
29 type %1 | pngquant.exe 256 > 8bit.tmp
\r
31 move 8bit.tmp %1 >nul
\r
32 optipng.exe -o7 -quiet %1
\r
33 pngout.exe %1 /y /d0 /s0 /mincodes0 >nul
\r
35 endlocal & goto :EOF
\r