Crop an image into 50 x 50 pieces - you do get a remainder if the original does not divide exactly

<?php
exec
("/usr/local/bin/convert earth.jpg -crop 50x50 section/image-%d.jpg");
?>

path to convert | original image | crop comand | cropped width x cropped height | format to save new images as


image-0.jpg image-1.jpg image-2.jpg image-3.jpg
image-4.jpg image-5.jpg image-6.jpg image-7.jpg
image-8.jpg image-9.jpg image-10.jpg image-11.jpg
image-12.jpg image-13.jpg image-14.jpg image-15.jpg