Install pngquant – Lossy PNG Compression App on Linux

28/12/2020
Chưa phân loại

If you are looking for a simple image compression tool, check out pngquant, a command-line utility and a library for lossy compression of PNG images.

The app conversion reduces file sizes significantly (as much as 70% of original size) whilst preserving the full alpha transparency of the image. All generated images are compatible with all modern web browsers, as well as having a better fallback in IE6 than 24-bit PNGs.

Key Features

  • High-quality palette generation using a combination of vector quantizationalgorithms.
  • Unique adaptive dithering algorithm that adds less noise to images than the standard Floyd-Steinberg.
  • Easy to integrate with shell scripts, GUIs and server-side software.
  • Fast mode for processing large numbers of images.

Algorithm

  • It uses modified version of Median Cut quantization algorithm and additional techniques to mitigate deficiencies of Median Cut.
  • Instead of splitting boxes with largest volume or number of colors, boxes are selected to minimize variance from their median value.
  • Histogram is built with addition of a basic perception model, which gives less weight to noisy areas of the image.
  • To improve color further, histogram is adjusted in a process similar to gradient descent (Median Cut is repeated many times with more weight on poorly represented colors).
  • Finally, colors are corrected using Voronoi iteration (K-means), which guarantees locally optimal palette.
  • pngquant works in premultiplied alpha color space to give less weight to transparent colors.
  • When remapping, error diffusion is applied only to areas where several neighboring pixels quantize to the same value, and which are not edges. This avoids adding noise to areas which have high visual quality without dithering.

See Changelog for most recent update

How to install latest pngquant on Ubuntu 16.04

apt-get install git libpng16-dev    git clone --recursive https://github.com/pornel/pngquant.git    cd pngquant    make    sudo make install

Visit https://pngquant.org for basic steps on how to use the tool

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

[SSL] Cài đặt SSL miễn phí cho WordPress Website với Let’s Encrypt trên Nginx

Trong thời đại hiện nay, khi mà công nghệ ngày càng trở nên phổ biến thì vấn đề bảo...
30/12/2020

Installing Multimedia Codecs on Debian 10

A codec is used to encode and decode digital data stream. It is mainly used to reduce file size of audio and video files....
29/12/2020

A Beginner’s Guide To Docker Compose

Docker Compose is one of the most useful tools for Software Developers and System Administrators. Many jobs require someone...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

VPS treo game là gì? Thuê VPS treo game giá rẻ, không lo giật lag
02/06/2025

 BitBrowser – Best Anti-Detect Browser!
26/05/2025

Dịch Vụ Xây Dựng Hệ Thống Peering Với Internet Exchange (IXP)
04/04/2025

Dịch Vụ Triển Khai VPN Site-to-Site & Remote Access
04/04/2025

Dịch Vụ Thiết Lập Hệ Thống Tường Lửa (Firewall)
04/04/2025