Link to home
Start Free TrialLog in
Avatar of matt_law
matt_law

asked on

JPEG image manipulation and streaming



I've got to do the following -

1. load an image from a jpeg source
2. plot some points on it, circles; maybe boxes and text later
3. stream the result to file and/or a HTTP response for a servlet


Now, I should really work it out for myself, and the streaming part I've done before. It's the loading and drawing on that has me stumped. I've not done too much image work before and I'm not sure of the best approach.

all tips, pointers etc welcome. thanks.
Avatar of vk33
vk33

Hi!

I would suggest using Java Advanced Imaging API. Have a look here for tutorial and samples code:

http://java.sun.com/developer/releases/jai/

Hope it helps! Good luck!
Avatar of Mick Barry
> 1. load an image from a jpeg source

Load the jpeg file into an Image using getImage().

> 2. plot some points on it, circles; maybe boxes and text later

Graphics g = image.getGraphics();
g.drawRect(10, 10, 30, 30);
g.drawString("Some text", 20, 20);
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of matt_law

ASKER

thanks CEHJ - just what I was looking for, and as I suspected quite simple in the end.

Its for a GPS mapping project - interesting stuff but with an 'tough' deadline so I hadn't really got the time to play around and learn another API in my own time, needed a little boost in the right direction ;)
8-)