Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Simultaneously rotates and crops an image to eliminate any background. |
last modified: December 16, 2018
USAGE: turn [-a angle] [-x xshift] [-y yshift] [-f format] infile outfilee
-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. -x xshift ... XSHIFT of image. Values are integers (positive or negative). The default=0. -y xshift ... YSHIFT of image. Values are integers (positive or negative). The default=0. -f format ... FORMAT for the output image. The choices are: aspect (a), square (s) or maxarea (m). Format=aspect preserves the input image's w:h aspect ratio. Format=square makes the output square. Format=maxarea uses largest subsection possible for the output. The default=aspect. 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 |
Original Image |
|
Animation: -a using 15 degree increments -f maxarea |
What the script does is as follows:
This is equivalent to the following IM commands.
|