screenshot

trying to delay part of my program

感情迁移 提交于 2021-02-05 11:42:10
问题 Im trying to take a snapshot of the webpage i open but i need to delay the second part of the code so that the program has time to open the page Here is the code import os import sys import time import Image import ImageGrab import webbrowser webbrowser.open_new(input("URL: ")) #Need to delay here SaveDirectory=r'C:\Documents and Settings\User\My Documents\My Pictures' ImageEditorPath=r'C:\WINDOWS\system32\mspaint.exe' img=ImageGrab.grab() box = (100, 100, 400, 400) region = img.crop(box)

How to take a screenshot of a second screen monitor?

独自空忆成欢 提交于 2021-02-04 16:23:05
问题 I need get a screenshot of a second screen monitor. I found a simple way to make a screen shot, but only works for screen shot of a primary monitor. Here is the code: #include <windows.h> void ScreenShot(char*BmpName){ HWND DesktopHwnd = GetDesktopWindow(); RECT DesktopParams; HDC DevC = GetDC(DesktopHwnd); GetWindowRect(DesktopHwnd, &DesktopParams); DWORD Width = DesktopParams.right - DesktopParams.left; DWORD Height = DesktopParams.bottom - DesktopParams.top; DWORD FileSize = sizeof

PowerShell Screen Capture

为君一笑 提交于 2021-02-04 06:50:45
问题 I have been stuck on this for last day or so and I think its something small that I just can't see. To summarize the code: Powershell script that will run every 60 seconds to take a screen capture. On Windows Server 2012 this works perfectly fine. While on Windows 7, only first screen shot is taken and then all after are "blank" with just white space the size of dimensions. Any Ideas why this happens? I also attempted to remove the bigger while loop and do a scheduled task that runs every 5

How to increase the size of the Screenshot Thumbnails in ExtentReports 4.0.9

左心房为你撑大大i 提交于 2021-01-29 20:01:36
问题 I'm trying to customize ExtentReports 4.0.9 When I'm opening report after test fails, It displays screenshot as very small thumbnails. How can i increase size of the Thumbnail. I've tried extent-config.xml <!-- custom styles --> <styles> <![CDATA[ .featherlight-image { border: 1px solid #f6f7fa; cursor: zoom-in; width: 100px; } ]]> </styles> Screenshot is : https://imgur.com/eSy5fLz but it didn't work. Please suggest How can i Increase the size of thumbnail. 回答1: I have researched about it

Taking a screenshot of phone screen programmatically with xamarin

拜拜、爱过 提交于 2021-01-29 18:56:00
问题 I am trying to take a screenshot of my android device programmatically. I have found dozens of Questions and posts, years old and not current. For example: How to programmatically take a screenshot on Android? The Approach works in the way of taking a screenshot of my main application window. But I I want to take a screenshot of the whole device including other apps! example: Instead of the "Internal Storage" + Control overlay, the original app is recorded or alternatively, the tiny view of

Powershell ScreenShot of a particular part

戏子无情 提交于 2021-01-29 15:41:47
问题 I want to take a screenshot of a very particular part of the screen. As if I just want to take a screenshot of an image in the centre of the screen. How can I do that? How can I setthe alignment to only crop a particular area. I got the code from stackoverflow only to take a screenshot: [Reflection.Assembly]::LoadWithPartialName("System.Drawing") function screenshot([Drawing.Rectangle]$bounds, $path) { $bmp = New-Object Drawing.Bitmap $bounds.width, $bounds.height $graphics = [Drawing

How do I take an Screenshot of my camera on EMGUCV 3.1?

这一生的挚爱 提交于 2021-01-29 05:30:52
问题 I'm doing a very simple program on EMGU CV, so I need to take a screenshot of what my camera is recording and save it in a specific folder, here follows my code of camera capture: ImageViewer viewer = new ImageViewer(); VideoCapture capture = new VideoCapture(); Application.Idle += new EventHandler(delegate (object sender, EventArgs e) { viewer.Image = capture.QueryFrame(); }); viewer.ShowDialog(); I apologize for the simple terms, I still really noob in programming. 回答1: It seems like you

Disable running screen capture software in Java app

柔情痞子 提交于 2021-01-28 07:09:42
问题 I found similar questions here, but not with this approach and problem. I have a program which does some mathematics. At the moment, results are written in .doc file. But, this file can be shared through network. I want to disable it by writing results in label. But, again, screen can be captured. So, I found many ideas for preventing this, but the most interesting to me is that to detect and disable all screen capture software running on the system, and periodically (if it is possible)

c/c++ assign RGBQUAD array to a bitmap

丶灬走出姿态 提交于 2021-01-28 05:20:27
问题 i am doing a program where you take a screenshot of a window and then scan every pixel of that picture. But I have a problem assigning RGBQUAD array to the taken screen. Every pixel has the same RGB which is 205. Here is a piece of my code: RGBQUAD *pixel = malloc((ssWidth * ssHeight)* sizeof(RGBQUAD)); hdcScreen = GetDC(gameHandle); hdc = CreateCompatibleDC(hdcScreen); hBmp = CreateCompatibleBitmap(hdcScreen, ssWidth, ssHeight); SelectObject(hdc, hBmp); BitBlt(hdc, 0, 0, ssWidth, ssHeight,

Custom View component is not showing up on the screenshot

大憨熊 提交于 2021-01-27 18:04:55
问题 I have a custom view named as HorizontalScaleView public class HorizontalScaleView extends View { private static float THICK_STROKE_WIDTH = 16.0f; private static float THIN_STROKE_WIDTH = 8.0f; private static float THINNER_STROKE_WIDTH = 4.0f; private int mColorStartGradient; private int mColorEndGradient; private int mColorOptimum; private int mColorLineGradientStart; private int mColorLineGradientEnd; private int mColorDarkerGrey; private int mMaxOptimumValue = 1000; private Paint