summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2010-10-12 09:41:26 (GMT)
committerJani Hautakangas <jani.hautakangas@nokia.com>2010-10-12 10:54:36 (GMT)
commit71de6cd879f2f79900bda83cc4ba48f6df051d66 (patch)
treeeccaf65b77b19b3c8918195713f1626860ac4fb3 /src/openvg
parentedddadd88950f22f6d813e50acdcf2711d3d5a84 (diff)
downloadQt-71de6cd879f2f79900bda83cc4ba48f6df051d66.zip
Qt-71de6cd879f2f79900bda83cc4ba48f6df051d66.tar.gz
Qt-71de6cd879f2f79900bda83cc4ba48f6df051d66.tar.bz2
Fix for CFbsBitmap to QPixmap conversion.
Symbian bitmap formats may have different scanline length when compared to QImage formats. We need to define scanline length for intermediate QImage when converting from CFbsBitmap to QPixmap. Task-number: QTBUG-14218 Reviewed-by: Jason Barron
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qvg_symbian.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp
index a9625b2..41b35fc 100644
--- a/src/openvg/qvg_symbian.cpp
+++ b/src/openvg/qvg_symbian.cpp
@@ -185,10 +185,11 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
QImage::Format format = qt_TDisplayMode2Format(displayMode);
TSize size = bitmap->SizeInPixels();
+ int bytesPerLine = bitmap->ScanLineLength(size.iWidth, displayMode);
bitmap->BeginDataAccess();
uchar *bytes = (uchar*)bitmap->DataAddress();
- QImage img = QImage(bytes, size.iWidth, size.iHeight, format);
+ QImage img = QImage(bytes, size.iWidth, size.iHeight, bytesPerLine, format);
img = img.copy();
bitmap->EndDataAccess();