随笔 - 25, 文章 - 1, 评论 - 0, 引用 - 0
数据加载中……

[Java]-[截图]-[获取屏幕某点的RGB]-[代码]

    public static String getHexRGB(int x, int y, Robot robot) {
        
if (robot == null)
            
return "null";
        Dimension dimension 
= Toolkit.getDefaultToolkit().getScreenSize();
        BufferedImage bi 
= robot.createScreenCapture(new Rectangle(00,
                dimension.width, dimension.height));
        
return Integer.toHexString(16777216 + bi.getRGB(x, y));
    }

posted on 2010-10-29 09:49 至尊贝贝 阅读(336) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: