* 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:
marco 2010-03-04 22:33:05 +00:00
parent a7dca09535
commit bf52e58175

View File

@ -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;