It would be useful to output a tile map in mode 2 or 3 as a csv file.
If I use a this tool on a map and get a set of unique tiles, then I want to know where the tiles are located on the map as I need to use the set to recreate it. For example the tool finds 5 unique tiles for a map of 20 tiles wide , the first row of the tile map may look like:
1,1,1,1,1,2,1,1,3,3,3,1,1,4,1,1,5,1,1,1