Allowing all supported extensions to be read in the directory

This commit is contained in:
Colin Jermain 2018-03-08 14:47:19 -05:00
parent dec4885e29
commit 8e892c4f25

View File

@ -1040,7 +1040,7 @@ class MainWindow(QMainWindow, WindowMixin):
self.loadFile(filename) self.loadFile(filename)
def scanAllImages(self, folderPath): def scanAllImages(self, folderPath):
extensions = ['.jpeg', '.jpg', '.png', '.bmp'] extensions = ['.%s' % fmt.data().decode("ascii").lower() for fmt in QImageReader.supportedImageFormats()]
images = [] images = []
for root, dirs, files in os.walk(folderPath): for root, dirs, files in os.walk(folderPath):