python change image to white and background to black code example
Example: python image black and white
from PIL import Image
img = Image.open("image.jpg")
img.convert("1").save("result.jpg")
from PIL import Image
img = Image.open("image.jpg")
img.convert("1").save("result.jpg")