This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes saving an icon as BMP or jpeg... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "saving an icon as BMP or jpeg..." Watch "saving an icon as BMP or jpeg..." New topic
Author

saving an icon as BMP or jpeg...

Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
Does java support this functionality ? that is , reading an icon and saving it as bmp or .jpg???
i saw on sun's site that j2se 1.4 has included the package imageio in 1.4.
Does it solve my purpose?
thanx in advance
Rashmi
Thomas Smets
Ranch Hand

Joined: Dec 11, 2001
Posts: 111
Yeap it should be do-able :
From ImageIcon
you can request the getGraphics()
One ce you have the graphic you should be able to use the class :

import com.sun.image.codec.jpeg.JPEGImageEncoder;
import com.sun.image.codec.jpeg.JPEGCodec;

To do whatever you want ...
But no GIF's due to Copyrights
Thomas,


Thomas Smets
Just another developper
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: saving an icon as BMP or jpeg...
 
Similar Threads
BMP
[HELP] setting a new icon for SingleFrameApplication
icon related question
Out of Memory when testing a BMP Bean
Using ImageIO to read a bmp file