png-palettes PNG图形压缩软件
将 PNG
图像的 RGBA 模式转为调色板模式,从而减小图像大小。目前压缩只压缩 RGBA 模式的图像,调色板模式将跳过。这是一个多线程有损PNG
图像压缩工具。
工具使用跨平台框架Tauri开发,核心功能是png-palettes-optimization命令行工具修改而来的。
使用libimagequant生成调色板 image-png编解码
PNG
图像数据
选择或拖拽需要压缩的文件或目录,选择或拖拽目录时将扫描压缩此目录下所有的PNG
文件。
注意!被压缩的图片将会覆盖原文件
![](https://private-user-images.githubusercontent.com/47600522/251335534-0497bf92-8394-4676-871d-0e72aa9b78b2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyODEyMTUsIm5iZiI6MTcyNDI4MDkxNSwicGF0aCI6Ii80NzYwMDUyMi8yNTEzMzU1MzQtMDQ5N2JmOTItODM5NC00Njc2LTg3MWQtMGU3MmFhOWI3OGIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDIyNTUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjZTUzYWZiZGViZGJlOGQ5OWViY2I2M2YyYjYwMjM5MjJmYWViNDNkYjBhZWNkYmNlOGY5YjcwZTcxZWRkYzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.lJQGkgrSWcD0Ai2hCeS2DcQD4nRrD18PS_GRHzSTAo0)
选择图片后的效果
减小压缩的文件大小,最直接的方法就是降低目标值
![](https://private-user-images.githubusercontent.com/47600522/251335582-11be0dcf-259e-453c-94bd-f8619606bc40.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyODEyMTUsIm5iZiI6MTcyNDI4MDkxNSwicGF0aCI6Ii80NzYwMDUyMi8yNTEzMzU1ODItMTFiZTBkY2YtMjU5ZS00NTNjLTk0YmQtZjg2MTk2MDZiYzQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDIyNTUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcxMTJlMzcwNTUxOTYyZjZjNDQ1OTRmYTc5MGMzOTNlYWU3MGM4YTZlY2QwNmI4ODU5MmJmM2YxYTI1ZmY0N2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zNg0vMy5P5Mj5Ccq7TGI_BzzTWYH4xJ9jvr_W2p0KQI)
效果
压缩前 | 压缩后 |
---|---|
73.8 KB (75,628 字节) | 24.1 KB (24,708 字节) |
如果是已压缩的PNG
将不会再次压缩
这时将会显示
不支持的PNG颜色模式
,因为目前只支持RGBA
模式的PNG
图,如果是RGB
模式的PNG
图也会报出此错误,这时需要使用PS或其它工具转换为RGBA
的颜色模式
![](https://private-user-images.githubusercontent.com/47600522/251616179-8dbdb79b-99dc-4f30-8dc3-5a849f41a614.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyODEyMTUsIm5iZiI6MTcyNDI4MDkxNSwicGF0aCI6Ii80NzYwMDUyMi8yNTE2MTYxNzktOGRiZGI3OWItOTlkYy00ZjMwLThkYzMtNWE4NDlmNDFhNjE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDIyNTUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYwZjgxZWYyMWUyMzU3YmI0OTc4NDJkMjI3YzE0YmNmODcxOTJmMDk4NmYzMjAzM2MzMWQ1NDc4NDZhMGFiZmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZDxy4MhNthkTBZ6YwnPd6HUz3uR4GsT9Kj78LJGnnag)