converting into an image file - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

converting into an image file

bengesbenges Posts: 331Member
Hi all,
any one have idea on how to create an image file(*.PNG) from an applet. What i mean here is that currently i've an applet which there are many character and shape are being drawn on it, and now i need to create an image which will include all the graphics on that particular applet. I'm able to get the graphic from the applet, but to draw and put create it into an image file, i would need to use something like:

[code]
// the g is a Graphics
g.drawImage(img, 0, 0, null);
[/code]

Now, the problem is that i have no idea how to convert the "[b]img[/b]" into an "Image" component, anyone? Thanks a lot.
Sign In or Register to comment.