blazing EPEGKrzysztof Adamski suggested I try out epeg on github, which uses libjpeg, and is touted as being "An IMMENSELY FAST JPEG thumbnailer library API".
I just did a few tests, and it does indeed seem insane-fast: I'm seeing ~1.1 second to generate a good looking 16KB image at the same 10% target size first attempt; In comparison to the fastest imagemagick option, "sample", the result is 6 times faster, is around 1/3 of the filesize (60KB) and looks about the same. The quality can be reduced further, eg to "50" using the quality parameter, which executes in the same amount of time (~1 second) but makes for a significantly smaller image (16KB) which looks similar, albeit less vibrant. Amazing results!
take a look
... with resize.jpg taking ~25.5s, scale.jpg ~5.7s and the epeg version taking just ~1.1 second (average of 3 iterations).
epeg & libjpeg setup/compile/installThere's no binary, so needed to compile. Here're the relevant steps/resources:
- libjpeg, download, make, install:
- I was getting an error when trying to run the "epeg" command afterwards; "epeg: error while loading shared libraries: libepeg.so.0: cannot open shared object file: No such file or directory".
- Fortunately, I found someone who'd had a similar error message back in 2005
- fix for me: I ran "ldconfig", and after that things worked
- epeg is Fantastic Fast :)
- stackexchange's raspberrypi forum is great! (as is Krzysztof Adamski)