Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Open large TIFF file
Forum Updated to NodeBB v4.3 + New Features

Open large TIFF file

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 5.3k 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.
  • K Offline
    K Offline
    kamgo
    wrote on last edited by
    #1

    Hello

    I need open large TIFF file. My code is the following

    @
    QGraphicsScene *scene = new QGraphicsScene;
    scene->addPixmap(QPixmap(inputFilename));
    ui.graphicsView->setScene(scene);
    ui.graphicsView->show();
    @

    if i open image 150Mb, it's showing ok, if i open image with size around 600 Mb
    program crushes. How correct read large images ?

    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stereomatching
      wrote on last edited by
      #2

      using try--catch?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kamgo
        wrote on last edited by
        #3

        but how open ? or in qt this impossible ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          stereomatching
          wrote on last edited by
          #4

          I don't know this is the limit of Qt or the limit of your memory, if your programs throw an exception which told you something like "out of memory", maybe you need to enlarge your ram or find someway to lower the consume of your memory.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Serenity
            wrote on last edited by
            #5

            QImage and/or QPixmap has a size limit (width and height, not filesize), so I think, a huge tiff has also a huge size.

            I know that, because I tried to create a TIFF of the XKCD comic http://xkcd.com/1110/ with the big world. After creating and trying to open it with any image viewer, it mostly crashes.

            To solve this problem, I would today put every tile in QGraphicsView as an item. I would also suggest you to do that.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              classpass
              wrote on last edited by
              #6

              what is the limit of Qt. do i need some other "tiff viewer vb.net":http://www.rasteredge.com/how-to/vb-net-imaging/tiff-windows-viewer-create/ to open large tiff files or can i open it directly in Qt. i have one software that can do that stuff.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Serenity
                wrote on last edited by
                #7

                Do you have any example tiff file?
                And you can open it directly. Try it, it's just some lines of codes.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kamgo
                  wrote on last edited by
                  #8

                  how do you split TIFF to tiles ?

                  [quote author="Serenity" date="1374501723"]QImage and/or QPixmap has a size limit (width and height, not filesize), so I think, a huge tiff has also a huge size.

                  I know that, because I tried to create a TIFF of the XKCD comic http://xkcd.com/1110/ with the big world. After creating and trying to open it with any image viewer, it mostly crashes.

                  To solve this problem, I would today put every tile in QGraphicsView as an item. I would also suggest you to do that. [/quote]

                  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