When you run Google's PageSpeed plugins for firebug / Firefox on a website, it will suggest those cases Where an image can be harmless, compressed, and provide a link to download this small picture.
For example:
- Lossless compression can save 33.5 KB (85% reduction).
- Lossless loss can save compression 9 1B (51% deficiency).
- 262-B (decrease of 11%)
- Lossless loss can save compression 61b (a decrease of 5%).
This applies to both JPG and PNG file types (I have not tested GIF or the other.)
Also note the flicker thumbnail (all of these Images are 75x75 pixels) They are some big savings if this is really great, why not apply this server-side to its entire library and reduce its storage and bandwidth load?
Even Stackoverflow.com stands for some very small savings:
- Losslessly compression 11b (1% reduction) Could.
I have noticed that PageSpeed has suggested good savings on PNG files which I had created using Photoshop 'Save to Web' feature.
So my question is, how many changes do they make in the images, which can make them so less? I'm guessing there are different answers for different file types. Is this really lossless for JPGs? And how can they beat Photoshop? Do I have a little doubt on this?
If you are really interested in technical details, check out source code:
For PNG files, they use OptiPNG some tests- and - with error approach
// We use these four combinations because different images benefit from // different parameters and this combination 4 From the Web to PNG's large / set most Works fine Const PngCompressParams kPngCompressionParams [] = {PngCompressParams (PNG_ALL_FILTERS, Z_DEFAULT_STRATEGY), PngCompressParams (PNG_ALL_FILTERS, Z_FILTERED), PngCompressParams (PNG_FILTER_NONE, Z_DEFAULT_STRATEGY), PngCompressParams (PNG_FILTER_NONE, Z_FILTERED)};
When all four combinations are applied, the smallest result is kept. Simple as that.
(NB:
optipng command line tool also does that if you enter
-o2 via
-o 7 )
For JPEG files, they experiment with the following options:
JPG CompressOptes () : Progressive (false), retain_color_profile (false), retain_exif_data (false), lossy (false) {}
Similarly, WEBP is compressed using these options:
There is also used to minimize the format .
Comments
Post a Comment