This commit is contained in:
Colombo 2020-04-15 22:58:59 +04:00
parent ea607edfc9
commit baff59e421

View file

@ -38,8 +38,8 @@ def QImage_from_np(img):
return QImage(img.data, w, h, c*w, fmt ) return QImage(img.data, w, h, c*w, fmt )
def QImage_to_np(q_img): def QImage_to_np(q_img, fmt=QImage.Format_BGR888):
q_img = q_img.convertToFormat(QImage.Format_BGR888) q_img = q_img.convertToFormat(fmt)
width = q_img.width() width = q_img.width()
height = q_img.height() height = q_img.height()