Python script which reducing amount of unique tiles in image (useful for retro development)
- Download python script
- Put your image in script folder, and rename it to map.png
- Change quality in python script of reducer.reduceTilesetSizeBySimilarity(0.3) for your needs (value from 0.2 to 1.0)
- Run script, result will be in result.png file, in script folder
- Generating tileset from image
- Generating tilemap from image (2D array)
- Generating reduced tileset according to this formula: tile_size = cell_size*quality
- Comparing every tile with every tile in reduced tileset, if tiles are equal, then merging tiles. Merged tile putting from reduced tileset to original tileset
- Recreating image back, from tileset and tilemap.
- Done