* Patch from Mattias Gaertner to fix memory leak

git-svn-id: trunk@12235 -
This commit is contained in:
michael 2008-11-26 19:06:36 +00:00
parent 790a6a01b7
commit 22bb6c804b

View File

@ -166,19 +166,23 @@ var maxy : integer;
rx,ry : integer; rx,ry : integer;
begin begin
tempimage := TFPMemoryImage.Create (w,image.height); tempimage := TFPMemoryImage.Create (w,image.height);
tempimage.UsePalette := false; try
xfactor := image.Width / w; tempimage.UsePalette := false;
yfactor := image.Height / h; xfactor := image.Width / w;
if xfactor > 1.0 then yfactor := image.Height / h;
xsupport := MaxSupport if xfactor > 1.0 then
else xsupport := MaxSupport
xsupport := xfactor * MaxSupport; else
if yfactor > 1.0 then xsupport := xfactor * MaxSupport;
ysupport := MaxSupport if yfactor > 1.0 then
else ysupport := MaxSupport
ysupport := yfactor * MaxSupport; else
Horizontal (w); ysupport := yfactor * MaxSupport;
Vertical (x,y,w,h); Horizontal (w);
Vertical (x,y,w,h);
finally
tempimage.Free;
end;
end; end;
{ TMitchelInterpolation } { TMitchelInterpolation }