Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix QPainter backend image drawing #574

Closed
jwiggins opened this issue Feb 5, 2021 · 0 comments · Fixed by #590
Closed

Fix QPainter backend image drawing #574

jwiggins opened this issue Feb 5, 2021 · 0 comments · Fixed by #590

Comments

@jwiggins
Copy link
Member

jwiggins commented Feb 5, 2021

The test kiva.tests.test_qpainter_drawing.TestQPainterDrawing.test_image is currently disabled because there appears to be some color confusion in the QPainter kiva backend. The test draws an image containing a red square and checks the pixels drawn to see if any are red. However no pixels are red because the QPainter code draws a blue square instead. When a numpy array is passed to draw_image, it is assumed to be in RGB order (QImage.Format_RGB888 or QImage.Format_RGB32) but ends up getting drawn as if it were in BGR order.

https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtgui/qimage.html#qimage-image-formats
https://www.riverbankcomputing.com/static/Docs/PyQt4/qimage.html#Format-enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant