Linux Format

Posterizer

Version: GIT Web: http://bit.ly/lxf-posterizer

-

We’ve previously written quite a lot about different encoders, optimisers and the tricks you can do to reduce the size of your image library without compromisi­ng quality. It looks like we’re now short of new lossless tools, but still able to blow your mind with some yetvery-good apps for lossy compressio­n.

Lately we’ve come across ImageAlpha, a MacOS-only graphical program that can slim down your PNG files footprint, especially if they have an alpha channel (transparen­cy). That applicatio­n relied on a command-line tool known as Mediancut-Posterizer, or Posterizer for short. As the author writes, it has two modes: a lossy averaging filter (blurizer) that removes noise from the image; and optimal posterizat­ion using Median Cut quantizati­on to reduce the number of unique colours in the image with minimal visual distortion. We ran our own tests and discovered how this tool affected our test true-colour PNGs with transparen­cy. The most common usage probably looked like this: $ posterizer -Q 75 in.png out.png

The program reduced the size of our test image by an impressive 30 per cent without introducin­g any visible artefacts. Playing with the quality ratio ( -Q ) revealed that even with very low figures Posterizer still produced decent results, and even though the image no longer looked smooth, it was still less than half its original file size. The Posterizer could be very easily turned into a ‘blurizer’ by appending the -b parameter and, again, playing with quality ratio. Lossy averaging didn’t reduce the file size instantly (the output file was larger than the input), but the idea is that averaging alone just prepares the way for further compressio­n. You can re-export a blurred PNG image in Gimp and see how much more the file size can be reduced. There are many ways you can benefit from using Posterizer, besides optimising web sites. For example, Raspberry Pi and many low-power IoT devices will work better with smaller PNG icons and other PNG content.

“The program reduced the image’s size by an impressive 30 per cent”

 ??  ?? One of these images was slimmed down by 50 per cent using Posterizer. It’s probably the one on the right.
One of these images was slimmed down by 50 per cent using Posterizer. It’s probably the one on the right.

Newspapers in English

Newspapers from Australia