Sam Carleton wrote:
I am working on a image kiosk system.  One of the things that needs to
happen is downsizing images.  Initially this down sizing was happening
in the GUI part of the program.  I have now modified things so that it
is done real time by the PHP code.  The problem is that the downsizing
is taking much longer in PHP then it did in the GUI (C#).  I am
thumbnail images (up to 16MB source images) and creating web page
style images ( 900x600).

PHP is overkill for something like that. May I suggest a CGI perl script using Image::Magick to scale images? It is very similar to C, but is a scripted language (allowing "watermarks" on images, too!)


I am looking for options to speed things up.  My first thought is to
keep it simple and write a CGI program in C++ (a language I know and
love), but I am a little concerned about the startup cost of calling
CGI.  When there are up to 100 different browsers hitting the server,
will there be any big speed benefits to developing an apache module
rather then CGI?  I do get the impression that there is quite a bit of
framework code to write in doing apache modules, so I am also thinking
that I might want to look at FastCGI.

If performance is an issue, consider mod_perl along with it. It keeps the CGI in memory to eek out a bit more performance. Otherwise, you can use C to create a binary and link it statically with the ImageMagick libraries. (IM seems to be most efficient). Google is your friend here!

--
Joseph Lewis <http://sharktooth.org/>
"Divide the fire, and you will sooner put it out." - Publius Syrus

Reply via email to