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
Displaying images in Google Colab #5286
Comments
At the moment, this is somewhat confusing. For one thing, you can't simply call from PIL import Image
im = Image.new("RGB", (100, 100))
im.show() For another, where does the Would you be able to provide a more complete example? |
@radarhere I am using Colab. |
@radarhere I have tried |
From https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.show:
The display, eog and xv utilities require a display; Google Colab doesn't give you access to the display, only a terminal. |
@nulano Other libraries like those for visualization are displaying their images on Colab well. Does this mean it cannot be done with Pillow? |
I've created PR #5289 to suggest adding this functionality to Pillow. Even if it is merged though, it might take a while to get bundled into Google Colab, since the current version in Colab is Pillow 7.0, a bit behind the current version of 8.1.0. |
@radarhere and @nulano will this make me a contributor or I must write code? |
No, 'Contributors' isn't a manual list that we add you to, it's an automatic one - you must write a commit, and have that commit be merged in. |
@radarhere so how can I contribute ? I see almost everything is pretty much done. |
If you're asking what the next step is to the change being accepted, this is the review stage. So anyone, yourself included, can take a look at it and make comments for how it could be improved, or create a pull request in my Pillow fork with commits that they would like to be added to it. After that, one of the Pillow members needs to decide to merge it, and then it will be part of the next Pillow release. So the soonest it could be released is April 1. |
@radarhere I really wanted to contribute to that functionality. Guess I should probably look out for other improvements and Create a PR myself. |
A good place to start is with documentation. You could add #5289 to the release notes, perhaps in the API Additions section? https://github.com/python-pillow/Pillow/blob/master/docs/releasenotes/8.2.0.rst And does it also belong elsewhere in docs? |
No, the checks are unrelated. That PR doesn't have release notes. If you'd like to contribute them, you can edit https://github.com/python-pillow/Pillow/blob/master/docs/releasenotes/8.2.0.rst and create a new pull request. |
It's also apparent that https://pillow--5289.org.readthedocs.build/en/5289/reference/ImageShow.html doesn't mention IPythonViewer at all. If you'd like to fix that, you can modify https://github.com/python-pillow/Pillow/blob/master/docs/reference/ImageShow.rst. Once your change is ready, you can go to radarhere/Pillow@ipythonviewer...Kipkurui-mutai:master to create a pull request for #5289 specifically. |
What did you do?
Image.show()
What did you expect to happen?
Display the Image
What actually happened?
<PIL.PngImagePlugin.PngImageFile image mode=RGB size=450x253 at 0x7FFB7B401C50>
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: