Java Screen Capture captureScreen(Rectangle rect)

Here you can find the source of captureScreen(Rectangle rect)

Description

capture Screen

License

MIT License

Declaration

static public BufferedImage captureScreen(Rectangle rect) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright 2011 sikuli.org// ww w. j  a  v a  2s . co m
 * Released under the MIT license.
 * 
 * Contributors:
 *     Tom Yeh - initial API and implementation
 ******************************************************************************/

import java.awt.AWTException;

import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.image.BufferedImage;

public class Main {
    static public BufferedImage captureScreen(Rectangle rect) {
        try {
            return (new Robot()).createScreenCapture(rect);
        } catch (AWTException e) {
        }
        return null;
    }
}

Related

  1. captureScreen()
  2. captureScreen(final Rectangle screenRect)
  3. captureScreen(String filename)
  4. screenshot(Rectangle dims, Robot r)
  5. screenShot(String format)
  6. takeScreenShot(boolean showCursor)