[Interest] Qt6 image size limitations?

Thiago Macieira thiago.macieira at intel.com
Thu Sep 5 00:29:04 CEST 2019


On Wednesday, 4 September 2019 13:46:16 PDT Jason H wrote:
> I know the current limits are 32kx32k, which ought to be good enough for
> anybody 10 years ago. But as displays creep to 8k, that's 4x the width and
> 8x the height of a 8k monitor. My current situation, I am looking at 50kx1k
> ARGB images, which is only 200MB in-memory.  The display size is 2-4k, but
> it would be really nice if I could create one image full size then position
> it in the window, so I only have to compute it once. I'm using
> QQuickImageProvider, if that matters.

There's some work being done in this area. The problem is integer overflows, 
since 32kx32k is 1 gigapixel or 4 GB of RAM with ARGB. There are certain 
limitations in Qt 5 that we can't fix, but we plan to in Qt 6.

And then there is finding all the ints we'll forget to change to qsizetype.

> I was wondering if Qt6 could see this limit bumped up to 64kx64k or even
> more? Or perhaps there is a better technique? I hear that NVIDIA has a max
> texture size of 16kx16k. I'd also be open to having a massive image which
> can be down-sampled for display. This might be a corner case, but I thought
> I would mention it. How many more pixels will Qt need to push 10 years from
> now?

We should be able to raise the API limitation to 2Gx2G, which is impossibly 
huge for today's computers of course.

That doesn't mean the APIs we use underneath support that much. libpng, 
libjpeg, Win32 gdi.dll, XCB, Cocoa, etc. all have limitations. So even if the 
Qt API can go higher, you should not make images larger than 32k wide or high 
(recommendation, not hard limit).

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Interest mailing list