[magick-users] rectangle -< 2 squares
Anthony Thyssen
anthony at griffith.edu.au
Mon Jun 23 17:11:15 PDT 2008
Al Bogner on wrote...
| I use ImageMagick 6.4.0 04/14/08 Q16 (Suse Linux 10.3) and would like to do
| the following:
|
|
| There is an image (rectangle) with a ratio of 2:1 in landscape format.
|
| How can I split it in 2 squares?
|
convert image.png -crop 50%x100% image_%d.png
This will spilt it into two 'tiles' and save the result as two files
image_0.png and image_1.png
| IHow can I crop the rectangular to a square by cropping the left and right
| side?
|
If you are sure it is a 2:1 ratio rectangle.
convert image.png -gravity center -crop 50%x100%+0+0 image_center.png
The +0+0 turns of tiled crop.
| I can imagine to do this by calcualting the size, but is there an easier way?
|
See IM Examples, Cutting and Bordering
http://imagemagick.org/Usage/crop/
Look at percentage crops, and tiled crops.
Better still look at all the examples given.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
``Never argue with a computer.'' -- Avon, Blake's 7
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list