Open large TIFF file



  • 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



  • using try--catch?



  • but how open ? or in qt this impossible ?



  • 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.



  • 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.



  • 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.



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



  • 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]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.