Don't convert signed to unsigned when we need all 32bit

The fast scale methods qt_scale_image_16bit and qt_scale_image_32bit
were incorrectly assigning an unsigned value to a signed variable, which
broke their support of images with dimensions from 32384 to 65535.
Images with dimensions higher than that are already using another code-
path.

Task-number: QTBUG-40297
Change-Id: I8c971889e069381224cea2befbb5c66cd93ea5c2
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
bb10
Allan Sandfeld Jensen 2014-07-29 12:56:34 +02:00
parent 7e74f8f398
commit 0afc80c922
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl,
while (h--) {
const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl);
int srcx = basex;
quint32 srcx = basex;
int x = 0;
for (; x<w-7; x+=8) {
blender.write(&dst[x], src[srcx >> 16]); srcx += ix;
@ -258,7 +258,7 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
while (h--) {
const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);
int srcx = basex;
quint32 srcx = basex;
int x = 0;
for (; x<w; ++x) {
blender.write(&dst[x], src[srcx >> 16]);