Lenna

Découvre le message de Lenna.
Besoin d’un indice?
import urllib
from PIL import Image
def decode_image(img):
  width, height = img.size
  msg = ""
  index = 0
  for row in range(height):
      for col in range(width):
          r, g, b = img.getpixel((col, row))
          if row == 0 and col == 0:
              msg_length = r
          elif index <= msg_length:
              msg += chr(r)
          index += 1
  return msg
urllib.urlretrieve("https://www.cedricbonhomme.org/images/blog/2014/08/Lenna_Simple_Method.png", "Lenna.png")
img = Image.open("Lenna.png")
print decode_image(img)
Posts in this series
- Séquence D’entiers A000217
- Stéganographie Avec Ensembles en Utilisant La Fonction Identité
- Stéganalyse De La Méthode LSB (Avec Un Ensemble De Nombres Décrit Par Crible D’Eratosthenes)
- Stéganographie Avec Ensembles
- Elisha
- Simple Art of Steganography
- Photo Libre D’Irlande
- Stéganalyse De La Méthode LSB
- Lena
- Lenna