mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:29:27 +02:00
+ Fixed bug #3922, as suggested by poster Aleksa Todorovic
git-svn-id: trunk@119 -
This commit is contained in:
parent
88877284df
commit
792d252aa3
@ -531,12 +531,15 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
OldPixels:=PFPIntegerArray(FData);
|
||||
GetMem(FData,FWidth*FHeight*SizeOf(TFPColor));
|
||||
for r:=0 to FHeight-1 do
|
||||
for c:=0 to FWidth-1 do
|
||||
Colors[c,r]:=FPalette.Color[OldPixels^[r*FWidth+c]];
|
||||
FreeMem(OldPixels);
|
||||
if Assigned(FData) then
|
||||
begin
|
||||
OldPixels:=PFPIntegerArray(FData);
|
||||
GetMem(FData,FWidth*FHeight*SizeOf(TFPColor));
|
||||
for r:=0 to FHeight-1 do
|
||||
for c:=0 to FWidth-1 do
|
||||
Colors[c,r]:=FPalette.Color[OldPixels^[r*FWidth+c]];
|
||||
FreeMem(OldPixels);
|
||||
end;
|
||||
FPalette.Free;
|
||||
FPalette:=nil;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user