Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 6, 2018 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/768d941270187167b6b4c6c3bb2a35f2 to your computer and use it in GitHub Desktop.
Save parzibyte/768d941270187167b6b4c6c3bb2a35f2 to your computer and use it in GitHub Desktop.
from PIL import Image
imagen = Image.open("back_to_the_future.png") # Aquí puedes cambiar el nombre de la imagen
pixeles = imagen.load()
tamaño = imagen.size
anchura = tamaño[0]
altura = tamaño[1]
print("La anchura de la imagen es {}".format(anchura))
print("La altura de la imagen es {}".format(altura))
for x in range(anchura):
for y in range(altura):
pixel = pixeles[x, y]
print(pixel)
@autocasiongr
Copy link

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment