screenshot

Issues with screen capture on OS X - CGDisplayCreateImage

末鹿安然 提交于 2020-01-04 21:29:20
问题 I am using CGDisplayCreateImage(CGMainDisplayID()) to capture screen. When we do a fast user switch to another user, it still captures screen from first user. CGMainDisplayID() on second user returns 1104977152. Any idea why this is happening? My intention is to capture active screen. In case of mirroring, I don't mind capturing the active display. Other than Quartz APIs, any other suggestions? 来源: https://stackoverflow.com/questions/31475656/issues-with-screen-capture-on-os-x

Unable Take screenshot of JFrame Java Swing

℡╲_俬逩灬. 提交于 2020-01-04 11:10:23
问题 I have tried to save the JFrame as an image using the following approach. try { BufferedImage image = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); this.paint(image.getGraphics()); ImageIO.write(image,"png", new File("Test.png")); } catch(Exception exception) { //code System.out.print("Exception unable to write image"); } I am trying to save a screenshot as follows: I would like to have even the title in my screenshot import java.awt.BorderLayout; import java.awt

Unable Take screenshot of JFrame Java Swing

喜夏-厌秋 提交于 2020-01-04 11:10:13
问题 I have tried to save the JFrame as an image using the following approach. try { BufferedImage image = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); this.paint(image.getGraphics()); ImageIO.write(image,"png", new File("Test.png")); } catch(Exception exception) { //code System.out.print("Exception unable to write image"); } I am trying to save a screenshot as follows: I would like to have even the title in my screenshot import java.awt.BorderLayout; import java.awt

Detect when user takes a screen shot in windows with print screen?

随声附和 提交于 2020-01-04 07:10:10
问题 So, I need to, in my application, detect when the user takes a screenshot in Windows by using the print screen keyboard button. I noticed that Picasa does this and notifies the user, this would be very useful in my chat software. It needs to be able to detect it even when the window doesnt have focus. Anyone know how I would do this? Thanks in advance! 回答1: The KeyEvent class has a key code called VK_PRINTSCREEN that represents the PrintScreen key... To listen for it being pressed you would

How to get the screenshot of a minimized application programmatically?

久未见 提交于 2020-01-04 04:54:08
问题 I'm trying to get the screenshot of a minimized application, any ideas of how to it under windows ? I'm using C# tks in advance, Jose 回答1: Restore, take the screenshot, minimize back... If it is not on screen, I don't see how you can make a copy of the image... 回答2: On Vista and later, this should be possible with the Desktop Window Manager. Explorer also displays (animated) screenshots of minimized windows when hovering over a taskbar entry with DWM enabled, so the DWM APIs should be the way

How to capture printscreen event in Javascript?

落爺英雄遲暮 提交于 2020-01-04 03:14:58
问题 I'm trying to write a web application which has some sensitive content in it. I have already prevented copy-and-paste. How do I detect when someone presses the printscreen key, so that the data may be hidden when that is pressed? Do not worry about mobile phones/cameras/ screen recording software, as they are not used in the environment. 回答1: I went googling for the information and I hope the 2 links below will be able to assist you. http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread

How to capture printscreen event in Javascript?

孤街醉人 提交于 2020-01-04 03:13:11
问题 I'm trying to write a web application which has some sensitive content in it. I have already prevented copy-and-paste. How do I detect when someone presses the printscreen key, so that the data may be hidden when that is pressed? Do not worry about mobile phones/cameras/ screen recording software, as they are not used in the environment. 回答1: I went googling for the information and I hope the 2 links below will be able to assist you. http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread

Take a screenshot of a video in a webview android

天涯浪子 提交于 2020-01-04 00:19:23
问题 I am working on a project where I save a screenshot in a WebView. API Level is 21. On a normal homepage it works absolutely fine, but when I visit youtube and watch a video, the video player returns as a black rectangle. What I want to do is take a screenshot whenever the user touches the screen. When I take a screenshot with Power & Volume Button it works perfectly. Is there an Intent which takes this kind of a screenshot? Ideally the screenshot would only contain the webview, but if it's

Take a screenshot of a video in a webview android

萝らか妹 提交于 2020-01-04 00:19:21
问题 I am working on a project where I save a screenshot in a WebView. API Level is 21. On a normal homepage it works absolutely fine, but when I visit youtube and watch a video, the video player returns as a black rectangle. What I want to do is take a screenshot whenever the user touches the screen. When I take a screenshot with Power & Volume Button it works perfectly. Is there an Intent which takes this kind of a screenshot? Ideally the screenshot would only contain the webview, but if it's

How to get screenshot of Application on Android Things device in Android Studio or via ADB?

£可爱£侵袭症+ 提交于 2020-01-04 00:04:07
问题 Is there any way to get screenshot in Android Studio (or via ADB ) for Raspberry Pi 3 Model B with Android Things Developer Preview on it? (any other way not via Android Studio / ADB also accepted). 回答1: It's not a "screenshot", but how about mp4 movie instead? adb shell screenrecord --verbose /sdcard/screen.mp4 --time-limit 1 Though the recorded movie is not correctly recorded, it's still like a "screenshot". (I cannot get a frame out of it using QuickTime Player, but any other tool might be