I use the following script to tile large images into 256x256 chunks, with a tile X and Y in the filename, for use in Google Maps-style maps:
Code: Select all
convert input.png -sample 400% -crop 256x256 -set filename:tile "%[fx:page.x/256.0+1724074]_%[fx:page.y/256.0+1245486]" +repage +adjoin "%[filename:tile].png"
The problem is, the number can be quite large, so are being converted to string in "e" format, e.g. filenames come out as:
Code: Select all
1.72409e+006_1e+008.png
Code: Select all
12345678_12345678.png
Thanks
Joel