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. |
Trims an image on all sides by a maximum amount specified by the user. |
last modified: December 15, 2018
USAGE: limitedtrim [-t trimlimit] [-f fuzzval] infile outfile
-t ... trimlimit ... imit on amount of trim in pixels; integer>=0; PURPOSE: To trim an image on all sides to a maximum amount specified by the user. DESCRIPTION: LIMITEDTRIM trims an image on all sides to a maximum amount specified by the user. ARGUMENTS: -t trimlimit ... TRIMLIMIT is maximum amount of trim in pixels. Values are integesr>=0. The default will limit the trim to smallest trim amount from all the sides. -f fuzzval ... FUZZVAL is fuzz value (color tolerance) percent associated with trimming. Values are floats greater than or equal to zero. The default=0 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. |
Example 1 |
||
Original |
![]() |
|
Arguments: |
![]() |
|
Arguments: |
![]() |
What the script does is as follows:
This is equivalent to the following IM commands for the case of automatic mode
|