qpixmap

Display an image in a label without saving it

Display an image in a label without saving it Question: The following lines are in my script: from PyQt5 import QtGui, QtWidgets, QtCore from PyQt5.QtGui import QIcon, QPixmap from PyQt5.Widgets import * import cv2 imgCross = positioningCross(Dy, Dx, center, imgCross) cv2.imwrite(“img.png”, imgCross) self.ImgLabel.setPixmap(QPixmap(“img.png”)) def positioningCross(Dy, Dx, center, imgCross): if(center[1,0]>=center[0,0]): Dy2 = center[0,0] + np.absolute(Dy) else: …

Total answers: 1