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 examples of interaction with Pillow & Wand & fs #40

Closed
cdplayer opened this issue May 20, 2020 · 3 comments
Closed

Add examples of interaction with Pillow & Wand & fs #40

cdplayer opened this issue May 20, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@cdplayer
Copy link

Is your feature request related to a problem? Please describe.
I'm a beginner at Python and have been looking as Skia recently and wanted to use some of it's unique features. This is the first(only?) python library that seems to be complete that i found. Could you please add some examples of interaction or exchange of information with Pillow and Wand. And also saving or reading from files. ie eliminate use of ipython calls.

Describe the solution you'd like
Examples

  • Read from file.
  • Add skia content.
  • Do Pillow / Wand content to 'canvas'
  • Add skia content.
  • Save to a file(skia)

Describe alternatives you've considered
Could not get the Ipython package working on my system so was a bit lost of how to use skia-python. it does appear to work but can't show or display or save to file.

@kyamagu kyamagu added the enhancement New feature or request label May 21, 2020
@kyamagu
Copy link
Owner

kyamagu commented May 21, 2020

Thanks for your request. Right now the package is under active development and lacks tutorial documentation. For now, you can get an idea of how to export an image to fs:

surface = skia.Surface(256, 256)
canvas = surface.getCanvas()
# Do whatever with the canvas
image = surface.makeImageSnapshot()
with open('output.png') as f:
    f.write(image.encodeToData())

@kyamagu
Copy link
Owner

kyamagu commented May 21, 2020

Also check the Overview notebook

@kyamagu
Copy link
Owner

kyamagu commented May 29, 2020

Python Image I/O notebook is available.

@kyamagu kyamagu closed this as completed May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants