| Value | Color |
|---|---|
| \e[0;30m | Black |
| \e[0;31m | Red |
| \e[0;32m | Green |
| \e[0;33m | Yellow |
| \e[0;34m | Blue |
| \e[0;35m | Purple |
This file contains hidden or 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
| import os | |
| from PIL import Image | |
| def cargar_imagenes(directorio): | |
| imagenes = {} | |
| for archivo in os.listdir(directorio): | |
| if archivo.endswith(".png") or archivo.endswith(".jpg"): | |
| # Obtener la posición de la imagen desde el nombre del archivo | |
| nombre, _ = os.path.splitext(archivo) | |
| x, y = map(int, nombre.split(',')) |