fix adding image to TImageList in case Image.Mask = nil (problem with missed component glyphs under linux must be solved) by Marc with my help

git-svn-id: trunk@12797 -
This commit is contained in:
paul 2007-11-09 17:37:26 +00:00
parent 442741d188
commit 6223cf758e

View File

@ -991,7 +991,8 @@ var
begin
SrcHasAlpha := AImage.Description.AlphaPrec > 0;
KeepAlpha := SrcHasAlpha;
if not SrcHasAlpha and (Desc.BitsPerPixel = 32) and (Desc.Depth = 24)
if not SrcHasAlpha and (Desc.BitsPerPixel = 32) and (Desc.Depth = 24) and
(AImage.Mask <> nil) and (Desc.MaskBitsPerPixel > 0)
then begin
// Try to squeeze Aplha channel in some unused bits
if (Desc.RedShift >= 8)