@WiNDfaLLx/

decoder

Python

yEET

fork
loading
Files
  • main.py
  • download.png
  • full.png
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from PIL import Image

encoded = Image.open("download.png").convert("RGB")

decoded = Image.new("RGB", (600, 600))

for x in range(200):
  for y in range(200):
    pixel = encoded.getpixel((x, y))

    red = ((pixel[0] % 2)*255)
    green = ((pixel[1] % 2)*255)
    blue = ((pixel[2] % 2)*255)
    
    final = (
      red,
      green,
      blue
    )

    decoded.putpixel((x, y), final)

decoded.save('decoded.png')