Problem displaying *.tif images after compilation



  • 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


  • Qt Champions 2016

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



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


Log in to reply