hmeine / qimage2ndarray

qimage2ndarray is a small python extension for quickly converting between QImages and numpy.ndarrays (in both directions).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Are there any plans to port for PySide2?

AndiLi99 opened this issue · comments

Or is PySide2 already supported?

The changelog indicates support for PySide and not PySide2 was added. Installing with PySide2 with conda doesn't seem to work.

Pypi package is not updated as well. Until then, just clone the repo and install with python setup.py install

import cv2
from qimage2ndarray import array2qimage
img = cv2.imread("/path/to/pic.tif")
cute_img = array2qimage(img)
print(type(cute_img))

Output:

<class 'PySide2.QtGui.QImage'>
Process finished with exit code 0

1.7 is released with PySide2 support. Please re-open or open new issues if you see remaining issues.