Gui: Do not ignore alpha channel when converting QImage to SoSFImage

Fixes #18213: Sketcher constraints have black box backgrounds
This commit is contained in:
wmayer
2024-11-30 15:13:57 +01:00
committed by Chris Hennes
parent a8ecf5c517
commit 63ad7d3fea

View File

@@ -588,7 +588,7 @@ void BitmapFactoryInst::convert(const QImage& p, SoSFImage& img) const
} break;
case 2:
{
QRgb rgb = col.rgb();
QRgb rgb = col.rgba();
line[0] = qGray(rgb);
line[1] = qAlpha(rgb);
} break;
@@ -601,7 +601,7 @@ void BitmapFactoryInst::convert(const QImage& p, SoSFImage& img) const
} break;
case 4:
{
QRgb rgb = col.rgb();
QRgb rgb = col.rgba();
line[0] = qRed(rgb);
line[1] = qGreen(rgb);
line[2] = qBlue(rgb);