4,579,411 th visitor since 2017.2.1 ( Today : 297 )
Programming
No. 662
Name. swindler
Subject. Java 화면캡쳐
Main Cate. Java
Sub Cate.
Date. 2009-09-25 11:51
Hit. 7148 (211.36.27.8)
File.
JDK1.5에 생겨난 기능중에
화면캡쳐를 할수도 있구나 ^^

package com.dnt7;

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;

public class Capture {

    public static void main(String [] args)
    {
     try
     {
     // 전체 화면 Capture
     BufferedImage screencapture = new Robot().createScreenCapture(
     new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()) );
    
     // JPEG 저장.
     File file = new File("screencapture.jpg");
     ImageIO.write(screencapture, "jpg", file);
     }
     catch (HeadlessException e)
     {
     e.printStackTrace();
     }
     catch (AWTException e)
     {
     e.printStackTrace();
     }
     catch (IOException e)
     {
     e.printStackTrace();
     }
    }
}


[바로가기 링크] : http://coolx.net/cboard/develop/662



son 화면이 까맣게 저장되는데 왜그런거죠ㅠㅠ 브라우저에서 막아논거 같은데 익스 크롬 둘다 같은 현상인데 해결 방법이 없나요 2014-11-03
Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog