GrabTOImage QML crash with big Picture Size
-
I want to render my item so that it looks nice on PDF.
The PDF DPI is set to 400.
My generated image size in grabtoimage is Qt.size(2835,1260).
With QPixmap i have to scale this image to the target image, because screen DPI is 147 and PDF DPI is 400.
The Image will be bigger on the target and scalling image to a bigger size isnt so great.
To make it better , i have to increase my Image DPI so i get the final size i need.
I have to multiply it by the factor 400/147= 2.72
Qt.size(28352.72,12602.72)
The problem is that i get an error from Framebuffer:
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.I think the image is too big right?
-
Hi,
After a quick calculation:
28352.72 * 12602.72 = 357321391.3984 which is the number of pixels 357321391.3984 * 3 (number of channels but could even be 4 if alpha is used) = 1071964174.1952 Bytes ``` Which is indeed a bit of a big image to ask for.
-
@SGaist I meant:
Qt.size(2835 x 2.72,1260 x 2.72)
If i use grabToImage() and set the Size to a larger number, the target image is no the same as the item.
If i use grabToImage() and set the Size equal to its item, the target image is the same as the item.
Is there a way to get the image with higher resolution and keep all information?