wood burning stoves*
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 Android Security Essentials Live Lessons this week in the Android 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: saving an icon as BMP or jpeg...
 
Similar Threads
Using ImageIO to read a bmp file
[HELP] setting a new icon for SingleFrameApplication
Out of Memory when testing a BMP Bean
BMP
icon related question