Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Java in General and the fly likes Saving an ImageIcon to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Saving an ImageIcon to a file" Watch "Saving an ImageIcon to a file" New topic
Author

Saving an ImageIcon to a file

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
How do I save an image icon in a file. It also has to be in a format that
a web page would be able to display.

Thanks.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 9069
    
    9

ImageIcon has a getImage() method. javax.imageio.ImageIO can write RenderedImage instances to file. How do you convert between an Image and RenderedImage instance?


[How To Ask Questions On JavaRanch]
 
 
subject: Saving an ImageIcon to a file