当前位置: 首页 > 工具软件 > pngcrush > 使用案例 >

pngcrush 使用教程_使用PNGCRUSH缩小PNG图形大小

钱照
2023-12-01

pngcrush 使用教程

Now that I'm knee-deep in MacBook I love working with command line applications. There's a certain beauty in the simplicity of using the console instead of a nice GUI. One task I use the console for often is reducing the size of PNG files using the powerhouse that is PNGCRUSH.

现在,我对MacBook有所了解,我喜欢使用命令行应用程序。 使用控制台而不是漂亮的GUI的简单性具有一定的美感。 我经常使用控制台的一项任务是使用强大的PNGCRUSH减小PNG文件的大小。

Shell脚本 (The Shell Script)


# directive
pngcrush -reduce -brute source.png destination.png

#result
Best pngcrush method = 113 (fm 0 zl 9 zs 0) for destination.png
     (33.38% IDAT reduction)
     (33.43% filesize reduction)

   CPU time used = 835.707 seconds (decoding 151.450,
          encoding 679.145, other 5.112 seconds)

The above directive is a basic usage of PNGCRUSH. PNGCRUSH offers a wealth of options that allow you to optimize your PNGs. If you use many PNGs on your website, optimizing them using PNGCRUSH is a must. Using the above directive, PNGCRUSH took a 11.7MB down to 7.8MB. NO QUALITY LOSS. Sure it took over 10 minutes, but think of the bandwidth your site will save.

上面的指令是PNGCRUSH的基本用法。 PNGCRUSH提供了大量选项,可让您优化PNG。 如果您在网站上使用许多PNG,则必须使用PNGCRUSH对其进行优化。 使用以上指令,PNGCRUSH从11.7MB减少到7.8MB。 没有质量损失 。 当然花费了超过10分钟,但请考虑一下您的网站将节省的带宽。

翻译自: https://davidwalsh.name/pngcrush

pngcrush 使用教程

 类似资料: