Convert any image into a playable map for openfront.io.
Takes a grayscale (or any) image and maps brightness values to terrain types:
| Terrain | Color |
|---|---|
| Water | Dark navy |
| Plain | Green |
| Highland | Tan |
| Mountain | Light gray |
Just open index.html in a browser — no install needed.
- Upload a PNG/JPG/WebP image
- Adjust the Water / Plain / Highland thresholds with the sliders
- Pick an algorithm (Legacy, Smooth, or Advanced)
- Download the result as
openfront_map.png
Requires Python 3 with Pillow, numpy, and tkinter.
pip install pillow numpyPut your source image at input.png, then run:
python image_to_map.pyAdjust sliders in the GUI and hit SAVE to export map_output.png.
docker compose up- Legacy — pixel-perfect, no post-processing
- Smooth — removes small noise islands and smooths jagged coastlines (configurable min island size and passes)
- Advanced — edge margin control for cleaner borders
- Use a heightmap or topographic image for best results
- Toggle Invert Brightness if land and water are swapped
- Higher "smooth passes" = softer coastlines but slower render