Forums Register Login

Saving a graphics to an image

+Pie Number of slices to send: Send
Say i have a regular BufferedImage and I draw a polygon ROI over it. I want to be able to save the ROI and the underlying image as a new jpg image - does anybody have simple code to do what I just described? Or at least can you tell me how I can get access to the Graphics2D objects themselves and burn them onto the image
+Pie Number of slices to send: Send
Take a look at this article, it might answer some of your questions:
http://www.javaworld.com/javaworld/jw-05-2000/jw-0505-servlets.html
+Pie Number of slices to send: Send
The java advanced imaging api should have everything you need. There are encoders and decoders available (including jpg). There is also a tutorial on how to use jai on sun's web site.
API
JAI Download
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 645 times.
Similar Threads
Help needed regarding Accessing JNI through JSP
Is there a getPoints for a Graphics or Graphics2D object
Should I leave
how to get value of Label attribute of a textfield element in struts2
How can i randomly viewing image on jsp from the database
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:48:20.