Recommendation for real time image processing tools on Linux [closed]

删除回忆录丶 提交于 2020-01-06 11:07:08

问题


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:


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


来源:https://stackoverflow.com/questions/3461031/recommendation-for-real-time-image-processing-tools-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!