Skip to content

Take a screenshot of a drawing/canvas and save it? #319

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

Closed
haesleinhuepf opened this issue Jan 30, 2023 · 2 comments
Closed

Take a screenshot of a drawing/canvas and save it? #319

haesleinhuepf opened this issue Jan 30, 2023 · 2 comments

Comments

@haesleinhuepf
Copy link
Contributor

Hi @martinRenou ,

ipycanvas is amazing! Just one quick question: Is it possible to retrieve a canvas in a numpy array or pillow image so that we can save a drawing?

Big thanks!

Best,
Robert

@martinRenou
Copy link
Collaborator

martinRenou commented Jan 30, 2023

Thanks for the kind words!

You can retrieve the image following https://ipycanvas.readthedocs.io/en/latest/retrieve_images.html#get-image-data-as-a-numpy-array

Though it's not an ideal API. I've been working on a more robust way to retrieve the image data in https://github.com/martinRenou/ipycanvas/pull/301 but it's not finished yet.

@haesleinhuepf
Copy link
Contributor Author

Fantastic! Also for the instant reply!🤩

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

No branches or pull requests

2 participants