Check that the return value of VerQueryValue is valid
[TortoiseGit.git] / doc / images / adjustimages.bat
blobc8d8dffeeeb54caa399c4f01b51e782e96cf97de
1 @echo off & setlocal enableextensions enabledelayedexpansion\r
2 :: ============================================================ \r
3 :: This script compresses all .png images.\r
4 ::\r
5 :: By default all images in all languages will be handled.\r
6 :: You can specify a group of files to check using the first\r
7 :: parameter, e.g.\r
8 ::     adjustimages en\Rev*.png\r
9 ::\r
10 :: ============================================================ \r
11 ::\r
12 ::\r
13 if '%1' == '' goto :DoDefault\r
14 for %%? in (%1) do Call :ProcAdjustFile %%?\r
15 endlocal & goto:EOF\r
16 ::\r
17 :DoDefault\r
18 for %%? in (en\*.png) do Call :ProcAdjustFile %%?\r
19 endlocal & goto :EOF\r
20 ::===============================================================\r
21 :ProcAdjustFile FileName\r
22 :: Compress file\r
23 echo Compressing %1\r
24 type %1 | pngquant.exe 256 > 8bit.tmp\r
25 del %1 > nul\r
26 move 8bit.tmp %1 >nul\r
27 optipng.exe -o7 -quiet %1\r
28 pngout.exe %1 /y /d0 /s0 /mincodes0 >nul\r
29 DeflOpt.exe %1 >nul\r
30 endlocal & goto :EOF\r