Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- file = 'Downloads/40684136_558625954594999_870056590579859456_n.jpg'
- img = Image.open(file)
- binary_form = ''.join(bin(byte)[2:] for byte in img.tobytes())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement