- [NEW] Minimapa en el editor
- [NEW] Diferent marcador - [NEW] Més habitacions
This commit is contained in:
1 parent
a86011ba37
commit
8a770de885
12 files changed
+359
-24
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from PIL import Image
|
||||
import sys
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
print(f"Uso: {sys.argv[0]} entrada.png salida.pal")
|
||||
sys.exit(1)
|
||||
|
||||
img = Image.open(sys.argv[1]).convert("RGB")
|
||||
|
||||
num_colors = img.width * img.height
|
||||
|
||||
with open(sys.argv[2], "w") as f:
|
||||
f.write("JASC-PAL\n")
|
||||
f.write("0100\n")
|
||||
f.write(f"{num_colors}\n")
|
||||
|
||||
for y in range(img.height):
|
||||
for x in range(img.width):
|
||||
r, g, b = img.getpixel((x, y))
|
||||
f.write(f"{r} {g} {b}\n")
|
||||
|
||||
print(f"Escritos {num_colors} colores en {sys.argv[2]}")
|
||||
Reference in new issue
Block a user