Registriert seit: 16. Jan 2004
364 Beiträge
|
Re: Bild aus Zwischenablage speichern
4. Apr 2004, 10:52
Delphi-Quellcode:
Procedure Bild_Speichern;
Var Zeit :TDateTime;
name :String;
img: TPicture;
Jpg: TJPEGImage;
clip: TClipboard;
Begin
Zeit := now;
Clip := Clipboard;
if clip.HasFormat(CF_BITMAP) then
begin
img := TPicture.create;
Jpg := TJPEGImage.create;
img.LoadFromClipboardFormat(CF_Bitmap,clip.GetAsHandle(CF_Bitmap),0);
jpg.Assign(img.bitmap);
jpg.CompressionQuality := 50;
jpg.ProgressiveEncoding := true;
jpg.Compress;
name := ('c:\'+'Bild von '+validTime(Timetostr(Zeit))+'.jpg');
jpg.SaveToFile(name);
clip.clear;
img.Free;
jpg.Free;
inc(x);
end;
End;
Power is nothing without TControl
|