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 9749a07130
commit c5bb5def46

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);