diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-11 13:05:13 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-08 08:17:13 +0000 |
commit | 4f88475a962975ca45994cff9add350344fce4f9 (patch) | |
tree | 12884176f4fd5d5a28c7dbb220a0656d3c60daf7 /src/gui/image/qbmphandler.cpp | |
parent | 80c152d6898c1b8727ac14d32437b274153a7089 (diff) |
Allow QImage with more than 2GByte of image data
Changes internal data-size and pointer calculations
to qssize_t.
Adds new sizeInBytes() accessor to read byte size, and
marks the old one deprecated.
Task-number: QTBUG-50912
Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image/qbmphandler.cpp')
-rw-r--r-- | src/gui/image/qbmphandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 4350a5c192..c232a84e4f 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -49,10 +49,10 @@ QT_BEGIN_NAMESPACE static void swapPixel01(QImage *image) // 1-bpp: swap 0 and 1 pixels { - int i; + qssize_t i; if (image->depth() == 1 && image->colorCount() == 2) { uint *p = (uint *)image->bits(); - int nbytes = image->byteCount(); + qssize_t nbytes = static_cast<qssize_t>(image->sizeInBytes()); for (i=0; i<nbytes/4; i++) { *p = ~*p; p++; |