pngcrush_PNGCRUSH图片目录

pngcrush

One easy way of reducing website load time is by optimizing your images. PNG graphics are often more bloated than they need to be so using PNGCRUSH should be a no-brainer. PNGCRUSH's basic usage provides only single-file-crushage but I've created a script that crushes PNGs in directories recursively.

减少网站加载时间的一种简单方法是优化图像。 PNG图形通常比需要的更膨胀,因此使用PNGCRUSH应该是一件容易的事。 PNGCRUSH的基本用法仅提供单文件粉碎,但我创建了一个脚本,该脚本以递归方式粉碎目录中的PNG。

Bash脚本 (The Bash Script)


#!/bin/sh
for png in `find $1 -name "*.png"`;
do
	echo "crushing $png"	
	pngcrush -brute "$png" temp.png
	mv -f temp.png $png
done;


Do whatever you can to compress your images so that your website will load as quickly as possible. PNGCRUSHing your images does not cause a loss of quality -- only a loss of excess file size! PNGCRUSHing my images saved over 120KB of bloated imagery for the recent redesign.

尽一切可能压缩图像,以便您的网站尽快加载。 PNG粉碎图像不会造成质量损失-只会损失多余的文件大小! PNGCRUSHING我的图像保存了超过120KB的image肿图像,用于最近的重新设计。

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

pngcrush

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值