summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-01-06 22:38:35 (GMT)
committerJesper Thomschutz <jesper.thomschutz@nokia.com>2010-01-08 11:18:24 (GMT)
commit5540a2f735107a8f62f428ec3ac316e9cf156b2e (patch)
tree406e359b735618d8a0e65e2d3de4c56b501a9247
parentb545a1a50de9eab519dc46d4e1670b31f9f849f8 (diff)
downloadQt-5540a2f735107a8f62f428ec3ac316e9cf156b2e.zip
Qt-5540a2f735107a8f62f428ec3ac316e9cf156b2e.tar.gz
Qt-5540a2f735107a8f62f428ec3ac316e9cf156b2e.tar.bz2
Avoid a deep copy of QImage::bits() in the png writer
Task-number: QTBUG-7161 Reviewed-by: Daniel Pope (cherry picked from commit 80e6ea3e871fa9f0e5a21d48ad893d4ec59c5c1c)
-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 542c337..dc5003c 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;