Image1 = cv2.resize(self.Image, (1000,700), interpolation=cv2.INTER_AREA)
shrink = cv2.cvtColor(Image1, cv2.COLOR_BGR2RGB)
self.QtImg = QtGui.QImage(shrink.data,
shrink.shape[1],
shrink.shape[0],
shrink.shape[1] * 3,
QtGui.QImage.Format_RGB888)
self.label.setPixmap(QtGui.QPixmap.fromImage(self.QtImg))
self.label.show()
清除图片
self.label.setPixmap(QPixmap(""))
效果图