Increase allocationLimit in Qt6
Hello,
Some image plug-ins in Qt6 may reject opening of large images. Default allocation limit is 128 megabytes for an image. Application may disable that limit or set it to different reasonable value.
https://doc.qt.io/qt-6/qimagereader.html#setAllocationLimit
We will have to use something like this:
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
// increase allocation limit from 128 MB to 2 GB.
QImageReader::setAllocationLimit(2048);
#endif
Default 128 megabytes is too little. Unfortunately each person may have different opinion what is a reasonable limit.
For example 2 GB is needed for 16384x16384 image in QImage::Format_RGBA64 format.
Or do you think we should make the limit configurable by the user?