This library is an SDK for Herringbone Wang Tile generation:
http://nothings.org/gamedev/herringbone
The core design is that you use this library offline to generate a “template”
of the tiles you’ll create. You then edit those tiles, then load the created
tile image file back into this library and use it at runtime to generate
“maps”.
You cannot load arbitrary tile image files with this library; it is only
designed to load image files made from the template it created. It stores a
binary description of the tile sizes & constraints in a few pixels, and uses
those to recover the rules, rather than trying to parse the tiles themselves.
You *can* use this library to generate from arbitrary tile sets, but only by
loading the tile set and specifying the constraints explicitly yourself.