Archive for September, 2012
WideImage performance and memory issues
Hi! in the previous post Trying to resize a set of large images in PHP I wrote that WideImage takes a lot of memory to resize big images, it was around 140MB and WideImage was resizing my images during ~30 seconds.
I’ve been thinking about this performance and memory issues and decided to write some PHP code that do the same but without WideImage library. I’ve used these PHP functions getimagesize, imagecreatefromjpeg, imagecreatetruecolor, imagecopyresized, imagejpeg and imagedestroy.
To my surprise, my custom PHP code do the same during ~15 seconds and takes only 250KB of memory!!! So, I think there are some problems with performance and memory in WideImage library. For me, the custom code that works faster and takes very less memory is a great solution.