User:Flo/pil: Difference between revisions

From XPUB & Lens-Based wiki
(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:
<code>from PIL import Image
<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")</code>
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")