diff --git a/README b/README index 6b47adab..b4841a6b 100644 --- a/README +++ b/README @@ -46,7 +46,6 @@ Windows prerequisites - Visual Studio 2008 (Express is enough) is needed to build C extensions. (http://www.microsoft.com/Express/) - PyQt 4.7 (http://www.riverbankcomputing.co.uk/news) -- Python Imaging Library for dupeGuru PE. (http://www.pythonware.com/products/pil/) - cx_Freeze, if you want to build a exe. You don't need it if you just want to run dupeGuru. (http://cx-freeze.sourceforge.net/) - Advanced Installer, if you want to build the installer file. (http://www.advancedinstaller.com/) diff --git a/qt/me/start.py b/qt/me/start.py index 07f883cd..1044b1b8 100644 --- a/qt/me/start.py +++ b/qt/me/start.py @@ -6,6 +6,8 @@ # http://www.hardcoded.net/licenses/hs_license import sys +import sip +sip.setapi('QVariant', 1) from PyQt4.QtCore import QCoreApplication from PyQt4.QtGui import QApplication, QIcon, QPixmap diff --git a/qt/pe/app.py b/qt/pe/app.py index ad4c9879..2f96ed2a 100644 --- a/qt/pe/app.py +++ b/qt/pe/app.py @@ -9,8 +9,7 @@ import os.path as op import logging -from PyQt4.QtGui import QImage -import PIL.Image +from PyQt4.QtGui import QImage, QImageReader from hsutil.str import get_file_ext @@ -41,9 +40,13 @@ class File(fs.File): fs.File._read_info(self, field) if field == 'dimensions': try: - im = PIL.Image.open(str(self.path)) - self.dimensions = im.size - except IOError: + ir = QImageReader(str(self.path)) + size = ir.size() + if size.isValid(): + self.dimensions = (size.width(), size.height()) + else: + self.dimensions = (0, 0) + except EnvironmentError: self.dimensions = (0, 0) logging.warning("Could not read image '%s'", str(self.path)) diff --git a/qt/pe/start.py b/qt/pe/start.py index d7a0f485..0ea87719 100644 --- a/qt/pe/start.py +++ b/qt/pe/start.py @@ -6,6 +6,8 @@ # http://www.hardcoded.net/licenses/hs_license import sys +import sip +sip.setapi('QVariant', 1) from PyQt4.QtCore import QCoreApplication from PyQt4.QtGui import QApplication, QIcon, QPixmap @@ -16,8 +18,6 @@ from app import DupeGuru if sys.platform == 'win32': import base.cxfreeze_fix - # This is a workaround for a cxfreeze problem where compiled dupeguru can't read tiff files - from PIL import TiffImagePlugin, TiffTags if __name__ == "__main__": app = QApplication(sys.argv)