Re: [Slightly OT] Standardizing image uploads/making thumbnails

[prev] [thread] [next] [Date index for 2005/03/26]

From: jonathan vanasco
Subject: Re: [Slightly OT] Standardizing image uploads/making thumbnails
Date: 18:29 on 26 Mar 2005
This is just a followup to an earlier question about efficiently 
thumbnailing images.

I benched everything I could find, which meant the following:
   netpbm
   ImageMagick
   GD
   Imager

And did so using a 90kb jpg that is scaled to fit a 200x200 box

The GD  jpgs didn't look good.  So i threw them out of the running.

Using netpbm, you chain different apps from one to another.  djeg/cjpeg 
from the underlying jpg library offer their own methods to read/write 
from the netpbm formats.  reading is considerably faster.  writing was 
often faster, and over several thousand benchmarks proved to be faster 
-- but was much slower at times as well.
	
That said, i benchmarked each section
	reading a jpeg file
		djpeg				0.029
		jpegtopnm			0.169
	
	writing a jpeg file
		djpeg				0.003
		jpegtopnm			0.006
	
	scaling a jpeg file 	
		pnmscale 			0.199

Full benchmarks
	Fastest NetPBM options  	- 0.241
	ImageMagick 			- 0.223
	Imager  				- 0.402

Every thread I've read has suggested that Imager and Image magick would 
be the slowest.  ImageMagick ended up being the fastest.

I couldn't help myself, and tried doing it in python as well, using the 
Python Imaging library.
Within the python environment, it took .07 to do the same 
read/transform/write
Launching a shell script that uses that library from perl (which would 
include the time of invoking a python interpreter) :
	PythonImaging Library 	- 0.113

Perhaps this info will help someone else in the future.

Re: [Slightly OT] Standardizing image uploads/making thumbnails
jonathan vanasco 18:29 on 26 Mar 2005

Generated at 15:10 on 27 Mar 2005 by mariachi v0.52