views:

36

answers:

1

Hi,

I'm trying to find a real time image processing tool that can do image resizing, image/text overlaying and format converting. I found some related posts but they don't quite answer my question.

Prioritized criteria for the tool:

  1. The processing time needs to be less than 100 ms.
  2. The size of output image needs to be small. It needs to convert 1 to 2 megabytes of jpeg image to around 75k.
  3. The quality needs to be good. This is subjective. We know jpeg image conversion loses quality. I hope to find a tool that has better conversion algorithm such that the output is close to the original image.
  4. It can be implemented in java or php.

One commonly used tool is GD library. GD library meets criteria 1 and 2. But the image quality is usually not great, which is the reason I'm still looking.

I tried ImageMagick through command line. The quality is better but the size of output image is also larger. I believe it's also slower than GD.

I wonder what real time image processing tool you'll recommend. If it's GD or ImageMagick, are there tricks to improve the overall performance?

Thank you!

+1  A: 

I'd highly recommend graphicsmagick (http://www.graphicsmagick.org/). It's a fork of imagemagick with more of a focus on performance.

There are also tricks to getting imageMagick/gm to produce smaller images - for example you can strip the colour profiles from the images you create, eg:

gm mogrify -resize 180x180 -quality 75 +profile "*" image.jpg
Aidan Kane