I am trying to load an .jpg image of resolution 30592 x 18432 in PyQt5 using QImage.
image = QImage(image_path)
# (same behavior with QPixmap as well)
But QImage returns a NULL image when I check with its isNull() method. So tried descaling the image and found out that I am able to load images with width less than 30000. So 29500 x 17774 works. I have 16GB RAM so I don't suspect any memory constraints (At 29500 x 17774, memory usage is about 3.5 GB while loading and gets down to 1.5GB while displaying image after loading is finished).
So I thought this issue is probably due to max size limit of QImage. So I searched online and only relevant forum I could find was this, according to which QImage support upto 32767x32767 pixels. So my original image should have loaded but it didn't.
Is max supported resolution is different for Qt(C++) and PyQt?
Are there any other methods to load images of this size. So far I have tried:
Loading images using cv.imread(), it does loads the 30592x18432 image but on converting it to QImage, it returns null.
Descaling as I mentioned before, its my last resort only as I am losing some details while zooming in.
I am trying to convert Mat/Numpy.array images (cv.imread()) to QImages in tiles of 1000x1000. It works but not yet perfect. Still working on that.
Version Details:
Installation: Anaconda 22.9.0 (64 bit)
Installation Dir/Env: Base/Root
Python: 3.9.13 (64 bit)
PyQt: 5.9.2