Re: QImage size limitation
Do the calculations yourself
a 20000 x 20000 image with 32 bits format will require 20000 x 20000 x 32 bits
= 20000 x 20000 x 4 bytes
= 20000 x 19.5 x 4 MB
How many GB is that ??? Does your pc has that memory ?
Now do the calculations for 40000 x 40000 ;)
Re: QImage size limitation
Pixels:
20k x 20k = 400M
40k x 40k = 1600M
Bytes: * 4B
1600MB
4800MB
I think your statement 20kx20k is just a few megabytes is based on some false readings. Maybe the memory isn't allocated immediately?
Why do you need such a large background? Have you looked into the QGraphicsView-Framework? There you can comfortably fill your background and have individually buffered items..
Joh
Re: QImage size limitation
Thanks for your replies.
I realize that requires a lot of memory, but then I wonder why I can safely create a 20k x 20k with very little memory usage?
I need to draw a sparse scene with lots of pixels (millions) and I've found that using the GraphicsView framework takes up far too much memory, so I'm going to have to implement this more low-level.
I guess the better way to do this would be to draw directly to the device context in the paintEvent function.