-
-
Save juananpe/138d4a5748f9d7e031ccdbaaac30979f to your computer and use it in GitHub Desktop.
Mostrar una imagen en b&n a partir de un archivo de 1's y 0s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
with open('payload.bin','rb') as textfile: | |
bytestring = textfile.read() | |
image_data = bytestring # byte values of the image | |
image = Image.frombytes('1', (16*8,366), image_data, 'raw') | |
image = image.transpose(Image.TRANSPOSE) | |
image.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment