summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-01-12 12:29:11 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-01-12 12:37:24 (GMT)
commit48b4a790b94acab1000c0e3bb3c6780bf6b9ba0b (patch)
tree2de08f0fb16a03c14aa2a7ce34257d29702db0d7
parent81e1d9a9e9ff6649727bd26ea0c3be971813866d (diff)
downloadQt-48b4a790b94acab1000c0e3bb3c6780bf6b9ba0b.zip
Qt-48b4a790b94acab1000c0e3bb3c6780bf6b9ba0b.tar.gz
Qt-48b4a790b94acab1000c0e3bb3c6780bf6b9ba0b.tar.bz2
Fixed bug where QGLPixmapData::toImage() returned too dark image.
QGLPixmapData::toImage() called qt_gl_read_texture() which didn't take into account that the texture was in a premultiplied format. Task-number: QTBUG-7190 Reviewed-by: Trond
-rw-r--r--src/opengl/qgl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 4a79427..602c14d 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1555,7 +1555,7 @@ QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include
QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha)
{
- QImage img(size, alpha_format ? QImage::Format_ARGB32 : QImage::Format_RGB32);
+ QImage img(size, alpha_format ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32);
int w = size.width();
int h = size.height();
#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)