Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- import sys
- column = Image.open(sys.argv[1])
- gray = column.convert('L')
- blackwhite = gray.point(lambda x: 0 if x < 200 else 255, '1')
- blackwhite.save("code_bw.jpg")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement