How to Install pngquant on Ubuntu – Command Line PNG Compressor

pngquant is a free and open source command line based lossy PNG compressor for Linux, MacOS and Windows. Converts PNG images to 8-bit PNG format using an alpha channel file to reduce size. Comes with high quality palette generation, gamma correction and pre-multiplied alpha support. Reduces noise during the conversion process. You can set the image quality level. It is based on libimagequant. Released under GNU GENERAL PUBLIC LICENSE. It also supports batch conversion of PNG image files.

Install pngquant PNG compressor on Ubuntu.

You can install pngquant PNG compressor via Ubuntu snapshot. Open the terminal app (ctrl + Alt + T), enter this pngquant snap installation command and press Enter on your keyboard.

sudo snap install pngquant

Next, enter the ubuntu user password, if required. Install pngquant PNG compressor on Ubuntu.

You can compress png with the following command:

pngquant filename.png

Example: To compress the deluge.png file from the Pictures folder of ubuntu, execute the following commands one by one.

cd Pictures
pngquant deluge.png

The output file name in this example is the same as the input name except that it ends with “-fs8.png” and “-or8.png”.

Recommended article: How to install Lifeograph on Ubuntu-Digital Journal and Diary application

Here, the output file name “deluge-fs8.png”

For a complete list of options, run the following command in a terminal:

pngquant -h