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肿图像,用于最近的重新设计。
pngcrush