Recommendation for real time image processing tools on Linux [closed]
开发者_Go百科
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this questionI'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:
- The processing time needs to be less than 100 ms.
- The size of output image needs to be small. It needs to convert 1 to 2 megabytes of jpeg image to around 75k.
- 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.
- 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!
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
精彩评论