I need a large png (16384pixels-wide) split into 256 pixel-wide pngs. That much is working just fine with;
Code: Select all
Magick convert -crop 256x256 large.png 6-%d.gif
0-0.gif
0-1.gif
0-2.gif
… etc.
63-63.gif
Is there an easy command or do I need to use loops? If so, at the risk of embarrassing myself horribly, here's my pseudocode for how I imagine it might approximately go;
Code: Select all
tileArray[4096];
tileNumber=0;
for(column=0;column<63;column++){
for(row=0;row<63;row++){
tileArray[tileNumber] = [column] + "-" + [row];
tileNumber++;
}
}
Magick convert -crop 256x256 large.png tileArray[%d].gif
Cheers