summaryrefslogtreecommitdiff
path: root/src/gui/image/qpixmap_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmap_s60.cpp')
-rw-r--r--src/gui/image/qpixmap_s60.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index 47249d9873..b7c8acb81b 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -968,11 +968,12 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType)
if (needsCopy) {
TSize size = sourceBitmap->SizeInPixels();
+ int bytesPerLine = sourceBitmap->ScanLineLength(size.iWidth, displayMode);
QSymbianBitmapDataAccess da;
da.beginDataAccess(sourceBitmap);
uchar *bytes = (uchar*)sourceBitmap->DataAddress();
- QImage img = QImage(bytes, size.iWidth, size.iHeight, format);
+ QImage img = QImage(bytes, size.iWidth, size.iHeight, bytesPerLine, format);
img = img.copy();
da.endDataAccess(sourceBitmap);