screenshot

GTK/GDK Algorithm to take full screenshots of all monitors

ε祈祈猫儿з 提交于 2019-12-23 22:30:15
问题 I'm fairly new to the whole GTK game and want to create an algorithm to take screen shot of all monitors. I was thinking something along these lines: gdk_display_manager_list_displays each display can have multiple screens (screens means monitors?) so use gdk_display_get_n_screens to get monitors per display from 1 get root gtk window of all screens from 2 create new Pixbuf for each root gtk window for each screen from 3 with gdk_pixbuf_new fill each pixbuf from 4 with gdk_pixbuf_get_from

How to take youtube screenshot

依然范特西╮ 提交于 2019-12-23 21:34:38
问题 <script src="jquery.js"></script> <video id="video" controls preload="none" width="640" poster="http://media.w3.org/2010/05/sintel/poster.png" onloadedmetadata="$(this).trigger('video_really_ready')"> <source id='mp4' src="http://media.w3.org/2010/05/sintel/trailer.mp4" type='video/mp4' /> <source id='webm' src="http://media.w3.org/2010/05/sintel/trailer.webm" type='video/webm'/> <source id='ogv' src="http://media.w3.org/2010/05/sintel/trailer.ogv" type='video/ogg' /> </video> <br /> <input

Taking Screenshot of Full Desktop with Qt5

走远了吗. 提交于 2019-12-23 21:06:30
问题 I figured out how to take a screenshot of the desktop today with Qt5 from an included example which gets the primary screen, grabs it, and then saves it. I'm translating the code from Python without testing so if there's a small syntax error, then yeah you know. So I can easily take a screenshot of the primary screen with: QApplication a(argv, argc); QScreen *screen = a.primaryScreen(); QPixmap screenshot = screen->grabWindow(0); screenshot.save('screenshot.png', 'png'); This will (obviously)

Take screenshot of any external application using C#

浪子不回头ぞ 提交于 2019-12-23 20:54:16
问题 We have a C# (WPF) application in which we want to take a screenshot of an arbitrary application launched by us (i.e. so we have a reference to the Process we started). The application may be minimized or behind other windows but we still only want the image of the individual application, not overlapping pixels. I know the typical P/Invoke solutions using BitBlt or PrintWindow work most of the time, but those fail (I only get black/transparent pixels) when dealing with an DirectX or OpenGL

HTML div to screenshot?

梦想的初衷 提交于 2019-12-23 18:17:55
问题 I tried to google it, but without much success. Here is my problem: I have something like a drag-and-drop game in jQuery, where the user drags some items (div with img) to the droppable drawing area. I need a screenshot of the users design so I can put all designs into a gallery page. My problem is how to get the HTML code into a jpeg/png/gif/canvas/whatever. Btw. I'm on a shared PHP hosting on the server side. 回答1: You're doing it wrong. Store each piece's location at all times in javascript

Take Screenshot of whole screen

让人想犯罪 __ 提交于 2019-12-23 16:55:04
问题 I have seen a lot of code snippets for taking a screenshot but was not able to get something which takes the screenshot of the whole screen and not just a view. It should replicate the way we get screenshot using ddms. Can someone help? 回答1: There is an Android Screenshot library, which is available here. There wiki pages says library can be used to take screenshot of entire screen without the need of root level access, even from an unsigned application. I have never tried it though. You can

Capture WebDriver Screenshots When Running Parallel Tests With TestNG

半世苍凉 提交于 2019-12-23 16:16:43
问题 I am currently capturing screenshots on failure and success in TestNG by way of overriding the TestListenerAdapter methods onTestFailure, and onTestSuccess respectively. In order to do this you need to specify which driver you want to take a screenshot of. My question: Is there a good way to capture screenshots when running tests in parallel on the method level? In order to run tests in parallel, each individual test needs a unique driver instance. So, at any given time you have x number of

c++ Directx11 capture screen and save to file

女生的网名这么多〃 提交于 2019-12-23 12:20:03
问题 i've got problem with saving texture2d to file, it always gives me black image. Here is code: HRESULT hr = SwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), reinterpret_cast< void** >( &g_pSurface ) ); if( g_pSurface ) { ID3D11Texture2D* pNewTexture = NULL; D3D11_TEXTURE2D_DESC description; g_pSurface->GetDesc( &description ); description.BindFlags = 0; description.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; description.Usage = D3D11_USAGE_STAGING; HRESULT hr =

Get a screenshot of the web browser control?

我是研究僧i 提交于 2019-12-23 10:26:44
问题 There are a lot threads about this but none of them were clear and none I tried actually even worked right. What is the code to get the contents of the entire web browser control (even that which is off screen)? It looks like they did have: webBrowser1.DrawToBitmap(); // but its unsupported and doesnt work 3rd party api - not wasting my time .DrawToBitmap and nonanswer-links 100 wrong answers just takes a screenshot 回答1: I was working on a similiar function in my project last week, read a few

Android Things: take a screenshot

和自甴很熟 提交于 2019-12-23 09:34:09
问题 How do you take a screenshot via ADB for Android Things? I have tried: adb shell screencap -p /sdcard/screen.png adb pull /sdcard/screen.png adb shell rm /sdcard/screen.png and adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png 回答1: I couldn't make screepcap work in Android Things Developer Preview . The command results in a 0-size file. That said, I recommend the following two options: either use the framebuffer or record a video ( screenrecord seems to work) and convert it