Take screen shots inside of full screen applications with java?

 ̄綄美尐妖づ 提交于 2019-12-13 06:42:57

问题


I'm using the standard method of taking screenshots using the Java Robot class, i.e.:

BufferedImage screencapture = robot.createScreenCapture(new Rectangle(tool.getScreenSize()));

This works fine most of the time, but it just takes pictures of a blank screen inside of full screen applications (I'm using Windows 7, so most of these are using Direct X for fullscreen). Is this a known problem for the Robot class or am I doing something wrong?


回答1:


The Robot class cannot capture fullscreen DirectX or OpenGL applications.

I just did some quick Google'ing and found JavaCV. It will be a lot more involved than just using Robot, but JavaCV (mainly the OpenCV wrappers) should allow you to do this. (Don't quote me on it though)...



来源:https://stackoverflow.com/questions/10359754/take-screen-shots-inside-of-full-screen-applications-with-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!