1from PIL import Image
2image_file = Image.open("cat-tied-icon.png") # open colour image
3image_file = image_file.convert('1') # convert image to black and white
4image_file.save('/tmp/result.png')
1from PIL import Image
2
3col = Image.open("cat-tied-icon.png")
4gray = col.convert('1')
5bw.save("result_bw.png")