How to get row/column info in tile filenames?
Posted: 2015-04-06T23:14:39-07:00
I'm working with largish images (up to 12000x12000 pixels) and want to break them up into tiles. I've been using:
which does the job fine. But while the tile names contain sequence numbers, it would be very convenient if the names indicated the row and column position of each tile in it's name, like tiled_003_018.jpg for example. I can't figure a way to do this in ImageMagick, and I can't think of a way to do it with a shell script or simple perl script. Because all the large images are of varying size, I don't know how many rows and columns will result from any particular run of convert -crop.
Can anyone suggest a way to achieve my goal? I've googled for hours, and read IM's documentation pertaining to escapes until my eyeballs hurt, but I've not found anything that does the job.
Thanks...
---
Angus
Version: ImageMagick 6.8.6-10 2013-09-19 Q16 http://www.imagemagick.org
OS: Linux 3.10.30-smp (Slackware 14.1)
Code: Select all
convert -crop 256x256 bigimage.jpg tiled_%06d.jpg
Can anyone suggest a way to achieve my goal? I've googled for hours, and read IM's documentation pertaining to escapes until my eyeballs hurt, but I've not found anything that does the job.
Thanks...
---
Angus
Version: ImageMagick 6.8.6-10 2013-09-19 Q16 http://www.imagemagick.org
OS: Linux 3.10.30-smp (Slackware 14.1)