mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 15:57:56 +02:00
TLazIntfImage: don't remove alpha channel from HBITMAP. Solves issue 39933
This commit is contained in:
parent
ca1b88b2cf
commit
fbfb9def5d
@ -948,9 +948,14 @@ begin
|
||||
if Result then
|
||||
begin
|
||||
FillRawImageDescription(WinDIB.dsBm, ADesc);
|
||||
{
|
||||
// if it is not DIB then alpha in bitmaps is not supported => use 0 alpha prec
|
||||
//// deleted be Ondrej - why is this needed?
|
||||
//// When applied, the alpha channel in windows icons is lost.
|
||||
//// See issue #39933.
|
||||
if ASize < SizeOf(WinDIB) then
|
||||
ADesc.AlphaPrec := 0;
|
||||
}
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1026,10 +1031,16 @@ begin
|
||||
//DbgDumpBitmap(AMask, 'FromMask - Mask');
|
||||
|
||||
FillRawImageDescription(WinBmp, ARawImage.Description);
|
||||
{
|
||||
// if it is not DIB then alpha in bitmaps is not supported => use 0 alpha prec
|
||||
//// deleted be Ondrej - why is this needed?
|
||||
//// When applied, the alpha channel in windows icons is lost.
|
||||
//// See issue #39933.
|
||||
if ASize < SizeOf(WinDIB) then
|
||||
ARawImage.Description.AlphaPrec := 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ARect = nil
|
||||
then begin
|
||||
R := Rect(0, 0, WinBmp.bmWidth, WinBmp.bmHeight);
|
||||
|
Loading…
Reference in New Issue
Block a user