Skip to content

Instantly share code, notes, and snippets.

View ShinuToki's full-sized avatar

Joan Lara ShinuToki

View GitHub Profile
@BoldBigflank
BoldBigflank / Image2Map.py
Last active November 29, 2023 12:43
Convert an image of a map into its generated tile-set.Command line args: tileWidth, tileHeight, fileexample:python Image2Map.py 16 16 map.png
# Filename : Image2Map.py
# Authors : Alex Swan, Georg Muntingh and Bjorn Lindeijer
# Version : 1.3
# Date : June 17, 2013
# Copyright : Public Domain
import os, sys, networkx
from PIL import Image
class TileMap: