Hi E's, I try to found the best solution, not matter if it is in imagemagick or in php, for get equal pieces of a picture like you can see in attach image.
In practice, if I have a picture width 800 * length 600, and if I want 12 pieces 4*3 (view attach image), I will get 12 pieces of 200*200 each one:
I will use get_image_size to know the size of the picture.
(variables width and length come from the get_image_size array)
$width = $width / 4; //determinate the width, it is 200px
$length = $length / 3 //determinate the length, it is 200px
Now it is the difficult part, it is give me 12 pieces 200*200 each and save in one folder of my server.
How I get the pieces of picture?