pngquant
1.1、pngquant简介
是什么 ?:a command-line utility and a library for lossy compression of PNG images
开发语言:C
官方主页:https://pngquant.org
源码仓库:https://github.com/pornel/pngquant
1.2、通过包管理器安装pngquant
操作系统包管理器安装命令
Windowsscoopscoop install pngquant
WindowsChocolateychoco install -y pngquant
macOSHomeBrewbrew install pngquant
GNU/LinuxLinuxBrewbrew install pngquant
aptsudo apt-get install -y pngquant
CentOSyumsudo yum install -y pngquant
dnfsudo dnf install -y pngquant
openSUSEzyppersudo zypper install -y pngquant
Alpine Linuxapksudo apk add pngquant

Arch Linux

ArcoLinux

Manjaro Linux

pacmansudo pacman -Syyu --noconfirm
sudo pacman -S    --noconfirm pngquant
Gentoo LinuxPortagesudo emerge pngquant
1.3、通过源码安装pngquant

step1、安装依赖

下载时git
编译时POSIX shGNU CoreUtilsmakegcc
运行时glibc ( libc.sold-linux-x86-64.so )

step2、使用git下载pngquant源码

git clone https://github.com/kornelski/pngquant.git

step3、进入pngquant目录,并查看它的内容

step4、配置、编译、安装

./configure && make && sudo make install
1.4、pngquant命令

示例:

pngquant 256 --force --ext .png ~/newton-for-android/src/main/res/drawable-xxhdpi/*.png