screen-capture

Capture image with imagegrabscreen and Wamp

余生颓废 提交于 2019-12-12 09:34:08
问题 I'm trying to capture a local web page with imagegrabscreen but I only get a black screenshot. I tried almost every solution from questions here on SO and others sites and nothing works. I'm using and done the following: Windows 7 64bit Wamp 2.2a 64bit PHP 5.3.8 gd2 (version: "bundled 2.0.34 compatible") is installed and enabled. Allowed the apache service to interact with the desktop. I don't have a secondary display or anything. <?php $im = imagegrabscreen(); imagepng($im, "myscreenshot.png

DirectX Screen Capture - Desktop Duplication API - limited frame rate of AcquireNextFrame

狂风中的少年 提交于 2019-12-12 09:26:45
问题 I'm trying to use Windows Desktop Duplication API to capture the screen and save the raw output to a video. I'm using AcquireNextFrame with a very high timeout value (999ms). This way I should get every new frame from windows as soon as it at has one, which naturally should be at 60fps anyway. I end up getting sequences where everything looks good (frame 6-11), and then sequences where things look bad (frame 12-14). If I check AccumulatedFrames lFrameInfo.AccumulatedFrames the value is often

Media Foundation h264 encoder poor performance

南笙酒味 提交于 2019-12-12 04:37:35
问题 Media Foundation h264 encoder poor performance I'm writing an application which records PC's screen in realtime and encodes it with Media Foundation h264 codec. Encoding consumes a lot of CPU resources. And after I stop recording video (or pause it by simply stopping feeding an encoder with video and audio frames), CPU load stays very high for a long period of time (5-10 seconds and more). During this time application waits until IMFSinkWriter::Finalize method completes. My PC configuration:

Cocoa - capture mouse just like screencapture utility

非 Y 不嫁゛ 提交于 2019-12-12 04:18:50
问题 I am trying to find the answer to a topic which has basically driven me insane. Is there a way to capture the mouse pointer much like Apple's screencapture utility works? What I am trying to do requires me to draw a clear window that does not activate my app but instead overlays everything, including the dock. The only software I have seen do this is screencapture by utilizing command+shift+4. I have tried creating a non-activating NSPanel but it doesn't work with cursor rects unless my app

PrintScreen Source Code/Simulation

∥☆過路亽.° 提交于 2019-12-11 18:17:01
问题 I would like to take a picture of a fullscreen direct3D game. I know I need to create an "overlay" which is harder in c# and I found out that using printscreen (and than pasting it in mspaint) does capture the game window. I ended up with this unstable code : try { SendKeys.SendWait("{PRTSC}"); Thread.Sleep(100); if (Clipboard.ContainsImage()) return Clipboard.GetImage(); } catch (Exception) { throw; } Bitmap bitmap = new Bitmap(1, 1); return bitmap; This code sometimes work, sometimes it

how to capture screen from another desktop?(CreateDesktop)

纵饮孤独 提交于 2019-12-11 17:17:41
问题 if one desktop isn't the current desktop,so,windows will not draw it .then capture the screen by DC was not work. help me!!! 回答1: The best you can do is to use the technique described in this article: http://www.fengyuan.com/article/wmprint.html Basically, you have to fool the applications on the other desktop to redraw their windows into a DC of your choice. I did this once - it can be made to work, but it's by no means trivial. There are many drawbacks - e.g. don't expect to be able to show

C++ Direct3D9 GetFrontBufferData with 16 bits color Depth

隐身守侯 提交于 2019-12-11 12:48:07
问题 I am currently developing a little screenshot application which records both of my screen's desktop in a file. I am using the GetFrontBufferData() function and it is working great. Unfortunately when changing the screen color depth from 32 to 16 bits (to perform some tests) I have a bad image (purple image with changed resolution) and the recorded screenshot has a very poor quality: Does someone know if there is a way to use GetFrontBufferData() with a 16 bits screen ? edit: My init direct3D:

Capture Screen But Not Current Form In C#?

旧街凉风 提交于 2019-12-11 09:09:15
问题 I want to capture the screen but without the current form, I tried to minimize -> capture -> maximize, but I'm looking for a better solution if exists. This was my code:: int w = this.Width; int h = this.Height; Size sz = this.Size; Point loc = this.Location; this.WindowState = FormWindowState.Minimized; System.Threading.Thread.Sleep(500); using (Bitmap b = new Bitmap(w, h)) { using (Graphics g = Graphics.FromImage(b)) { g.CopyFromScreen(loc, new Point(0, 0), sz); } b.Save(Environment

Odd MFC/GDI behaviour (blank image) that doesn't appear when screen is recorded

梦想的初衷 提交于 2019-12-11 08:42:33
问题 There is this weird bug in my program that I'm trying to fix, but I'm really at a loss for what it could be. This part of my program has a dialog which shows previews of various items using MFC/GDI. When I scroll through different items, sometimes the preview image just disappears and goes blank. However, it: Only happens on some machines Apparently happens on both Windows 7 and XP Doesn't happen on the same item every time Item IS STILL THERE when one takes a screenshot, but it is blank when

VB.NET Screen Capture

妖精的绣舞 提交于 2019-12-11 08:19:15
问题 Hello all i am using the below code to capture the screenshot of the black panel of my window form in visual basic 2005. My problem is that I want the red border image to come in between and to be full. My code : Dim bounds As Rectangle Dim screenshot As System.Drawing.Bitmap Dim graph As Graphics bounds = Screen.PrimaryScreen.Bounds screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppRgb) graph = Graphics.FromImage(screenshot)