Menu

#83 Incorrent "-o" parameter treatment

v1.0 (example)
open
nobody
None
5
2021-04-22
2021-04-22
ioctl
No

Optipng ignores "-o" parameters limitations, or it's documentation not complete. For example, -o4 assume only -zc9, while real command output contains -zc1 also. Here is the full "optipng -o4 in.png 2>&1 | tee log" output:

** Processing: in.png
256x256 pixels, 4x8 bits/pixel, RGB+alpha
Reducing image to 8 bits/pixel, 232 colors (39 transparent) in palette
Input IDAT size = 1985 bytes
Input file size = 2042 bytes

Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 735
zc = 9 zm = 8 zs = 1 f = 0^M zc = 1 zm = 8 zs = 2 f = 0^M zc = 9 zm = 8 zs = 3 f = 0^M zc = 9 zm = 8 zs = 0 f = 1^M zc = 9 zm = 8 zs = 1 f = 1^M zc = 1 zm = 8 zs = 2 f = 1^M zc = 9 zm = 8 zs = 3 f = 1^M zc = 9 zm = 8 zs = 0 f = 2^M zc = 9 zm = 8 zs = 1 f = 2^M zc = 1 zm = 8 zs = 2 f = 2^M zc = 9 zm = 8 zs = 3 f = 2^M zc = 9 zm = 8 zs = 0 f = 3^M zc = 9 zm = 8 zs = 1 f = 3^M zc = 1 zm = 8 zs = 2 f = 3^M zc = 9 zm = 8 zs = 3 f = 3^M zc = 9 zm = 8 zs = 0 f = 4^M zc = 9 zm = 8 zs = 1 f = 4
^M zc = 1 zm = 8 zs = 2 f = 4^M zc = 9 zm = 8 zs = 3 f = 4^M zc = 9 zm = 8 zs = 0 f = 5^M zc = 9 zm = 8 zs = 1 f = 5^M zc = 1 zm = 8 zs = 2 f = 5^M zc = 9 zm = 8 zs = 3 f = 5^M
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 735

Output IDAT size = 735 bytes (1250 bytes decrease)
Output file size = 1551 bytes (491 bytes = 24.05% decrease)

Discussion


Log in to post a comment.