Initial release
This commit is contained in:
19
Herculito 9 La ceinture d'Hippolyte.py
Normal file
19
Herculito 9 La ceinture d'Hippolyte.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from PIL import Image
|
||||
|
||||
image = Image.open("herculito-ceinture.png")
|
||||
|
||||
width, height = image.size
|
||||
|
||||
image_rgb = image.convert("RGB")
|
||||
|
||||
for x in range(width//2):
|
||||
for y in range(height):
|
||||
pixel1 = image_rgb.getpixel((x,y))
|
||||
pixel2 = image_rgb.getpixel((x+width//2,y))
|
||||
if pixel1 == pixel2:
|
||||
pixel = (255,255,255)
|
||||
else:
|
||||
pixel = (0,0,0)
|
||||
image_rgb.putpixel((x, y), pixel)
|
||||
|
||||
image_rgb.save("herculito-ceinture_decoded.png", "png")
|
||||
Reference in New Issue
Block a user