API suggestion: avoid similar function and class (tilemap and Tilemap)
The most pythonic way would be to use `Tilemap(param)` to get an instance.  For multiple signatures (`width, height, img` or `tm`), the typical solution is classmethods (see dict.fromkeys, int.from_bytes, etc. → could be `Tilemap.load`)