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. PYQT and Displaying JPG
QtWS25 Last Chance

PYQT and Displaying JPG

Scheduled Pinned Locked Moved General and Desktop
jpgjpegpyqt
3 Posts 3 Posters 2.5k Views
  • 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.
  • H Offline
    H Offline
    heedaf
    wrote on last edited by
    #1

    I'm trying to display an image from the web and I can do it ok with png and bmp files but I can't display a jpg file. Can someone point me in the right direction to do this using PYQT.

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

      Hi,

      Jpeg should be supported a supported format. What does QImageReader.supportedImageFormats() return ?

      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
      • Z Offline
        Z Offline
        zsun14
        wrote on last edited by
        #3
        app = QApplication(sys.argv)
        
        # in case qt can`t find image fomat plugins for jpeg
        app.addLibraryPath(os.path.join(os.environ['QT5DIR'], "plugins"))
        
        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