Registriert seit: 13. Dez 2003
348 Beiträge
|
25mal / Sekunde Screenshot machen
13. Dez 2003, 21:56
Hallo!
Wie kann ich 25mal / sekunde daher 25fps mal einen Screenshot meines PC`s machen? Deie Screenshotfunktion ist diese:
Delphi-Quellcode:
procedure ScreenToFile(aFileName: string);
var
Bitmap: TBitmap;
JPG : TJPEGImage;
Canvas: TCanvas;
begin
Canvas := TCanvas.Create;
try
Canvas.Handle := GetWindowDC(0);
try
Bitmap := TBitmap.Create;
JPG := TJPEGImage.Create;
try
Bitmap.Width := Screen.DesktopWidth;
Bitmap.Height:= Screen.DesktopHeight;
Bitmap.PixelFormat := pfDevice;
BitBlt(Bitmap.Canvas.Handle, 0, 0, Pred(Screen.DesktopWidth), Pred(
Screen.DesktopHeight), Canvas.Handle, Screen.DesktopLeft,
Screen.DesktopTop, Bitmap.Canvas.CopyMode);
JPG.Assign(Bitmap);
JPG.SaveToFile(aFileName);
finally
Bitmap.Free;
JPG.Free;
end;
finally
ReleaseDC(0, Canvas.Handle);
end;
finally
Canvas.Free;
end;
end;
|
|
Zitat
|