it manges to load in the image into memory.
but it seems to crop each image and keep it in memory till the end of the process. which is no good cause in writes like 50gig to my swap disk then kills my computer.
ideally i would need to modify this so it writes out each tile to disk one at a time it might be a bit slow but thats cool i just need the process done
Code: Select all
#!/bin/bash
file=$1
function tile() {
convert -monitor -limit memory 2GiB -limit map 2GiB -limit area 2GB $file -scale ${s}%x -crop 256x256 \
-set filename:tile "%[fx:page.x/256]_%[fx:page.y/256]" \
+repage +adjoin "${file%.*}_${s}_%[filename:tile].png"
}
s=100
tile
s=50
tile