diff options
Diffstat (limited to 'src/openvg/qpixmapdata_vg.cpp')
-rw-r--r-- | src/openvg/qpixmapdata_vg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 509882b..c3c7def 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -214,7 +214,7 @@ void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags else if (!(flags & Qt::NoOpaqueDetection) && const_cast<QImage &>(image).data_ptr()->checkForAlphaPixels()) format = sourceFormat(); else - format = QImage::Format_RGB32; + format = image.hasAlphaChannel() ? sourceFormat() : QImage::Format_RGB32; if (inPlace && image.data_ptr()->convertInPlace(format, flags)) source = image; |