diff --git a/pyqtgraph/functions.py b/pyqtgraph/functions.py index 21f00bec..72321201 100644 --- a/pyqtgraph/functions.py +++ b/pyqtgraph/functions.py @@ -1503,7 +1503,6 @@ def imageToArray(img, copy=False, transpose=True): the QImage is collected before the array, there may be trouble). The array will have shape (width, height, (b,g,r,a)). """ - fmt = img.format() img_ptr = img.bits() if QT_LIB.startswith('PyQt'): @@ -1522,8 +1521,6 @@ def imageToArray(img, copy=False, transpose=True): arr = np.frombuffer(img_ptr, dtype=np.ubyte) arr = arr.reshape(img.height(), img.width(), 4) - if fmt == img.Format_RGB32: - arr[...,3] = 255 if copy: arr = arr.copy()