aW1wb3J0IG51bXB5IGFzIG5wCmZyb20gUElMIGltcG9ydCBJbWFnZQoKZGVmIGVuY29kZV9pbWFnZShpbWcpOgppbWdfYXJyYXkgPSBucC5hcnJheShpbWcpCmFzY2lpX3N0ciA9ICZxdW90OyZxdW90Owpmb3Igcm93IGluIGltZ19hcnJheToKZm9yIHBpeGVsIGluIHJvdzoKYXNjaWlfc3RyICs9IGNocihwaXhlbFswXSkgKyBjaHIocGl4ZWxbMV0pICsgY2hyKHBpeGVsWzJdKQpyZXR1cm4gYXNjaWlfc3RyCgpkZWYgZGVjb2RlX2FzY2lpKGFzY2lpX3N0cik6CiMgQ29udmVydCBBU0NJSSBzdHJpbmcgYmFjayBpbnRvIGEgbGlzdCBvZiBpbnRlZ2VycwppbnRzID0gW29yZChjKSBmb3IgYyBpbiBhc2NpaV9zdHJdCgojIFJlc2hhcGUgdGhlIGxpc3Qgb2YgaW50ZWdlcnMgaW50byBhIDNEIGFycmF5IHJlcHJlc2VudGluZyB0aGUgaW1hZ2UKd2lkdGggPSAxOTIwCmhlaWdodCA9IDEwODAKY2hhbm5lbF9jb3VudCA9IDMKaW1nX2FycmF5ID0gbnAucmVzaGFwZShpbnRzLCAoaGVpZ2h0LCB3aWR0aCwgY2hhbm5lbF9jb3VudCkpCgojIENyZWF0ZSBhIFBpbGxvdyBJbWFnZSBvYmplY3QgZnJvbSB0aGUgTnVtUHkgYXJyYXkKaW1nID0gSW1hZ2UuZnJvbWFycmF5KG5wLnVpbnQ4KGltZ19hcnJheSkpCgpyZXR1cm4gaW1nCgphc2NpaV9zdHIgPSAmcXVvdDtqcHhyUGp4dlBqeTlQano5UGoxK1BqMitQajMrUGo0K1BqNStQajYrUGo3K1AK
import numpy as np
from PIL import Image
def encode_image(img):
img_array = np.array(img)
ascii_str = ""
for row in img_array:
for pixel in row:
ascii_str += chr(pixel[0]) + chr(pixel[1]) + chr(pixel[2])
return ascii_str
def decode_ascii(ascii_str):
# Convert ASCII string back into a list of integers
ints = [ord(c) for c in ascii_str]
# Reshape the list of integers into a 3D array representing the image
width = 1920
height = 1080
channel_count = 3
img_array = np.reshape(ints, (height, width, channel_count))
# Create a Pillow Image object from the NumPy array
img = Image.fromarray(np.uint8(img_array))
return img
ascii_str = "jpxrPjxvPjy9Pjz9Pj1+Pj2+Pj3+Pj4+Pj5+Pj6+Pj7+P