RkBlog

Hardware, programming and astronomy tutorials and reviews.

PIL is great

In my job I got a task to check what can make good thumbnails of big JPEGs in shortest time. As the site is written in PHP I've tested MagicWand and GD plus PIL and EPEG. Making thumbs from few pictures (40MB) took for MagicWand Resize 4,7s, MagicWand Scale 1,77s, GD 0,8s, PIL 0,2s, EPEG 0,15s. EPEG is a e17 library which is designed to make JPEG thumbs but it lacks extra filters (sharpen) so the thumbs aren't top quality. PIL has antialias, sharpen and preserves ratio by default and is faster than GD and imagemagick (convert and MagicWand in PHP) so PIL won.

RkBlog

Python programming, 14 July 2008, Piotr Maliński

Comment article