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. |
Appends an image border by extending the outer regions of the image. |
last modified: December 15, 2018
USAGE: imageborder [-s size] [-b blurring] [-m mixcolor] [-p percent] [-r rimcolor] [-t thickness] [-e effect] [-f framebevel] [-c contrast] infile outfile
-s .... size ............ size of border; WidthxHeight; default equals 10% PURPOSE: To append an image border by extending the outer regions of the image. DESCRIPTION: IMAGEBORDER appends an image border by extending the outer regions of the image. Thus the output image will be larger than the input image and no area of the input image will be covered. The extended border can be blurred, mixed with some other color and can either extend the outer row and column or mirror the outer area of the image to create the border effect. A rim color can also be placed around the original image. ARGUMENTS: -s size ... SIZE (WidthxHeight) is the size or dimensions of the border region. Values are integers greater than 0. Size can be specified as one value that will be used all around or as two values delimeted with an "x". The first value will be the border size in the width dimension and the second will be the border size in the height dimension. The default is to use one value all around that is 10% of the min(width,height) of the image. -b blurring ... BLURRING is the amount of blur to apply to the border region. Values are integers>=0. The default=3 -m mixcolor ... MIXCOLOR is the color to mix with the image border. Any valid IM color may be used. The default is white. -p percent ... PERCENT is the percent of the mixcolor to blend with the image border. Values are integers such that 0<=percent<=100. The default is 30. -r rimcolor ... RIMCOLOR is the color of the rim to place around the original image. Any valid IM color may be used. The default is white. -t thickness ... THICKNESS is the thickness of the rim around the original image. Values are integers>=0. The default=1. -e effect ... EFFECT specifies the type of image border effect to use. The choices are edge, mirror, magnify, tile or random. If edge is specified, then the top, right, bottom and left row/column of the image will simply be extended by the size parameters to create the image border. If mirror is specified, then the outer size pixels from the image will be mirrored to produce the image border effect. If magnify is specified, then the border will be created from the magnified image. If tile is specified, then the border will be created from tiling the image. If random is specified, then the border will be made up of random pixels from the image The default is edge. -f framebevel ... FRAMEBEVEL is the type of bevel to apply over the effect. The choices are: outer (i.e. raised), inner (i.e. depressed) or split (half and half). The default is no bevel. -c contrast ... CONTRAST percent for innerbevel or outerbevel. Values are integers between 0 and 100. The default=50. NOTE: Requires IM 6.3.5-4 or higher due to the use of -distort SRT 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 | ||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands.
|