Skip to content

Commit

Permalink
Change Pillow tutorial stub to use show() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkirkby committed Apr 8, 2023
1 parent f1a1db7 commit 0b5531b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/demo/pillow/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ modules: pillow
files: hopper.jpg
---

This is a starting point for a Pillow tutorial. Until the `Image.show()` method
is monkey patched, use the `LivePillowImage` workaround.
This is a starting point for a Pillow tutorial. See the [Pillow docs] for
inspiration.

### Canvas
from PIL import Image
Expand All @@ -19,5 +19,6 @@ is monkey patched, use the `LivePillowImage` workaround.
round(image.width*scale),
round(image.height*scale)))

live_image = LivePillowImage(image)
live_image.display((-image.width/2, image.height/2))
image.show()

[Pillow docs]: https://pillow.readthedocs.io/en/stable/handbook/tutorial.html

0 comments on commit 0b5531b

Please sign in to comment.