my dog learned polymorphism*
The moose likes Beginning Java and the fly likes saving canvas as an image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "saving canvas as an image" Watch "saving canvas as an image" New topic
Author

saving canvas as an image

mario tan
Greenhorn

Joined: Mar 09, 2005
Posts: 10
Hi guys!

I am a beginner in designing a java application and I posted this message because I knew you guys can help me. Just want to ask if how could you save a canvas in a java application as an image (i.e .gif, .jpeg, etc.)?

Could you gave me a simple and brief example for doing this?

Thanks!

-mario
thejaswini ramesh
Ranch Hand

Joined: Oct 19, 2005
Posts: 74
Hi Mario,
I too am a beginner...seeing your post i just remembered i had to do this once.Am not sure if you want to write a code to save your application as a gif.I think this link may be useful:

http://forum.java.sun.com/thread.jspa?threadID=173336&messageID=2044327

In my case i needed the image of a GUI as a .gif file to insert in the help menu.For this you can capture the screen with shift+printscreen and edit it with some editor like paint and then save the image.Hope this is useful to you.

Thejaswini.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Saving a Generated Graphic to a PNG or JPEG File


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: saving canvas as an image
 
Similar Threads
[Solved] Clear SurfaceView
Previous image does not clear on repainting Canvas in a loop with different positions
hi helpme
How save canvas element?
printer and canvas