Gui: fix screenshot with opaque background

This commit is contained in:
Zheng, Lei
2020-01-11 15:20:24 +08:00
committed by wmayer
parent 12965165a6
commit 78ac86abd2
2 changed files with 5 additions and 1 deletions

View File

@@ -818,6 +818,9 @@ SoQtOffscreenRenderer::writeToImage (QImage& img) const
}
}
}
else if (PRIVATE(this)->backgroundcolor[3] == 1.0) {
img = img.convertToFormat(QImage::Format_RGB32);
}
}
/*!

View File

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