how to write java.awt.Image to a file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andre_Schneider
Posted On:   Monday, October 14, 2002 05:01 AM

hi there,
i want to write a small programm that should generate

thumbnails from images.

to read and scale the image i use :

			
BufferedImage image = ImageIO.read( new File( "test_old.jpg" ) );
double scale = 1.5;
Image image2 = image.getScaledInstance( (int)( image.getWidth()*scale ) , (int)( image.getHeight()*scale ) , image.SCALE_DEFAULT );

but now i don't know how to write the image to a file.



thanks for replies



Schneider Andre

Re: how to write java.awt.Image to a file

Posted By:   James_Bayer  
Posted On:   Monday, October 14, 2002 07:17 AM

It looks like sun has provided a new api for this with 1.4. Check out this link
http://java.sun.com/j2se/1.4/docs/guide/imageio/index.html


Good luck!

About | Sitemap | Contact