pixelated

This commit is contained in:
Maxime Vorwerk
2024-06-21 17:13:43 +02:00
parent 560144c8cc
commit 993ade098d
4 changed files with 15 additions and 0 deletions

BIN
pixelated/out.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

BIN
pixelated/scrambled1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

BIN
pixelated/scrambled2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

15
pixelated/sol.py Executable file
View File

@@ -0,0 +1,15 @@
#!/home/maxime/.pyvenv/bin/python3
from PIL import Image
import numpy as np
p = Image.open("scrambled1.png")
q = Image.open("scrambled2.png")
p = np.array(p)
q = np.array(q)
print(p.shape)
r = Image.fromarray(p + q)
r.save("out.png")