I'm trying to create tiles from a huge image, say 40000x40000
I found a script on line for imagemagick, it cuts tiles. It works great on small images, e.g. 10000x5000
as soon as I get more, it ends up using a lot of memory and the computer dies.
I added restriction options, but they don't seem to affect
I have a monitor, but it does not help, because the script just slows down and locks the machine
it seems like it just gobbles like a 50gig swap disk and then kills the machine
I think the problem is that since it cuts off every plate, it stores them in memory. It seems to me that I need him to write each fragment to disk, since he creates it without storing them in memory.
here is the script
#!/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
bash image image-processing imagemagick
abe
source share