From 900d6743d873921ed2c666873e19365c7766dd4c Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 10 Apr 2021 20:33:41 +0800 Subject: [PATCH] set ImageItem as row-major --- pyqtgraph/graphicsItems/tests/test_ImageItemFormat.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyqtgraph/graphicsItems/tests/test_ImageItemFormat.py b/pyqtgraph/graphicsItems/tests/test_ImageItemFormat.py index 4b7d6b63..0838c115 100644 --- a/pyqtgraph/graphicsItems/tests/test_ImageItemFormat.py +++ b/pyqtgraph/graphicsItems/tests/test_ImageItemFormat.py @@ -5,9 +5,8 @@ from pyqtgraph.Qt import QtGui def check_format(shape, dtype, levels, lut, expected_format): data = np.zeros(shape, dtype=dtype) - item = pg.ImageItem(data, autoLevels=False) - item.setLevels(levels) - item.setLookupTable(lut) + item = pg.ImageItem(axisOrder='row-major') + item.setImage(data, autoLevels=False, lut=lut, levels=levels) item.render() assert item.qimage.format() == expected_format