Autor Beitrag
dirkil2
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Do 30.08.07 21:55 
Ich verwende die Graphics32 Library, um Bitmaps zu skalieren. Aber irgendwie klappt das nicht so richtig. Ich hoffe, irgend jemand kann mir auf die Sprünge helfen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure Scale( pSrc: TBitmap32 ) : TBitmap32;
var
   lDst: TBitmap32;
   lTrans: TAffineTransformation;
begin
  // lSrc enthält eine Bitmap der Größe 800x600
  lTrans := TAffineTransformation.Create;
  lTrans.Scale( 0.5, 0.5 );
  lDst := TBitmap32.Create;
  lDst.BeginUpdate;
  Transform( lDst, pSrc, lTrans );
  lDst.EndUpdate;
  lTrans.Free;
  Result := lDst;
end;


Nach dem Aufruf von Transform ist lDst.Width=0 und lDst.Height=0.

Was mache ich falsch?

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt