I'm updating an application from PyQt5 to PyQt6. The application uses very large image files. I've updated the code to work with PyQt6, however, when I run the Python script I now get an error:
QImageIOHandler: Rejecting image as it exceeds the current allocation limit of 128 megabytes
Take a look at the Qt6 documentation here: QImageReader::setAllocationLimit()
...and here: QImageReader::allocationLimit()
The documentation suggests that setAllocationLimit can be used to change this 128 megabyte limit.
My issue is these attributes do not seem to appear in the Python version (PyQt6). Here's the documentation for PyQt6 and the QImageReader class and setAllocationLimit and AllocationLimit are not present: QImageReader.
Is there something I'm missing? I feel like if I can access setAllocationLimit in PyQt6 it would solve my problem, but I can't find it anywhere.