some benchmark:
pngoptone.bat:
Code:
@echo off
SET POOPFX=%~dp0
if NOT "%1"=="/b" GOTO PROC
SHIFT
SET EXECPFX=start /b /wait /belownormal
:PROC
%POOPFX%binmay.exe -i "%~1" -o nul -s "00 00 00 08 61 63 54 4c" 2> nul
if ERRORLEVEL 1 (
%POOPFX%touch.exe -r "%~1" "%~1.time"
%EXECPFX% %POOPFX%optipng.exe -zw32k -zc9 -zm9 -zs0,3 -f0,5 -i0 "%~1"
if not ERRORLEVEL 1 (
%EXECPFX% %POOPFX%advdef.exe -z -4 "%~1"
%EXECPFX% %POOPFX%deflopt.exe -b "%~1"
%EXECPFX% %POOPFX%pngout /y /b0 "%~1"
if not ERRORLEVEL 2 (
%EXECPFX% %POOPFX%advdef.exe -z -4 "%~1"
%EXECPFX% %POOPFX%deflopt.exe -b "%~1"
)
)
%POOPFX%touch.exe -r "%~1.time" "%~1"
if exist "%~1.time" del "%~1.time"
) else (
ren "%~1" "%~n1.apng"
)
SET EXECPFX=
SET POOPFX=
pngwoptone.bat:
Code:
@echo off
SET POOPFX=%~dp0
if NOT "%1"=="/b" GOTO PROC
SHIFT
SET EXECPFX=start /b /wait /belownormal
:PROC
%POOPFX%binmay.exe -i "%~1" -o nul -s "00 00 00 08 61 63 54 4c" 2> nul
if ERRORLEVEL 1 (
%POOPFX%touch.exe -r "%~1" "%~1.time"
%EXECPFX% %POOPFX%optipng.exe -zw32k -zc9 -zm9 -zs0,3 -f0,5 -i0 "%~1"
if not ERRORLEVEL 1 (
%EXECPFX% %POOPFX%pngwolf.exe --in="%~1" --out="%~1"
%EXECPFX% %POOPFX%deflopt.exe -b "%~1"
%EXECPFX% %POOPFX%pngout /y /b0 "%~1"
if not ERRORLEVEL 2 (
%EXECPFX% %POOPFX%pngwolf.exe --in="%~1" --out="%~1"
%EXECPFX% %POOPFX%deflopt.exe -b "%~1"
)
)
%POOPFX%touch.exe -r "%~1.time" "%~1"
if exist "%~1.time" del "%~1.time"
) else (
ren "%~1" "%~n1.apng"
)
SET EXECPFX=
SET POOPFX=
original png attached. xxxx_2.PNG and xxxx_3.PNG are copied from xxxx.PNG.
Log:
Code:
C:\Documents and Settings\Roy\Desktop>timer pngoptone.bat xxxx_2.PNG
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
OptiPNG 0.6.5: Advanced PNG optimizer.
Copyright (C) 2001-2011 Cosmin Truta.
** Processing: xxxx_2.PNG
748x391 pixels, 3x8 bits/pixel, RGB
Reducing image to 8 bits/pixel, 225 colors in palette
Input IDAT size = 28359 bytes
Input file size = 28489 bytes
Trying:
zc = 9 zm = 9 zs = 0 f = 0 IDAT size = 6397
Selecting parameters:
zc = 9 zm = 9 zs = 0 f = 0 IDAT size = 6397
Output IDAT size = 6397 bytes (21962 bytes decrease)
Output file size = 7214 bytes (21275 bytes = 74.68% decrease)
7214 6284 87% xxxx_2.PNG
7214 6284 87%
*** DeflOpt V2.07 ***
*** Built on Wed Sep 5 18:56:30 2007 ***
*** Copyright (C) 2003-2007 by Ben Jos Walbeehm ***
"C:/Documents and Settings/Roy/Desktop/xxxx_2.PNG"
Number of bytes saved: 76 (6,284 --> 6,208)
File rewritten.
Number of files processed : 1
Number of files rewritten : 1
Total number of bytes saved: 76
19,752,516 cycles.
In: 6208 bytes xxxx_2.PNG /c3 /f0 /d8
Out: 6044 bytes xxxx_2.PNG /c3 /f0 /d8, 225 colors
Chg: -164 bytes ( 97% of original)
6044 6044 100% xxxx_2.PNG (Bigger 6170)
6044 6044 100%
*** DeflOpt V2.07 ***
*** Built on Wed Sep 5 18:56:30 2007 ***
*** Copyright (C) 2003-2007 by Ben Jos Walbeehm ***
"C:/Documents and Settings/Roy/Desktop/xxxx_2.PNG"
Number of files processed : 1
Number of files rewritten : 0
Total number of bytes saved: 0
10,361,453 cycles.
Kernel Time = 0.046 = 00:00:00.046 = 0%
User Time = 0.015 = 00:00:00.015 = 0%
Process Time = 0.062 = 00:00:00.062 = 1%
Global Time = 6.078 = 00:00:06.078 = 100%
Code:
C:\Documents and Settings\Roy\Desktop>timer pngwoptone.bat xxxx_3.PNG
Timer 3.01 Copyright (c) 2002-2003 Igor Pavlov 2003-07-10
OptiPNG 0.6.5: Advanced PNG optimizer.
Copyright (C) 2001-2011 Cosmin Truta.
** Processing: xxxx_3.PNG
748x391 pixels, 3x8 bits/pixel, RGB
Reducing image to 8 bits/pixel, 225 colors in palette
Input IDAT size = 28359 bytes
Input file size = 28489 bytes
Trying:
zc = 9 zm = 9 zs = 0 f = 0 IDAT size = 6397
Selecting parameters:
zc = 9 zm = 9 zs = 0 f = 0 IDAT size = 6397
Output IDAT size = 6397 bytes (21962 bytes decrease)
Output file size = 7214 bytes (21275 bytes = 74.68% decrease)
---
# 748 x 391 pixels at depth 8 (mode 3) with IDAT 292859 bytes (6397 deflated)
---
---
# 890 bytes smaller
*** DeflOpt V2.07 ***
*** Built on Wed Sep 5 18:56:30 2007 ***
*** Copyright (C) 2003-2007 by Ben Jos Walbeehm ***
"C:/Documents and Settings/Roy/Desktop/xxxx_3.PNG"
Number of bytes saved: 75 (6,324 --> 6,249)
File rewritten.
Number of files processed : 1
Number of files rewritten : 1
Total number of bytes saved: 75
14,568,404 cycles.
In: 6249 bytes xxxx_3.PNG /c3 /f5 /d8
Out: 6044 bytes xxxx_3.PNG /c3 /f0 /d8, 225 colors
Chg: -205 bytes ( 96% of original)
---
# 748 x 391 pixels at depth 8 (mode 3) with IDAT 292859 bytes (5300 deflated)
---
- zlib deflated idat size: 11180 # -17 bytes +3 seconds
- zlib deflated idat size: 11150 # -47 bytes +3 seconds
- zlib deflated idat size: 11132 # -65 bytes +3 seconds
- zlib deflated idat size: 11131 # -66 bytes +4 seconds
- zlib deflated idat size: 11127 # -70 bytes +4 seconds
- zlib deflated idat size: 11114 # -83 bytes +4 seconds
- zlib deflated idat size: 11107 # -90 bytes +6 seconds
- zlib deflated idat size: 11099 # -98 bytes +6 seconds
- zlib deflated idat size: 11095 # -102 bytes +6 seconds
- zlib deflated idat size: 11061 # -136 bytes +6 seconds
- zlib deflated idat size: 11060 # -137 bytes +7 seconds
- zlib deflated idat size: 11049 # -148 bytes +8 seconds
- zlib deflated idat size: 11016 # -181 bytes +9 seconds
- zlib deflated idat size: 11004 # -193 bytes +9 seconds
- zlib deflated idat size: 10977 # -220 bytes +9 seconds
- zlib deflated idat size: 10969 # -228 bytes +9 seconds
- zlib deflated idat size: 10957 # -240 bytes +10 seconds
- zlib deflated idat size: 10955 # -242 bytes +10 seconds
- zlib deflated idat size: 10950 # -247 bytes +10 seconds
- zlib deflated idat size: 10948 # -249 bytes +11 seconds
- zlib deflated idat size: 10920 # -277 bytes +11 seconds
- zlib deflated idat size: 10910 # -287 bytes +12 seconds
- zlib deflated idat size: 10901 # -296 bytes +14 seconds
- zlib deflated idat size: 10892 # -305 bytes +16 seconds
- zlib deflated idat size: 10869 # -328 bytes +16 seconds
- zlib deflated idat size: 10845 # -352 bytes +17 seconds
- zlib deflated idat size: 10829 # -368 bytes +17 seconds
- zlib deflated idat size: 10813 # -384 bytes +18 seconds
- zlib deflated idat size: 10770 # -427 bytes +19 seconds
- zlib deflated idat size: 10760 # -437 bytes +21 seconds
- zlib deflated idat size: 10745 # -452 bytes +24 seconds
- zlib deflated idat size: 10720 # -477 bytes +25 seconds
- zlib deflated idat size: 10719 # -478 bytes +26 seconds
- zlib deflated idat size: 10717 # -480 bytes +27 seconds
- zlib deflated idat size: 10710 # -487 bytes +27 seconds
- zlib deflated idat size: 10699 # -498 bytes +29 seconds
- zlib deflated idat size: 10695 # -502 bytes +31 seconds
- zlib deflated idat size: 10689 # -508 bytes +32 seconds
- zlib deflated idat size: 10674 # -523 bytes +35 seconds
- zlib deflated idat size: 10672 # -525 bytes +37 seconds
- zlib deflated idat size: 10636 # -561 bytes +38 seconds
---
# 0 bytes smaller
*** DeflOpt V2.07 ***
*** Built on Wed Sep 5 18:56:30 2007 ***
*** Copyright (C) 2003-2007 by Ben Jos Walbeehm ***
"C:/Documents and Settings/Roy/Desktop/xxxx_3.PNG"
Number of files processed : 1
Number of files rewritten : 0
Total number of bytes saved: 0
9,162,458 cycles.
Kernel Time = 0.046 = 00:00:00.046 = 0%
User Time = 0.015 = 00:00:00.015 = 0%
Process Time = 0.062 = 00:00:00.062 = 0%
Global Time = 59.984 = 00:00:59.984 = 100%