0

If one were to create a site where users could upload images in various formats (JPG, PDF, etc.) and process that image into one monochrome GIF copy and a PDF, what would be the best infrastructure for doing so?

I know that there is already a question about image processing infrastructure, but I would like to know what specific method would be recommended for PHP.

Should I script a PHP background job? Should I store the list of images to process in a database? Should the processing of the images take place in the uploading PHP script?

Thanks in advance for any help.

2
  • the "best" solution will depend on image sizes and transaction volumes. please specify. Commented Oct 1, 2010 at 5:20
  • stillstanding: The average image size should be about that of an average person's scanner's resolution (600x600, or something like that) except in the size of a page. I doubt I can estimate transaction volumes at this point. :) Commented Oct 1, 2010 at 5:34

2 Answers 2

1

It's pretty easy to call an ImageMagick binary to do things to an image. And modern servers are more than fast enough to do it as part of the post-upload processing before returning the success page to the end-user. I work on a commercial site that does exactly that for user uploads and we've never had a problem.

Sign up to request clarification or add additional context in comments.

2 Comments

Very interesting. Thanks, I'll run some tests on this, then get back with a reply.
Alright, it seems to work perfectly fine! Thank all of you for your answers.
0

I would store the uploaded images into a filesystem, not database, and have an external/standalone component take care of the image processing. That component could be anything from a Java to Perl application, not necessarily php.

2 Comments

So you would opt for a long-running process in the background looking through the filesystem for images to process?
Yep. It decouples the uploading part from any processing of the images.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.