当前位置:网站首页>Pngquant batch bat and parameter description

Pngquant batch bat and parameter description

2022-06-13 06:38:00 l8487

1、 The following batch code is copied and saved to xxx.bat In file , And then pngquant.exe Put it in the same directory and you can use .

set b=%cd%
cd %cd%
pngquant *.png --ext=.png --force --skip-if-larger --strip --nofs
echo " Compression complete " 
pause

2、 The second problem that needs to be explained is , This --strip Parameters , Used to remove all kinds of information other than the image .

I found that the company used photoshop Of “ Save as ” The saved png picture , It often carries a lot of non picture information , Open in Notepad png You can see a lot of xml Describe the content . And this kind of picture uses pngquant When compressed , One 2M Pictures of the , Compressed yes 1.9M, This obviously has a problem .windows The platform parameter is off by default , You can add this parameter when compressing .

原网站

版权声明
本文为[l8487]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270554034817.html