I need to hook up makemultires to do some backend work.
How do I predict how many levels this tool will make and what will be the tile width/heights based on variable source image dimensions?
# tilesize
# - size of the image tiles
# - should be between 250 and 1500
# - use 'auto' to let the tool automatically find good sizes
#
tilesize=auto
# levels
# - number of multi-resolution levels to generate
# - use 'auto' to find automatically the best
# - the number of the automatic levels depends on the image size and on 'minsize' and 'maxsize' settings
#
levels=auto
7000x3500 makes 2 levels
<level tiledimagewidth="2674" tiledimageheight="2674">
<level tiledimagewidth="1337" tiledimageheight="1337">
10000x5000 makes 3 levels
<level tiledimagewidth="3183" tiledimageheight="3183">
<level tiledimagewidth="1592" tiledimageheight="1592">
<level tiledimagewidth="796" tiledimageheight="796">
I could probably get away with just hard coding it, and hope I don't run into any old work thats neither one, but hopefully some of the experts here know the formula.
A fairly thorough documentation search didn't help.