SHARE
TWEET

Untitled

a guest Jun 25th, 2019 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from PIL import Image
  2. import sys
  3. column = Image.open(sys.argv[1])
  4. gray = column.convert('L')
  5. blackwhite = gray.point(lambda x: 0 if x < 200 else 255, '1')
  6. blackwhite.save("code_bw.jpg")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top