* Fix to correctly write gray values from Johann (Bug ID 27924)

git-svn-id: trunk@30696 -
This commit is contained in:
michael 2015-04-21 17:55:52 +00:00
parent 49f3473735
commit e86aa04433

View File

@ -475,13 +475,13 @@ end;
function TFPWriterPNG.ColorDataGrayAB(color:TFPColor) : TColorData; function TFPWriterPNG.ColorDataGrayAB(color:TFPColor) : TColorData;
begin begin
result := ColorDataGrayB (color); result := ColorDataGrayB (color);
result := (result shl 8) and hi(color.Alpha); result := (color.Alpha and $ff00) or result;
end; end;
function TFPWriterPNG.ColorDataGrayAW(color:TFPColor) : TColorData; function TFPWriterPNG.ColorDataGrayAW(color:TFPColor) : TColorData;
begin begin
result := ColorDataGrayW (color); result := ColorDataGrayW (color);
result := (result shl 16) and color.Alpha; result := (color.Alpha shl 16) or result;
end; end;
function TFPWriterPNG.ColorDataColorB(color:TFPColor) : TColorData; function TFPWriterPNG.ColorDataColorB(color:TFPColor) : TColorData;