Skip to content

Instantly share code, notes, and snippets.

Created Jul 30, 2018
What would you like to do?
Mostrar una imagen en b&n a partir de un archivo de 1's y 0s
from PIL import Image
with open('payload.bin','rb') as textfile:
bytestring =
image_data = bytestring # byte values of the image
image = Image.frombytes('1', (16*8,366), image_data, 'raw')
image = image.transpose(Image.TRANSPOSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment