Qt5, Qt6: fixed bad rendering of TBitmaps, use rgba premultiplied images only for darwin.

(cherry picked from commit 0edd507409)
This commit is contained in:
Željan Rikalo 2023-09-21 17:01:44 +02:00
parent db5d443369
commit 61fe672c22
2 changed files with 6 additions and 2 deletions

View File

@ -489,9 +489,12 @@ begin
//issue #39878 //issue #39878
//Actually setting premultiplied format for x11 and win32 does not harm //Actually setting premultiplied format for x11 and win32 does not harm
//so darwin ifdef should be removed after testing under x11 and win32. //so darwin ifdef should be removed after testing under x11 and win32.
//check not skipmask and masksize only for darwin. issue #40516
{$IFDEF DARWIN}
if not ASkipMask and (ARawImage.MaskSize > 0) then if not ASkipMask and (ARawImage.MaskSize > 0) then
ImageFormat := QImageFormat_ARGB32_Premultiplied ImageFormat := QImageFormat_ARGB32_Premultiplied
else else
{$ENDIF}
ImageFormat := QImageFormat_ARGB32; ImageFormat := QImageFormat_ARGB32;
end; end;
else else

View File

@ -489,11 +489,12 @@ begin
//issue #39878 //issue #39878
//Actually setting premultiplied format for x11 and win32 does not harm //Actually setting premultiplied format for x11 and win32 does not harm
//so darwin ifdef should be removed after testing under x11 and win32. //so darwin ifdef should be removed after testing under x11 and win32.
{.$IFDEF DARWIN} //check not skipmask and masksize only for darwin. issue #40516
{$IFDEF DARWIN}
if not ASkipMask and (ARawImage.MaskSize > 0) then if not ASkipMask and (ARawImage.MaskSize > 0) then
ImageFormat := QImageFormat_ARGB32_Premultiplied ImageFormat := QImageFormat_ARGB32_Premultiplied
else else
{.$ENDIF} {$ENDIF}
ImageFormat := QImageFormat_ARGB32; ImageFormat := QImageFormat_ARGB32;
end; end;
else else