Pages for logged out editors learn more
from PIL import Image from urllib.request import urlopen f = Image.open("coin-toss.jpg") a = f.convert("1") a.save("coin.png")