Serverside image processing

2019-08-07 02:59发布

I am designing a web application that does server side image processing in real time. Processing tasks include applying different effects like grayscale, blur, oil paint, pencil sketch etc on images in various formats. I want to build it using java/servlets which I am already familiar with. I found 3 options,

1) Use pure java imaging libraries like java.awt or http://www.jhlabs.com/ip/index.html 2) Use command line tools like Gimp/ImageMagick 3) Use c,c++ image libraries that have java bindings.

I don't know which of the above options is good keeping the performance in mind. It looks like option 2) and 3) are good performance wise, but I want to be sure before I rule out 1). I have also heard gimp cannot be run using command line unless gtk or xwindows is already installed on the server. Will there be any such problems with 2) or 3) while running them server side?

Also please suggest any good image processing libraries for this purpose.

11条回答
劫难
2楼-- · 2019-08-07 03:22

Imagemagick or graphicsmagick are pretty good, you can find wrappers for them in most languages.

There are quite a few online examples and tutorials for image manipulation using these libraries too

查看更多
疯言疯语
3楼-- · 2019-08-07 03:24

I think the best thing to do is try option 1), and if it is not fast enough, try option 2). I am doing server-side image processing in some of my applications and I have found the performances to be quiet good.

查看更多
仙女界的扛把子
4楼-- · 2019-08-07 03:24

I wont be having my own servers. I will have to go with a hosting provider. This makes it a bit complicated when it comes to installing softwares that might require root permissions.

I deployed java servlet on a hosted environment using jhlabs library for simple image processing operations like gray scaling and observed 2 things

  1. Haven't run into problems with headless environment yet. Might hit this issue at a later point when I try to do more complicated image processing operations.
  2. The performance was not bad. But I have to do load testing to make sure that performance is acceptable under realistic load.
查看更多
smile是对你的礼貌
5楼-- · 2019-08-07 03:28

Java would have similar problems in a headless environment were Using Headless Mode in the Java SE Platform not available.

查看更多
女痞
6楼-- · 2019-08-07 03:28

I am developing a web applicaton for online image creation and processing, called rastaq (first preview on http://rq-online.deesceha.de). It is a Java Web Application and all graphics are based on Java 2D. It is extensible by new Operators and Types. Play around and see, how long it takes to recompute an image with new parameters.

The hardware platform is an Intel Quad-Core, 8GB RAM machine.

查看更多
登录 后发表回答