LCL: Initialize image description in widgetsets where not done already. Issue #36955, patch from Michal Gawrycki.

git-svn-id: trunk@63131 -
This commit is contained in:
juha 2020-05-09 22:28:29 +00:00
parent 8946cd3dd1
commit e0156207ac
4 changed files with 2 additions and 8 deletions

View File

@ -612,9 +612,7 @@ end;
procedure FillRawImageDescription(const ABitmapInfo: Windows.TBitmap; out ADesc: TRawImageDescription);
begin
ADesc.Init;
ADesc.Format := ricfRGBA;
ADesc.Depth := ABitmapInfo.bmBitsPixel; // used bits per pixel
ADesc.Width := ABitmapInfo.bmWidth;
ADesc.Height := ABitmapInfo.bmHeight;

View File

@ -398,8 +398,8 @@ end;
procedure FillRawImageDescription(const ABitmapInfo: TfpgImage; out ADesc: TRawImageDescription);
begin
ADesc.Init;
ADesc.Format := ricfRGBA;
ADesc.Depth := 32; // used bits per pixel
ADesc.Width := ABitmapInfo.Width;
ADesc.Height := ABitmapInfo.Height;
@ -417,7 +417,6 @@ begin
end
else ADesc.PaletteColorCount := 0;
FillRawImageDescriptionColors(ADesc);
ADesc.MaskBitsPerPixel := 8;

View File

@ -1127,8 +1127,8 @@ end;
procedure FillRawImageDescription(const ABitmapInfo: Windows.TBitmap; out ADesc: TRawImageDescription);
begin
ADesc.Init;
ADesc.Format := ricfRGBA;
ADesc.Depth := ABitmapInfo.bmBitsPixel; // used bits per pixel
ADesc.Width := ABitmapInfo.bmWidth;
ADesc.Height := ABitmapInfo.bmHeight;
@ -1146,7 +1146,6 @@ begin
end
else ADesc.PaletteColorCount := 0;
FillRawImageDescriptionColors(ADesc);
ADesc.MaskBitsPerPixel := 1;

View File

@ -560,9 +560,7 @@ end;
procedure FillRawImageDescription(const ABitmapInfo: Windows.TBitmap; out ADesc: TRawImageDescription);
begin
ADesc.Init;
ADesc.Format := ricfRGBA;
ADesc.Depth := ABitmapInfo.bmBitsPixel; // used bits per pixel
ADesc.Width := ABitmapInfo.bmWidth;
ADesc.Height := ABitmapInfo.bmHeight;