See also e670 缓冲图像转换为图像.

    try {
Robot robot = new Robot(); // Capture a particular area on the screen
int x = 100;
int y = 100;
int width = 200;
int height = 200;
Rectangle area = new Rectangle(x, y, width, height);
BufferedImage bufferedImage = robot.createScreenCapture(area); // Capture the whole screen
area = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
bufferedImage = robot.createScreenCapture(area);
} catch (AWTException e) {
}
Related Examples

e864. 取的显示器大小尺寸的更多相关文章

  1. Selenium2学习-034-WebUI自动化实战实例-032-获取页面 body 大小

    获取 body 元素大小的方法,非常简单,直接上码,敬请参阅! /** * Get body size * * @author Aaron.ffp * @version V1.0.0: autoSel ...

  2. 取文件的大小 (KB,MB,GB...)

    取文件的大小 (KB,MB,GB...) 2种方式: VB 和 C# 1,  VB Public Function GetFileSize(ByVal iFileSizeKB As Long) As ...

  3. cimge 这次能够图片大小尺寸

    CImage imSrc,imDest;imSrc.Load(……);//读入原始图片imDest.Create(……)//创建新大小的图片imSrc.StretchBlt(imDest.GetDC( ...

  4. wift - 使用UIScreen类获取屏幕大小尺寸

    UISreen类代表了屏幕,开发中一般用来获取屏幕相关的属性,例如获取屏幕的大小. 1 2 3 4 5 6 7 //获取屏幕大小 var screenBounds:CGRect = UIScreen. ...

  5. Java-获取堆的大小

    package com.tj; public class getHeapInfo { public static void main(String[] args) { //获取当前堆的大小 byte ...

  6. Python-读取文件的大小

    1.python读取文件以及文件夹的大小 1. os.path.getsize(file_path):file_path为文件路径 import os os.path.getsize('d:/svn/ ...

  7. PHP获取图片宽度高度、大小尺寸、图片类型、用于布局的img属性

    //php自带函数 getimagesize()$img_info = getimagesize('tomener.jpg'); echo '<pre>'; print_r($img_in ...

  8. JQuery拖拽元素改变大小尺寸

    <!DOCTYPE html><html> <head> <title></title> <style type="text ...

  9. java整型byte,short,int,long取值范围大小

     byte 1个字节 short 2个字节 int 4个字节long 8 个字节 varchar 可变长度的非Unicode数据,最长为8000个字符nvarchar 可变长度Unicode数据,最长 ...

随机推荐

  1. Win7 下面升级VS2017 vs_community install Microsoft.Windows.D3DCompiler.Msu.Win7

    因为.NET Framework 4.7 WPF 功能采用D3DCompiler_47.dll依赖项.默认情况下,此 D3DCompiler_47.dll 并不是存在于 Windows 7 SP1,W ...

  2. Java 编程下正则表达式判断字符串是否包含中文

    package cn.sunzn.demo; import java.util.regex.Matcher; import java.util.regex.Pattern; public class ...

  3. Eclipse 使用 SVN 插件后修改用户方法汇总

    http://blog.csdn.net/ShaneLooLi/article/details/50994005 ******************************************* ...

  4. LeetCode: Gas Station 解题报告

    Gas Station There are N gas stations along a circular route, where the amount of gas at station i is ...

  5. Python(五)之迭代器和列表解析

    Python迭代器和列表解析 迭代器 例如: In [1]: l1 = [1,2,3,4,5] dir(i1)可以看到内置方法'__iter__' 生成一个迭代器: l1.__iter__,或i2 = ...

  6. 【windows】查询占用端口的程序——记一次解决webloigc启动失败的过程

    . . . . . 我们经常使用的网络程序偶尔会遇到端口被占用的情况,但是却苦于无法找到占用端口的程序,这篇文章将教你两个命令,轻松排查端口占用问题. 关键命令: 1.查询端口占用:netstat - ...

  7. Java后端,应该日常翻看的中文技术网站<转>

    你还在学习吗? 1.内容生产者 InfoQ中文技术第一站,佩服霍老板,真金白银地为中国程序员们生产内容. ImportNew专门面向Java的内容生产者兼聚合者,偶然也有些面向入门的小白文. 并发编程 ...

  8. python多进程并发

    由于Python下调用Linux的Shell命令都需要等待返回,所以常常我们设置的多线程都达不到效果,因此在调用shell命令不需要返回时,使用threading模块并不是最好的方法.   http: ...

  9. 根据时间获取最新数据 SQL(每一个人或者每一项)

    -- 方法1 select a.* from table1 a from table1 b where b.name=a.name and b.gdtime>a.gdtime) -- 方法2 s ...

  10. Redis键

    Redis的keys命令用于管理键.使用Redis的keys命令语法如下所示: 语法 redis 127.0.0.1:6379> COMMAND KEY_NAME 例子 redis 127.0. ...