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. what is the best way to get the resolution of the various formats of images?
Forum Updated to NodeBB v4.3 + New Features

what is the best way to get the resolution of the various formats of images?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 676 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.
  • O Offline
    O Offline
    opengpu2
    wrote on last edited by opengpu2
    #1

    what is the best way to get the resolution of the various formats of images?

    O 1 Reply Last reply
    0
    • O opengpu2

      what is the best way to get the resolution of the various formats of images?

      O Offline
      O Offline
      opengpu2
      wrote on last edited by opengpu2
      #2

      @opengpu2 i now simply use:
      QPixmap pixmap(path);
      int w = pixmap.width();
      int h = pixmap.height();

      but i found that sometimes i can't open some image file....eg.i can open some TGA, but failed to get the w and h of some TGA...they return 0....that file can be open with Photoshop.....

      1 Reply Last reply
      0
      • O Offline
        O Offline
        opengpu2
        wrote on last edited by
        #3

        the width and height is not 0...
        but i tried QPixmap, QImage....they both return 0 when i call .width(), .height()

        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