Blurring reduces noise/entropy so that JPEG compresses better. You can use a bilateral filter (Photoshop: Surface Blur; GIMP: Selective Gaussian Blur) for larger amount of smoothing while preserving edges.
Image Posterization
This is actually called image quantization. pngquant[1] and pngnq[2] are two specialized open-source tools for automatically selecting the best palettes to represent the image with least perceptual error.
Selective JPEG Compression
JPEGmini[3] automatically selects areas of interest with custom perceptual metrics and preserves quality within those areas while optimizing out other areas. I tested the sample image in the article: JPEGmini obtained 6.7% decrease in size without manually selecting the mask.
Given that these techniques seem to be well-known, it would be interesting to see a JPEG compressor which uses what we know of human vision to minimize filesize while keeping the image visually the same.
JPEGmini seems to go partway with selective compression, but it seems like there's room to improve the actual compression algorithm to do things like gaussian smoothing instead of just truncating the high-frequency components to reduce filesize.
OK, interesting article and some quite effective tricks but this is not "optimization". Optimization means getting the best possible result from something, by some criterion. For example, blurring an image and then getting a bit better compression is not optimal. But if it could be shown that was getting the best possible compression for JPEG then it would be optimal.
The article should be called "Image Compression Tricks". I don't think any of the techniques are considered advanced in today's technology.
The example images they use are the ideal use cases for each of these techniques. The rocks photo has no hard edges. Wood texture by nature is similar to what posterization does. These tricks won't help in many cases. Although if you do happen to have something that fits the criteria, these should be quite useful.
xfs|12 years ago
Blurring reduces noise/entropy so that JPEG compresses better. You can use a bilateral filter (Photoshop: Surface Blur; GIMP: Selective Gaussian Blur) for larger amount of smoothing while preserving edges.
Image Posterization
This is actually called image quantization. pngquant[1] and pngnq[2] are two specialized open-source tools for automatically selecting the best palettes to represent the image with least perceptual error.
Selective JPEG Compression
JPEGmini[3] automatically selects areas of interest with custom perceptual metrics and preserves quality within those areas while optimizing out other areas. I tested the sample image in the article: JPEGmini obtained 6.7% decrease in size without manually selecting the mask.
[1]: http://pngquant.org/
[2]: http://pngnq.sourceforge.net/
[3]: http://www.jpegmini.com/main/shrink_photo https://news.ycombinator.com/item?id=2940505
jbri|12 years ago
JPEGmini seems to go partway with selective compression, but it seems like there's room to improve the actual compression algorithm to do things like gaussian smoothing instead of just truncating the high-frequency components to reduce filesize.
leeoniya|12 years ago
demo: http://o-0.me/RgbQuant/
repo: https://github.com/leeoniya/RgbQuant.js
brissmyr|12 years ago
For PNG, always run your images through ImageOptim (http://imageoptim.com) before committing your work.
And for large PNGs, ImageAlpha (http://pngmini.com) lets you reduce bit depth, keep transparency and maintain a decent image quality.
markdown|12 years ago
Why only PNG?
lyndonh|12 years ago
The article should be called "Image Compression Tricks". I don't think any of the techniques are considered advanced in today's technology.
pornel|12 years ago
It's possible to pick posterization levels more fitting the image:
http://pngmini.com/lossypng.html#posterization (https://github.com/pornel/mediancut-posterizer)
rebel|12 years ago
sandGorgon|12 years ago
I again wish there was an Imagemagick/Graphicsmagick script to do this.
therobot24|12 years ago
xenator|12 years ago
youWontLikeThis|12 years ago
[deleted]