diff --git a/src/Gui/SoFCOffscreenRenderer.cpp b/src/Gui/SoFCOffscreenRenderer.cpp index b89bcd7b51..4b6524124a 100644 --- a/src/Gui/SoFCOffscreenRenderer.cpp +++ b/src/Gui/SoFCOffscreenRenderer.cpp @@ -818,6 +818,9 @@ SoQtOffscreenRenderer::writeToImage (QImage& img) const } } } + else if (PRIVATE(this)->backgroundcolor[3] == 1.0) { + img = img.convertToFormat(QImage::Format_RGB32); + } } /*! diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 13a9b46312..ed57bfc920 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -2111,7 +2111,8 @@ void View3DInventorViewer::imageFromFramebuffer(int width, int height, int sampl bits++; } } - } + } else if (alpha == 255) + img = img.convertToFormat(QImage::Format_RGB32); } void View3DInventorViewer::renderToFramebuffer(QtGLFramebufferObject* fbo)