Thanks guys, but my example code was whipped up on the spot. Not a good
example.
In the example below, if I free TempBMP the value doesnt get returned. So
how do I kick ass with TempBMP when I have finished with it? (maybe @TempBMP
then free?)
function Tcamform.SizeFunc(BMap: Tbitmap): Tbitmap;
var
BMPtmp, BMPtmpB: TFastBMP;
TempBMP: Tbitmap;
wsize, hsize: word;
fval1, fval2: single;
begin
//a whole lotta code goes here
BMPtmpB := TfastBMP.CreateFromhBmp(BMap.handle); //LikeABitmap
BMPtmp := TfastBMP.Create(wsize, hsize);
TempBMP := Tbitmap.Create;
try
TempBMP.Width := wsize;
TempBMP.Height := hsize;
BMPtmpB.SmoothResize(BMPtmp);
BMPtmp.Draw(TempBMP.canvas.handle, 0, 0);
result := TempBMP;
finally
begin
TempBMP.FreeImage; //If I'm free then result=nil
BMPtmp.Free;
BMPtmpB.Free;
end;
end;
end;
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz