Skip to content

Instantly share code, notes, and snippets.

@colinhumber
colinhumber / Image2Map.py
Last active September 19, 2024 03:44 — forked from bjorn/Image2Map.py
Python scripts for generating a tile set and tile map from an image. Modified to allow for transparency.
# Filename : Image2Map.py
# Authors : Georg Muntingh and Bjorn Lindeijer
# Version : 1.2
# Date : June 16, 2010
# Copyright : Public Domain
import os, sys, Image, networkx
class TileMap:
""" This class represents a map of tiles.