Fastest way to capture screen
Posted on 2003-11-13
I need a fastest way to capture a screen.
- I play an AVI file in screen position 0,0
- within 1 second, I will try to capture as much as possible in that screen position with size = 320x240
- Each captured image will be saved as JPG.
Currently, I am using Bitblt like this :
DC := getDC(GetDesktopWindow);
jpg.CompressionQuality := 60;
done := FALSE;
Timer1.Interval := 1000;
Timer1.Enabled := TRUE;
while not done do
BitBlt(bmp.Canvas.Handle, 0, 0, 320, 240, DC, 0, 0, SRCOPY);
Using Pentium 4 2.0 GHz, I can capture about 53 files.
But I need to optimize this code. Is it possible?