For years, I have been using ImageMagick to resize large images into thumbnails. Few weeks ago I encountered a server issue where several convert processes took up most of the server's memory and things went haywire.
I started to look for alternatives: better performing image resizing software that does the same thing but with less processing power and/or memory consumption.
I found a git repository called speedtest-resize that compares various image resize algorithms.
I took few large images and converted them to 4 different sized thumbnails using fastjpeg and libvips, repeated the process 100 times and measured the time taken.
I did not expect the difference to be that big, but libvips performed approximately 50-60% faster than ImageMagick - no matter what I threw at it.
Using libvips's vipsthumbnail command is easy:
vipsthumbnail source.jpg -s 100x100 -o output.jpg[Q=90,optimize_coding,strip]
If you do a lot of server-side image resizing, I recommend you give libvips a try. It's faster – a lot faster.
1. optimize_coding is described as "compute optimal Huffman coding tables", whatever that means.
Jari Lehtinen – Web Developer Made in Finland – email@example.com – @jarilehtinen