From c53c8f3e00c9f7e0eddb920089b8c1c79e34d851 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 17 Jul 2011 00:54:12 +0200 Subject: [PATCH] Fix axes color order --- scikits/image/io/_plugins/qt_plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scikits/image/io/_plugins/qt_plugin.py b/scikits/image/io/_plugins/qt_plugin.py index 7813e654..ff8c7bed 100644 --- a/scikits/image/io/_plugins/qt_plugin.py +++ b/scikits/image/io/_plugins/qt_plugin.py @@ -108,8 +108,11 @@ def imread_qt(filename): img = img.reshape((qtimg.height(), pixelsPerLine)) img = img[:, :qtimg.width()] # Strip qt's false alpha channel if needed + # and reorder color axes as required if bytesPerPixel == 4 and not qtimg.hasAlphaChannel(): - img = img[:, :, 0:3] + img = img[:, :, 2::-1] + elif bytesPerPixel == 4: + img[:, :, 0:3] = img[:, :, 2::-1] return img if sip.SIP_VERSION >= 0x040c00: