diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 6208ae52c76..b2a95d70e46 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -463,7 +463,7 @@ public: static int maxAlloc; }; -int QImageReaderPrivate::maxAlloc = 128; // 128 MB is enough for an 8K 32bpp image +int QImageReaderPrivate::maxAlloc = 256; // 256 MB is enough for an 8K 64bpp image /*! \internal @@ -1572,6 +1572,8 @@ int QImageReader::allocationLimit() loading corrupt image files. It is normally not needed to change it. The default limit is large enough for all commonly used image sizes. + At runtime, this value may be overridden by the environment variable \c QT_IMAGEIO_MAXALLOC. + \note The memory requirements are calculated for a minimum of 32 bits per pixel, since Qt will typically convert an image to that depth when it is used in GUI. This means that the effective allocation limit is significantly smaller than \a mbLimit when reading 1 bpp and 8 bpp images.