Created
April 6, 2018 14:38
-
-
Save parzibyte/768d941270187167b6b4c6c3bb2a35f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great