mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 11:29:20 +02:00
* committed an old patch from M Schreiber, mantis #11855 that fixes loading 8-bit gray alpha using PNG loading.
git-svn-id: trunk@14972 -
This commit is contained in:
parent
a7dca09535
commit
bf52e58175
@ -519,15 +519,15 @@ end;
|
||||
function TFPReaderPNG.ColorGrayAlpha8 (CD:TColorData) : TFPColor;
|
||||
var c : word;
|
||||
begin
|
||||
c := CD and $FF00;
|
||||
c := c + (c shr 8);
|
||||
c := CD and $00FF;
|
||||
c := c + (c shl 8);
|
||||
with result do
|
||||
begin
|
||||
red := c;
|
||||
green := c;
|
||||
blue := c;
|
||||
c := CD and $FF;
|
||||
alpha := c + (c shl 8);
|
||||
c := CD and $FF00;
|
||||
alpha := c + (c shr 8);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user