View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Libpng

From LQWiki

Jump to: navigation, search

Libpng is a software library that enables programmers to manage images in the PNG format.

libpng performance

Creating PNG images is a CPU intensive process. According to USENET posts, most of the CPU time is spend compressing in zlib, so the following lines have been seen to speed things up considerably by specifying a higher compression speed at the expense of smaller compression ratio:

png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, PNG_FILTER_SUB);
png_set_compression_level(png_ptr, Z_BEST_SPEED);
png_set_compression_strategy(png_ptr, Z_HUFFMAN_ONLY);

External links


Personal tools