Transmission
MISC EASY - 278 points
from PIL import Image
# open image
im = Image.open("beamoflight.png")
# get ascii values from pixels
pixels = list(im.getdata())
# convert to hex
hexList = []
for pixel in pixels:
hex = ""
for i in pixel:
hex += i.to_bytes(1, byteorder='big').hex()
hexList.append(hex)
with open("hex.txt", "w") as f:
for hex in hexList:
f.write(hex + " ")Last updated
