|
Posted by Raj Shekhar on 08/01/05 01:13
"Jim" <jimyt@yahoo.com> writes:
> I've heard that resizing images through PHP (either GD2 or ImageMagick)
> is a processor intensive exercise. I'm setting up a site where users
> will be uploading up to 10 images along with the details of their
> product. For each image uploaded (max 500Kb), I'll be resizing it to
> create a small, medium and large version after which I'll discard the
> original.
I had used ImageMagick to resize images on a dual Intel Xenon
processor and found that the process was fast enough. Yes, the
process took up the CPU, but I the CPU did not get unduly overloaded.
If you have a slower processor, you will face problems.
The reason for not using GD libraries was that the server came with
GD1 and not GD2. GD1 did not have a few capabilities we wanted (true
colors, iirc)
> My worry is that as the site becomes more popular, the processor
> time spent resizing images could badly effect the other areas of the
> site (viewing/searching products).
Serving pages, querying database backend are memory intensive
processes, not cpu bound processes.
> I saw somewhere on usenet a comment that using exec() to launch
> ImageMagick to resize was quicker than using the PHP GD2 or ImageMagick
> API, anyone had any experience of this?
try to compare their outputs. Both of them take up CPU power.
Benchmark some images yourself using both the methods before going in
for any one of them. You can build your own Image class and then
change the underlying driver from IM to GD as your benchmarks
indicate.
--
Raj Shekhar
blog : http://rajshekhar.net/blog home : http://rajshekhar.net
Disclaimer : http://rajshekhar.net/disclaimer
Navigation:
[Reply to this message]
|