This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 8833
    
    7

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


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Saving an ImageIcon to a file
 
Similar Threads
java io
Creating a file by giving relative path
WA #1.....word association
performance issues with file read and write
Struts FormFile (parsing .csv files)