1.1、pngquant简介
是什么 ? | : | a command-line utility and a library for lossy compression of PNG images |
开发语言 | : | C |
官方主页 | : | https://pngquant.org |
源码仓库 | : | https://github.com/kornelski/pngquant |
1.2、通过包管理器安装pngquant
操作系统 | 包管理器 | 安装命令 |
---|
Windows | scoop | scoop install pngquant |
Windows | Chocolatey | choco install -y pngquant |
macOS | HomeBrew | brew install pngquant |
GNU/Linux | HomeBrew | brew install pngquant |
| apt | sudo apt-get install -y pngquant |
CentOS | yum | sudo yum install -y pngquant |
| dnf | sudo dnf install -y pngquant |
openSUSE | zypper | sudo zypper install -y pngquant |
Alpine Linux | apk | sudo apk add pngquant |
Arch Linux ArcoLinux Manjaro Linux | pacman | sudo pacman -Syyu --noconfirm sudo pacman -S --noconfirm pngquant |
Gentoo Linux | Portage | sudo emerge pngquant |
1.3、通过编译源码安装pngquant
1.4、pngquant命令
示例:
pngquant 256 --force --ext .png ~/newton-for-android/src/main/res/drawable-xxhdpi/*.png