Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. GrabTOImage QML crash with big Picture Size
Forum Updated to NodeBB v4.3 + New Features

GrabTOImage QML crash with big Picture Size

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 946 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • michaelLM Offline
    michaelLM Offline
    michaelL
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • michaelLM Offline
        michaelLM Offline
        michaelL
        wrote on last edited by
        #3

        @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?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved