Jump to content
  • Advertisement
Sign in to follow this  
mainstart

C# fast screen capture

This topic is 3677 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, How can i make screenshoots to the entire screen very fast? Somthing like 20-30 per second? [[1]] I've tried GDI but this is very slow : Creating screenshots in memory : 8 Creating screenshots on disk :4 [[2]] I've tried WMEncoder.Results were that WMEncoder can capture the screen and regions of screen only in a video format (wma) using a set of preconfigured codecs. (29 fps best encode result).WMEncoder can not make screenshots. [[3]] I've tried DirectX : Surface s = device.CreateOffscreenPlainSurface( Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, Format.A8R8G8B8, Pool.SystemMemory); device.GetFrontBufferData(0, s); SurfaceLoader.Save("c:\\Screenshot"+i.ToString()+".bmp", ImageFileFormat.Bmp, s); This works like gdi ..very slow....and it works only in DirectX 1.0 because SurfaceLoader does not exist in directX 2.0 Another way that i've read in some post is using : s = device.GetBackBuffer(0, 0, Microsoft.DirectX.Direct3D.BackBufferType.Mono); , but this maks screenshots only to the curent window. [[4]] I've tried to use dfmirage driver... but i can't make work in c# i've tried to translate VideoDriver.h and cpp but seems not to work; Please help me out...

Share this post


Link to post
Share on other sites
Advertisement
Hi tank's for the reply... This is not a solution :
In that project the screen is capured with :


glReadPixels(0,0,lpbih->biWidth,lpbih->biHeight,
GL_BGR_EXT,GL_UNSIGNED_BYTE,bmBits);


this function captures only the opengl window. That means you can make a avi of your application window ...not all desktop. :(

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!