* patch from mantis #24382 under endian ifdef

git-svn-id: trunk@29103 -
This commit is contained in:
marco 2014-11-22 13:46:33 +00:00
parent ace1ea0070
commit 284f5fd234

View File

@ -534,13 +534,21 @@ end;
function TFPReaderPNG.ColorGrayAlpha16 (CD:TColorData) : TFPColor;
var c : word;
begin
{$ifdef FPC_LITTLE_ENDIAN}
c := CD and $FFFF;
{$else}
c := (CD shr 16) and $FFFF;
{$endif}
with result do
begin
red := c;
green := c;
blue := c;
{$ifdef FPC_LITTLE_ENDIAN}
alpha := (CD shr 16) and $FFFF;
{$else}
alpha := CD and $FFFF;
{$endif}
end;
end;