I am trying to create an app in PyQt5 which allows a user to click on a QPushButton and then view all their image files on their computer in a separate window before picking an image to be displayed in a QLabel in the window. At the moment I can upload the files, however some of them end up automatically rotating 90 degrees anticlockwise.
Here is the part of code that is responsible for adding the image to the QLabel:
def openImage(self): fName = QFileDialog.getOpenFileName(self, 'Open Image', '', 'Image Files (*.jpg)') self.label.setPixmap(QPixmap(fName).scaled(700, 700, Qt.KeepAspectRatio))
If anybody knows how to make sure that all images stay in the correct orientation instead of rotating, your help is very much appreciated.