screenshot

Android : taking Screenshot of the selected area programmatically

筅森魡賤 提交于 2019-12-19 10:32:35
问题 My code is as follow : protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button upload = (Button) findViewById(R.id.screeshotdButton); upload.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { folderCheck(); } }); } private void folderCheck(){ File folder = new File(Environment.getExternalStorageDirectory() + "/cloze_screenshots"); boolean success = true; // If the folder

How to take snap shot /print screen of client area and save as image in database?

谁说我不能喝 提交于 2019-12-19 10:28:43
问题 I have asked this question before but now with more elaborate way. I working on this for past two months and the result is zero. All i need is .i am allowing the client to create a diagram by dropping the images on a div whose background is a esri Map . When they clik save ,the snapshot of the whole div has to be saved as image in database. If some one could suggest activx plug-in for taking print screen ot capture the client screen .pls suggest EDITED I tried something like savefrom URL ,but

How make a Screenshot of UIElement in WPF

你说的曾经没有我的故事 提交于 2019-12-19 10:11:56
问题 I have a problem with creating a screenshot of a scatterview. My screenshot always contains a black frame. Here's my XAML-Code: <s:SurfaceWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="http://schemas.microsoft.com/surface/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="MakeScreenshots

swift: How to take screenshot of AVPlayerLayer()

淺唱寂寞╮ 提交于 2019-12-19 09:51:50
问题 How to take screenshot of AVplayerLayer. I tried with the following code it works well, it captures the entire view as it was func screenShotMethod() { let window = UIApplication.shared.delegate!.window!! //capture the entire window into an image UIGraphicsBeginImageContextWithOptions(window.bounds.size, false, UIScreen.main.scale) window.drawHierarchy(in: window.bounds, afterScreenUpdates: false) let windowImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() //now

ImageGrab.grab() method is too slow

半腔热情 提交于 2019-12-19 09:46:08
问题 So i need to get a bunch of screenshots every second, like 5. I am using it to program a bot for a game. However imagegrab method takes like 0.3 seconds, which is terribly slow for me. Even after specifying the bbox values it still takes like 0.3 seconds. I think should mention that I am on a mac. Is there a better way for me I even tried the os.system("screencapture filename.png") which has a runtime of 0.15-0.2 seconds which is nice but I want to go faster. 回答1: Another solution is to use

Swift: Cropping a Screenshot without TabBar and NavigationBar

ⅰ亾dé卋堺 提交于 2019-12-19 03:14:42
问题 I have a screenshot of the entire screen, screenshot , generated using the following: let layer = UIApplication.sharedApplication().keyWindow!.layer let scale = UIScreen.mainScreen().scale UIGraphicsBeginImageContextWithOptions(layer.frame.size, false, scale); layer.renderInContext(UIGraphicsGetCurrentContext()) let screenshot = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() I'd like to crop it so that the tab bar is not included, and I tried using the following code:

How to take a screenshot and send by email programaticly on dotnet

白昼怎懂夜的黑 提交于 2019-12-18 18:07:43
问题 Background: I'm developing a bussiness application, and in the final stages we are encountering some extrange errors, mostly with connection and some edge use cases. For this kind of exceptions, we now provide a nice dialog with error details, of which the user take a screenshot, and send by email with some remarks. Problem: I would like to provide a better experience, and provide a single button in the same dialog, wich uppon click, would open outlook and prepare the email, with a screenshot

Screenshot captured using BitBlt in C# results a black image on Windows 10

情到浓时终转凉″ 提交于 2019-12-18 17:28:28
问题 Screenshot captured using BitBlt in c# resulted a black image on Windows 10 . Please help me to resolve this. Screenshot is black image for Chrome (when hardware accelerated mode is on) and IE/Edge windows. Output image is black only for Edge, IE browser windows in Windows 10 and Chrome browser window when hardware accelerated mode is ON. Apart from all other windows including transparent windows screenshots are good. Here is the code: const int Srccopy = 0x00CC0020; var windowRect = new Rect

Taking screenshot with libx11

江枫思渺然 提交于 2019-12-18 17:12:32
问题 I'm currently trying to take a screenshot using libx11 #include <X11/Xlib.h> #include <X11/Xutil.h> #include <stdio.h> int main(void) { XImage* pic; Display* dpl; unsigned int buffer_size; dpl = XOpenDisplay("127.0.0.1:0.0"); pic = XGetImage(dpl, RootWindow(dpl, DefaultScreen(dpl)), 10, 10, 201, 201, AllPlanes, ZPixmap); } if I compile the code using -lX11 and run it I keep getting a segmentation fault. Any ideas? Thanks in advance! 回答1: The X11 server does not usually listen on TCP/IP

Taking screenshot with libx11

一个人想着一个人 提交于 2019-12-18 17:12:11
问题 I'm currently trying to take a screenshot using libx11 #include <X11/Xlib.h> #include <X11/Xutil.h> #include <stdio.h> int main(void) { XImage* pic; Display* dpl; unsigned int buffer_size; dpl = XOpenDisplay("127.0.0.1:0.0"); pic = XGetImage(dpl, RootWindow(dpl, DefaultScreen(dpl)), 10, 10, 201, 201, AllPlanes, ZPixmap); } if I compile the code using -lX11 and run it I keep getting a segmentation fault. Any ideas? Thanks in advance! 回答1: The X11 server does not usually listen on TCP/IP