User:Flo/pil: Difference between revisions
< User:Flo
(Created page with "<code>from PIL import Image from urllib.request import urlopen f = Image.open("coin-toss.jpg") a = f.convert("1") a.save("coin.png")</code>") |
No edit summary |
||
Line 1: | Line 1: | ||
< | <source lang="python"> | ||
from PIL import Image | |||
from urllib.request import urlopen | from urllib.request import urlopen | ||
f = Image.open("coin-toss.jpg") | f = Image.open("coin-toss.jpg") | ||
a = f.convert("1") | a = f.convert("1") | ||
a.save("coin.png")</ | a.save("coin.png")</source> |
Revision as of 02:05, 12 April 2021
from PIL import Image
from urllib.request import urlopen
f = Image.open("coin-toss.jpg")
a = f.convert("1")
a.save("coin.png")