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. Best way to preview a lot of big size images
Qt 6.11 is out! See what's new in the release blog

Best way to preview a lot of big size images

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.8k Views 2 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
    km22
    wrote on last edited by
    #1

    Hello !
    I want to do an image overview for several hundred big size images (minimum 40mb, JPG).
    What i have done:
    I load 30 images for every page with QImageReader. To speed up the loading process i use QtConcurrent. Unfortunately this is still not fast enough. Setting QImageReader::setScaleSize() and QImageReader::setQuality() doesn`t increase the speed.
    How can read big images in very low resoltion just for previewing them in a Size of maybe 200x200 ?
    Thanks in advance !

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

      Hi,

      AFAIK, what's usually done for that kind of case is to create thumbnails for every images and load the original only when the user actually chooses an image.

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

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        AFAIK, what's usually done for that kind of case is to create thumbnails for every images and load the original only when the user actually chooses an image.

        K Offline
        K Offline
        km22
        wrote on last edited by
        #3

        Thank you for answering!
        I also thought of that, but in my case the number of pictures can go into the thousands. When i create thumbnails i have to additionally maintain thousands of them. If i can find a way to organize that well, i can do that. Nevertheless i would prefer a solution with the original files.

        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #4

          On Windows, the OS takes care of creating and organising those thumbnails, you can read the thumbs.db into your program directly, see https://github.com/thumbsviewer/thumbsviewer

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          K 1 Reply Last reply
          1
          • VRoninV VRonin

            On Windows, the OS takes care of creating and organising those thumbnails, you can read the thumbs.db into your program directly, see https://github.com/thumbsviewer/thumbsviewer

            K Offline
            K Offline
            km22
            wrote on last edited by
            #5

            Thank you VRonin !
            Good idea! But when the user has deactivated Thumbs.db files i have a problem.
            I decided to write my own stuff for that. Thank you very much!

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

              One thing to take into account: depending on the format, some include a thumbnail in their meta data.

              However and in any case, you can't expect your target audience to load thousands of high quality images in memory for your application. It will kill their system. You should at least use a cache to keep a reasonable amount of data for the current use.

              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

              • Login

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