summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-01-06 22:38:35 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-01-06 22:38:35 (GMT)
commit80e6ea3e871fa9f0e5a21d48ad893d4ec59c5c1c (patch)
tree307bf212ab3473dc4e90a4470fe2ef09c20ba109 /src/gui/image
parent7a5bca82738e6b782047e50a813972eccd928307 (diff)
downloadQt-80e6ea3e871fa9f0e5a21d48ad893d4ec59c5c1c.zip
Qt-80e6ea3e871fa9f0e5a21d48ad893d4ec59c5c1c.tar.gz
Qt-80e6ea3e871fa9f0e5a21d48ad893d4ec59c5c1c.tar.bz2
Avoid a deep copy of QImage::bits() in the png writer
Task-number: QTBUG-7161 Reviewed-by: Daniel Pope
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpnghandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 1de0f32..42c48a9 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -855,7 +855,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image_in,
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
0, 0, 0);
- const uchar *data = image.bits();
+ const uchar *data = (static_cast<const QImage *>(&image))->bits();
int bpl = image.bytesPerLine();
row_pointers = new png_bytep[height];
uint y;