mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 11:00:28 +02:00
* patch from mantis #24382 under endian ifdef
git-svn-id: trunk@29103 -
This commit is contained in:
parent
ace1ea0070
commit
284f5fd234
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user