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

Add an openImage function that can open PIL images and download from http #77

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Mohamed-Waiel-Shikfa
Copy link
Contributor

Added openImage to more easily open PIL images. These images can then be manipulated by PIL library and transformed into a CMUImage like usual.

Mohamed-Waiel-Shikfa and others added 2 commits June 10, 2024 23:35
Added openImage to more easily open PIL images. These images can then be manipulated by PIL library and transformed into a CMUImage like usual.
…c'sand PIL's Image type. Also made it work from the repl
@Mohamed-Waiel-Shikfa
Copy link
Contributor Author

Mohamed-Waiel-Shikfa commented Jul 11, 2024

This now works perfectly and passes all the tests. If merged could really help students working with images, as it's now only a matter of calling a function without having to worry about file path etc, potentially making

unnecessary or at least easier to finish.

It could also help in other part of cmu_graphics source code where images are being handled

I am not sure if the function needs to be translated somewhere and if it needs to be included in the import of __init__.py, but I am open for feedback and would be happy to integrate any necessary change to see this feature merged.

TL;DR this function aims to expose the loadImageFromStringReference function present in shape_logic.py to the user

, and to thus replace it in some way

@Mohamed-Waiel-Shikfa
Copy link
Contributor Author

I need some help on this one. The test is only failing for macOS zip install, which is weird, and I cannot test locally to debug.
I am also not sure what the difference between the pip and zip installs are, but pip test succeeds on both platforms.

@schmave mind taking a quick look on this when you have the time. Also, quick mention, the other 3 PR are now ready for review.

@schmave schmave changed the title Update utils.py Add an openImage function that can open PIL images and download from http Jul 14, 2024
@linxuanm
Copy link
Contributor

linxuanm commented Nov 8, 2024

Hi! Thanks for contributing. I'll take a look at this!

If you are currently active, would it be possible to close and reopen this PR on your end so that the checks can be ran again (the artifacts from the past run expired so that the report log cannot be accessed)? I think my permission on this repo isn't set up correctly just yet so I can't do that from my end :(

@Mohamed-Waiel-Shikfa
Copy link
Contributor Author

Mohamed-Waiel-Shikfa commented Nov 8, 2024

Done! Let's see what happening now.

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

Successfully merging this pull request may close these issues.

2 participants