jdk 1.4대 버전에서 지원하는 ImageIO클래스를 이용하면 될듯 싶습니다.

--------------------------------------------------------------------------------------------------


import java.awt.image.BufferedImage;
import java.awt.Graphics2D;
import java.awt.Color;
import java.io.File;
import javax.imageio.ImageIO;

public class SaveImage {

  public SaveImage() {
  }
  public static void main(String[] args) {

   // 200 x 200 사이즈로 RGB 색생을 이용하는 BufferedImage 객체를 생성한다.
   BufferedImage image = new BufferedImage(200,200, BufferedImage.TYPE_INT_RGB);

   // 그림을 그리기 위해 Graphics2D를 얻어온다.
   Graphics2D graphics = image.createGraphics();

   // 노란색으로 설정한다.
   graphics.setColor(Color.YELLOW);

   // 0,0 부터 200 x 200 사이즈인 사각형으로 채운다.
   graphics.fillRect(0,0,200,200);

   // C:\test.jpeg 파일로 저장한다.
   try {
     File file = new File("C:\\test.jpeg");
     ImageIO.write(image, "jpeg", file);
   }
   catch (Exception e){
     e.printStackTrace();
   }

  }
}

크리에이티브 커먼즈 라이센스
Creative Commons License
2007/01/24 17:37 2007/01/24 17:37
tagged with  ,
REPLY AND TRACKBACK RSS http://www.soulfree.net/rss/response/177
REPLY AND TRACKBACK ATOM http://www.soulfree.net/atom/response/177
TRACKBACK ADDRESS
http://www.soulfree.net/trackback/177
REPLY RSS http://www.soulfree.net/rss/comment/177
REPLY ATOM http://www.soulfree.net/atom/comment/177
이름 :
비밀번호 :
홈사이트 :
비밀글 :
*1 
count total 196432, today 354, yesterday 424
rss
I am
알립니다
전체
일상
영어공부
Hardware
Software
파일서버
지식 & 상식
Music, Movie, Game
Baseball & Lotte Giants
Soccer & Ulsan HyunDai
For A Foreign Visitor
프로그래밍및실험II
달력
«   2008/12   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31