Optipng is a command-line tool. With Optipng, you can optimize PNG file size.
Installation
- Debian/Ubuntu:
$ sudo apt-get install optipng - Fedora:
# yum install optipng - Archlinux:
# pacman -S optipng
Usage
That’s easy. For example, you can run:
optipng desktop.png
Output:
toor@phorolinux {0}
> ~/ ls -lsh desktop.png
260K -rw-r--r-- 1 toor toor 258K 2008-07-22 07:43 desktop.png
toor@phorolinux {0}
> ~/ optipng desktop.png
OptiPNG 0.6: Advanced PNG optimizer.
Copyright (C) 2001-2008 Cosmin Truta.
** Processing: desktop.png
1440x900 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 262724 bytes
Input file size = 263180 bytes
Trying...
zc = 9 zm = 8 zs = 0 f = 0 IDAT too big
zc = 9 zm = 8 zs = 1 f = 0 IDAT too big
zc = 1 zm = 8 zs = 2 f = 0 IDAT too big
zc = 9 zm = 8 zs = 3 f = 0 IDAT too big
zc = 9 zm = 8 zs = 0 f = 5 IDAT size = 182008
zc = 9 zm = 8 zs = 1 f = 5 IDAT size = 181295
zc = 1 zm = 8 zs = 2 f = 5 IDAT too big
zc = 9 zm = 8 zs = 3 f = 5 IDAT too big
Selecting parameters:
zc = 9 zm = 8 zs = 1 f = 5 IDAT size = 181295
Output IDAT size = 181295 bytes (81429 bytes decrease)
Output file size = 181367 bytes (81813 bytes = 31.09% decrease)
toor@phorolinux {0}
> ~/ ls -lsh desktop.png
180K -rw-r--r-- 1 toor toor 178K 2008-07-22 07:43 desktop.png
For more information, you can run man optipng.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment