mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 23:49:29 +02:00
* Patch from Mattias Gaertner to fix memory leak
git-svn-id: trunk@12235 -
This commit is contained in:
parent
790a6a01b7
commit
22bb6c804b
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user