Earlier this year, Dropbox open-sourced Lepton, a lossless image compression algorithm which can reduce the size of JPEG images by an average of 22%.
The technology converts your target JPEGs into the compacted LEP format, and restores the original version on demand.
Dropbox is using Lepton right now to save bandwidth and storage space, and if you grab a copy of the Windows build then you can try it, too.
The program is a single executable which you’ll need to run from the command line. At a minimum all you have to do is provide a target file name, like this:
lepton.exe picture.jpg
Supply the program with a JPG, it converts it to a LEP; provide a LEP and it’s restored to a JPG.
There are some issues here with Lepton’s input parsing. You must enter “.exe” on the command line, for instance– using “lepton picture.jpg” gets you an unhelpful error message. And if your path contains spaces, you must surround it with quotes or the program crashes (lepton.exe “c:\my pics\picture.jpg”).
On the plus side, the program has many more conversion options than you might expect. You can tweak its use of multi-threading, optimise memory usage, create zlib-compressed jpegs, maybe even act as a compression server to other systems on your network. Run lepton.exe without any command line switches to find out more.
If you find command line tools too much hassle, we’ve done a quick and very basic front end, LeptonGUI. This has a window where you can open or drag and drop files, convert the full set with a click and see your compression rates.
In our first tests Lepton delivered excellent results. We saw average compression rates from 20-25% on different sets of JPEGs, and a few images dropped by 50% or more.
Lepton is a great proof of concept, and a must-see for anyone interested in archiving or compression. The “basic” input parsing makes us wonder if there might be other problems lurking in the code, though, so it’s probably not wise to use the program as your sole archiving tool. Or at least, do lots, and lots, and lots of testing first.
Your Comments & Opinion