1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From 850068c1dc81c2ae0867cf395ae488f6d6c33781 Mon Sep 17 00:00:00 2001
From: Mirco Miranda <mirco.miranda@systemceramics.com>
Date: Tue, 22 Apr 2025 08:01:02 +0200
Subject: [PATCH] JXR: fix compilation error on 32-bit systems
---
src/imageformats/jxr.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/imageformats/jxr.cpp b/src/imageformats/jxr.cpp
index 7e535f17..7124f53c 100644
--- a/src/imageformats/jxr.cpp
+++ b/src/imageformats/jxr.cpp
@@ -977,9 +977,9 @@ bool JXRHandler::read(QImage *outImage)
return false;
}
} else { // additional buffer needed
- qsizetype convStrideSize = (img.width() * d->pDecoder->WMP.wmiI.cBitsPerUnit + 7) / 8;
- qsizetype buffSize = convStrideSize * img.height();
- qsizetype limit = QImageReader::allocationLimit();
+ qint64 convStrideSize = (img.width() * d->pDecoder->WMP.wmiI.cBitsPerUnit + 7) / 8;
+ qint64 buffSize = convStrideSize * img.height();
+ qint64 limit = QImageReader::allocationLimit();
if (limit && (buffSize + img.sizeInBytes()) > limit * 1024 * 1024) {
qCWarning(LOG_JXRPLUGIN) << "JXRHandler::read() unable to covert due to allocation limit set:" << limit << "MiB";
return false;
@@ -991,7 +991,7 @@ bool JXRHandler::read(QImage *outImage)
return false;
}
for (qint32 y = 0, h = img.height(); y < h; ++y) {
- std::memcpy(img.scanLine(y), ba.data() + convStrideSize * y, (std::min)(convStrideSize, img.bytesPerLine()));
+ std::memcpy(img.scanLine(y), ba.data() + convStrideSize * y, (std::min)(convStrideSize, qint64(img.bytesPerLine())));
}
}
PKFormatConverter_Release(&pConverter);
--
GitLab
|