Page 1 of 1

Posted: 2006-06-06T11:01:49-07:00
by Bonzo

Code: Select all

<?php
exec("/usr/local/bin/convert earth.jpg -crop 200x200 image-%d.jpg");
?> 
Example
http://www.rubblewebs.co.uk/imagemagick/section.php

Anthony

Posted: 2006-06-07T10:53:21-07:00
by Bonzo
Thats beyond me then Ben !

By the way you have an interesting site, I would have liked to see the damage to your car after the hailstones hit it. Can you do that again and get some pictures of the damge next time :)

Anthony

Re:

Posted: 2007-05-24T20:37:35-07:00
by Iland
Hello! Did you solve this problem? I have the same, and I see only one solution - C++ low level API... Maybe, you solve it simplier?

Re: Extract multiple images from the one source image?

Posted: 2007-06-03T19:37:07-07:00
by anthony
Did you try writing multiple images!
See http://www.imagemagick.org/Usage/files/#write

For example...

Code: Select all

   convert sat_image.png \
       \(  +clone  -crop 300x300+100+100\! -write area1.png +delate \) \
       \(  +clone  -crop 300x300+100+200\! -write area2.png +delate \) \
       \(  +clone  -crop 300x300+200+100\! -write area3.png +delate \) \
       \(  +clone  -crop 300x300+200+200\! -write area4.png +delate \) \
       null:
That will output 4 images of overlapping crops. Just adjust the arguments to the areas you want. The '!' in the above is a viewport crop, which if the crop is completely within the original image, does an automatic +repage.