RubyPDF Blog tutorial GNURoot in Action–Optimize Image on Android

GNURoot in Action–Optimize Image on Android

In last article, I used wkhtmltoimage to create an about 73M png file,  and in this article, I want to optimizer it with OptiPNG,

apt-cache search optipng

output

optipng - advanced PNG (Portable Network Graphics) optimizer                    
pngnq - tool for optimizing PNG (Portable Network Graphics) images              
pngquant - PNG (Portable Network Graphics) image optimising utility             
trimage - GUI and command-line interface to optimize image files

Let’s try optipng

apt-get install optipng
optipng -o 7 phpinfo_optipng.png

From the following screenshot, we notice after optimized with optipng, 73M png becomes only 1.3M

optipng

Other 3 software I have not tested.

OptiPNG is a PNG optimiser that recompresses image files to a smaller size, without losing any information. This program also converts external formats (BMP, GIF, PNM and TIFF) to optimized PNG, and performs PNG integrity checks and corrections.

Pngnq is a tool for quantizing PNG images in RGBA format.

Pngnq is an adaptation by Stuart Coyle of Greg Roelf’s pnqquant using Anthony Dekker’s neuquantalgorithm.

pngquant is a command-line utility to quantize and dither 32-bit RGBA PNGs down to 8-bit (or smaller) RGBA-palette PNGs, usually with a significant reduction in file size.

Trimage is a cross-platform GUI and command-line interface to optimize image files for websites, usingoptipng, pngcrush, advpngand jpegoptim, depending on the filetype (currently, PNG and JPG files are supported).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.