Advertisement
Peaser

Bytecore

Jul 2nd, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. from PIL import Image
  2. import sys, binascii, os
  3. hue = raw_input("")
  4. value = bin(int(binascii.hexlify(hue), 16)).replace('b','')
  5. cmap = {'0': (255,255,255),
  6.             '1': (0,0,0)}
  7. data = [cmap[letter] for letter in value]
  8. img = Image.new('RGB', (8, len(value)//8), "white")
  9. img.putdata(data)
  10. #img.show()
  11. desktoppath = os.path.expanduser("~/Desktop/")
  12. img.save(desktoppath+"file.BMP")
  13. print repr(hue)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement