pixmap = pixmap.scaled(1100, 1800, QtCore.Qt.KeepAspectRatio) pixmap = pixmap.transformed(QtGui.QTransform().rotate(angle))