-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
ImageQt does not work as expected in PyQt5 #5266
Comments
Ok, got it. You're hitting this bug Lines 203 to 205 in fdd8b68
If I change your code to # Open up image in Pillow
image = Image.open("pink_flower.jpg")
pixmap = ImageQt.toqpixmap(image) then it works. |
Huh. That's interesting. I know I tried that, but I didn't remove the This definitely works if you remove that line too. |
Thanks for looking into this and finding the error so quickly! |
I've created #5268 to change Pillow so that your original code works. |
Thanks for looking into this. I appreciate it! |
What did you do?
Attempted to use ImageQt to load a Pillow image in a PyQt5 application
What did you expect to happen?
I expected the image to load correctly. There are no errors, but it does not load the image in PyQt5 correctly.
What actually happened?
The image loaded as a mostly white image with kind of ghost image of the actual photo (see screenshot). I have attached the PyQt5 and PySide6 code, including screenshots from when I ran both files.
Note: The same code works in PySide6, but not in PyQt5.
What are your OS, Python and Pillow versions?
pyqt_pillow_issue.zip
The text was updated successfully, but these errors were encountered: