Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
converting into an image file Posted by benges on 22 Mar 2006 at 12:02 AM
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:

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


Now, the problem is that i have no idea how to convert the "img" into an "Image" component, anyone? Thanks a lot.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.