Registriert seit: 27. Apr 2005
Ort: Görlitz
1.358 Beiträge
Delphi XE2 Professional
|
Re: Bild spiegeln
17. Mai 2006, 11:53
Quick&Dirty:
Delphi-Quellcode:
procedure TForm3.FormClick(Sender: TObject);
var
bmp : TBitmap;
StartBlt,
StopBlt,
StartSl,
StopSl : Cardinal;
begin
bmp:=TBitmap.Create;
bmp.Assign(Image1.Picture.Bitmap);
StartBlt:=GetTickCount;
StretchBlt(Self.Canvas.Handle,
200,200,
-bmp.Width,bmp.Height,
bmp.Canvas.Handle,
0,0,
bmp.Width, bmp.Height,
SRCCOPY);
StopBlt:=GetTickCount;
StartSl:=GetTickCount;
SpiegelnVertikal(bmp);
BitBlt(Self.Canvas.Handle,
0,0,
bmp.Width,bmp.Height,
bmp.Canvas.Handle,
0,0,
SRCCOPY);
StopSl:=GetTickCount;
MessageDlg('Blt: '+InttoStr(StopBlt-StartBlt)+#13#10+'SL: '+InttoStr(StopSl-StartSl), mtWarning, [mbOK], 0);
bmp.Free;
end;
Benjamin Schwarze If I have seen further it is by standing on the shoulders of Giants. (Isaac Newton)
|
|
Zitat
|