mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-24 06:19:27 +02:00
TLazBmpReader now keeps colors when reading TransparentColor
git-svn-id: trunk@9338 -
This commit is contained in:
parent
974c61c74f
commit
8f5df562b7
@ -3097,10 +3097,9 @@ end;
|
||||
function TLazReaderBMP.ColorToTrans(const InColor: TFPColor): TFPColor;
|
||||
begin
|
||||
//DebugLn('TLazReaderBMP.ColorToTrans InColor=',dbgs(InColor),' FTransparentColor=',dbgs(FTransparentColor));
|
||||
if (InColor <> FTransparentColor) then
|
||||
Result := InColor
|
||||
else
|
||||
Result := FPImage.colTransparent;
|
||||
Result := InColor;
|
||||
if (InColor = FTransparentColor) then
|
||||
Result.alpha := alphaTransparent;
|
||||
end;
|
||||
|
||||
procedure TLazReaderBMP.SetupRead(nPalette, nRowBits: Integer; Stream: TStream;
|
||||
@ -3582,4 +3581,4 @@ end;
|
||||
initialization
|
||||
InternalInit;
|
||||
|
||||
end.
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user