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. Problem displaying *.tif images after compilation
Forum Update on Monday, May 27th 2025

Problem displaying *.tif images after compilation

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 781 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.
  • T Offline
    T Offline
    Thinkaaa
    wrote on last edited by Thinkaaa
    #1

    Hello,

    I have a simple gui built with qtpy4. I'm using qgraphicsview to display 8bit *.tif images. Everything works perfectly until I compile with py2exe. After compilation images simply don't display and there are no errors. I've tried the same process with *.PNG files but surprisingly they do work. There seems to be an issue with those *.tif files after compilation.

    I'm out of ideas...please help

    mrjjM 1 Reply Last reply
    0
    • T Thinkaaa

      Hello,

      I have a simple gui built with qtpy4. I'm using qgraphicsview to display 8bit *.tif images. Everything works perfectly until I compile with py2exe. After compilation images simply don't display and there are no errors. I've tried the same process with *.PNG files but surprisingly they do work. There seems to be an issue with those *.tif files after compilation.

      I'm out of ideas...please help

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Thinkaaa
      Disclaimer. Python is not my language.

      However, the png is build in, where as tiff loading is an (extra) plugin.

      http://doc.qt.io/qt-5/qtimageformats-index.html

      So my best guess is that the py2exe tool forget/dont include it in the packet and hence its missing at runtime.

      1 Reply Last reply
      1
      • T Offline
        T Offline
        Thinkaaa
        wrote on last edited by
        #3

        You were right, I managed to solve this by copying the following folder:

        'C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats'

        directly to my build folder. Working on away to include it in compilation.

        Thank you!

        1 Reply Last reply
        1

        • Login

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