Image compression tools for Windows
Web performance matters. Images are one of the worst offenders when it comes to bloating and slowing down our pages. I get a kick crushing them using the compression tools I've discovered over the years. I find it to be one of the more strangely satisfying aspects of the craft. Why is that? I don't know. Whatever. The more important question is: what tools do I use?
TL;DR - Use RIOT for manually squeezing out the best quality/compression ratio. Use FileOptimizer for the best fully automatic compression.
I used to use Photoshop's old Save for Web feature of course, but since I no longer use or have Photoshop, I've had to find alternatives, and that's no bad thing. Photoshop's compression wasn't the best anyway. So I've knocked together a run down of the ones I use. I'm only covering PNG here (might do JPEG another time) and it's not an exhaustive test. I've gone for a test image that is something you'd typically want to use PNG for, but is suitably challenging (lots of gradients) for the quantization and compression algorithms. Here's we go.
This is my go-to all-round graphics application. This one inexpensive app has replaced the whole Adobe Creative Suite for me. I won't go too deeply into it here (I'll save it for another post), but suffice it to say, I like it a lot. It has a great export tool built in for PNG and JPEG files. It's much like Photoshop's tooling in this regard. You get a decent amount of control over the quantization (colour reduction) and can preview the results in number of ways before output, but other than that it's pretty basic. It does a pretty good job of compression though, taking my sample image from 253 KB down to 76.2 KB. Quality isn't bad either. There is some noticable banding, but it's not horredous.
- Built in to the Xara app and therefore convenient
- Does a surprisingly decent job of compression
- Dithering can kill the compression
- Preview window is small and can't be maximised
- Not free
I've used this one quite a bit. It's very basic, but also super-simple to use. It's also blindingly fast. You can take a screenshot and have it compressed in a few seconds using it. It's very efficient. It doesn't offer amazing compression though. It's certainly still impressive given it's so fast. I use it for quickly compressing PNGs that I need to send via email or plop into a Word doc. It doesn't do quantization, so there's no quality loss.
- Super fast
- Simple, quick and efficient to use
- Doesn't do lossy compression (quantization)
- Its lossless compression is not as good as some other tools
This is another tool much like the exporters found in Photoshop and Xara. Unlike those two, this one is freely available and has some exciting sounding features such as NeuQuant neural-net colour quantization. The number of different ways you can compress your image is impressive and it's particularly nice being able to quickly switch to JPEG mode for quick comparison. You can control the number of colours to reduce to both quickly and with a fine degree of control. The two provided quantizers, Xiaolin Wu and the aformentioned NeuQuant perform quite differently. Xiaolin Wu is the faster of the two, and is much like Xara's. The quality isn't great with gradients (there is noticable banding), but it does do rather well with compression, creating the smallest files in this test. NeuQuant goes the other way: it has the best quality of all the tools here, but you get a slightly larger file. Not much larger, mind you, and the quality of the quantization is, frankly, amazing.
Other noteworthy features include "compress to size", resize of your image using a number of algorithms, and running an external optimiser. There's also a useful batch mode in addition to the manual mode. Compare in-place is also very handy. It's surprisingly comprehensive and a very capable tool. For fully manual work, it's what I go to first. The only thing I'd like to see that isn't there is the pngquant quantizer.
- Good UI
- Loads of options
- Great for manual tweaking and experimenting
- Useful batch mode
- Can create the smallest files
- Doesn't include pngquant as an option
FileOptimizer works with a mind boggling number of file formats besides just images. It pumps files through a number of "engines" (processors) to iteratively squeeze files down as much as possible. For the PNG format, these engines include PngOptimizer (mentioned above), TruePNG, PNGOUT, pngrewrite, pngwolf, plus several more.
It can also do lossy in addition to the default lossless compression. For the former, it uses the excellent pngquant which does some of the best colour quantization for PNG I've seen. It's all automated - you don't have to tweak lots of settings and yet the quality of the lossy compression is nearly always good. Not as good a NeuQuant in my limited test, but smaller. Its lossless compression also beats all other file optimisers I've tried.
Here's an example: my 253 KB test image (a screenshot) can be taken down to 224 KB in lossless mode. That doesn't look too impressive, but it's shaving off bytes where the other tools failed. When lossy mode is turned on, it can crunch the image down to 75.8 KB - that's just 29% of the original size. Plus the quality is great - noticeably better than the other tools. You can hardly tell the difference without close scrutiny.
Its lossless compression of JPEG files is also very impressive, as it its PDF compression (although be careful here - although they're smaller, I've had some kind of funky PDFs being spat out sometimes).
- Incredible number of compressions engines included
- Does the best lossless compression
- Its lossy PNG compression is remarkably good
- Does a number of file formats besides images
- Some of the engines can be slow, especially if the file is large. Dial down the compression level to 5 (normal) to get impressive results but with faster processing.
- Lack of control over quantization
Here are the sample files I used for this quick comparison. Note the original and PngOptimizer files are the same - this is because I saved the original using IrfanView, which seems to compress to the same extent as PngOptimizer.