From f0579fa68e620ced2bc32c6549d2e45cdf8c7c97 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 29 Apr 2014 11:48:06 +0200 Subject: [PATCH] Document returned format of QOpenGLFramebufferObject::toImage() The image format returned by QOpenGLFramebufferObject::toImage() on OpenGL ES/2 builds changed in 5.2.0 but was not documented. Change-Id: I2379c62c7f715803192ffa9bb8ae1171ef4b2314 Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglframebufferobject.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index cc829df950..7fb6815120 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1112,6 +1112,9 @@ Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, \fn QImage QOpenGLFramebufferObject::toImage() const Returns the contents of this framebuffer object as a QImage. + + Will try to return a premultiplied ARBG32 or RGB32 image. Since 5.2 it will fall back to + a premultiplied RGBA8888 or RGBx8888 image when reading to ARGB32 is not supported. */ QImage QOpenGLFramebufferObject::toImage() const {