mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 10:49:20 +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;
|
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 }
|
||||||
|
Loading…
Reference in New Issue
Block a user