User:Flo/pil: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 2: Line 2:
from PIL import Image
from PIL import Image
from urllib.request import urlopen
from urllib.request import urlopen
f = Image.open("coin-toss.jpg")
f = Image.open("dither.jpg")
a = f.convert("1")
a = f.convert("1")
a.save("coin.png")</source>
a.save("dither.png")</source>




[[File:001dither.png|200px|thumb|left|alt text]]
[[File:001dither.png|200px|left]]
[[File:002dither.png|200px|left]]
[[File:003dither.png|200px|left]]
[[File:004dither.png|200px|left]]
[[File:005dither.png|200px|left]]

Revision as of 02:16, 12 April 2021

 
from PIL import Image
from urllib.request import urlopen
f = Image.open("dither.jpg")
a = f.convert("1")
a.save("dither.png")


001dither.png
002dither.png
003dither.png
004dither.png
005dither.png