* 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;
begin
tempimage := TFPMemoryImage.Create (w,image.height);
tempimage.UsePalette := false;
xfactor := image.Width / w;
yfactor := image.Height / h;
if xfactor > 1.0 then
xsupport := MaxSupport
else
xsupport := xfactor * MaxSupport;
if yfactor > 1.0 then
ysupport := MaxSupport
else
ysupport := yfactor * MaxSupport;
Horizontal (w);
Vertical (x,y,w,h);
try
tempimage.UsePalette := false;
xfactor := image.Width / w;
yfactor := image.Height / h;
if xfactor > 1.0 then
xsupport := MaxSupport
else
xsupport := xfactor * MaxSupport;
if yfactor > 1.0 then
ysupport := MaxSupport
else
ysupport := yfactor * MaxSupport;
Horizontal (w);
Vertical (x,y,w,h);
finally
tempimage.Free;
end;
end;
{ TMitchelInterpolation }