uses Jpeg;
procedure TForm1.Button1Click(Sender: TObject);
var
JpegIm: TJpegImage;
bm: TBitMap;
begin
bm := TBitMap.Create;
bm.Width := Screen.Width;
bm.Height := Screen.Height;
BitBlt(bm.Canvas.Handle, 0, 0,
bm.Width, bm.Height,
GetDC(0), 0, 0, SRCCOPY);
JpegIm := TJpegImage.Create;
JpegIm.Assign(bm);
JpegIm.CompressionQuality := 20;
JpegIm.Compress;
JpegIm.SaveToFile('C:\Screen.jpg');
bm.Destroy;
JpegIm.Destroy;
end;
|