Skip to content

Instantly share code, notes, and snippets.

Avatar
🥚
Eating eggs from big endian

Gurkirat Singh tbhaxor

🥚
Eating eggs from big endian
View GitHub Profile
View bojack.py
from PIL import Image
import binascii
import string
def rgb2hex(r,g,b):
hex = "#{:02x}{:02x}{:02x}".format(r,g,b)
return str(hex)
im = Image.open('bojack.png')
print im
arr=''
pix_val = list(im.getdata())