Fred's ImageMagick Scripts
My scripts are available free of charge for non-commercial use. If you redistribute or incorporate any of these scripts into other free applications, you may use my scripts by simply referencing my name and this web page: Fred Weinhaus and http://www.fmwconcepts.com/imagemagick/index.html For use of my scripts in commercial use or non-free applications, please contact me for
licensing arrangements. Usage, whether stated in script or not, is also subject to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php |
|
Simultaneously rotates and crops an image to eliminate any background. |
last modified: June 22, 2011
|
USAGE: turn [-a angle] [-f format] infile outfile
-a .... angle ..... clockwise angle of rotation; 0<=float<=360; default=0 PURPOSE: To simultaneously rotate and crop an image to eliminate any background. DESCRIPTION: TURN simultaneously rotate and crop an image to eliminate any background. Two methods are available: preserve the input image's w:h aspect ratio in the output or make the output square. ARGUMENTS: -a angle ... ANGLE of rotation. Values are floats in the range of 0 to 360 degrees. -f format ... FORMAT for the output image. The choices are: aspect (a) or square (s). Format=aspect preserves the input image's w:h aspect ratio. Format=square makes the output square. Requirement: IM 6.3.6-1 or higher due to the use of -set distort:viewport WxH+X+Y CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
|
Original Image |
|
|
|
|
Animation: -a using 15 degree increments -f aspect |
|
|
Original Image |
|
|
|
|
Animation: -a using 15 degree increments -f square |
|
|
What the script does is as follows:
This is equivalent to the following IM commands.
|