Image IO: increase the default allocation limit
Time passes, Moore's law is working. As a drive-by, make the doc more informative. Fixes: QTBUG-113637 Pick-to: 6.5 Change-Id: Ic388b8850ace02c429d4d8175d31db86912d3afe Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
8d11e05f8f
commit
2385d66923
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user