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. |
Applies film-like perforations to two opposite edges of an image. |
last modified: February 07, 2019
USAGE: perforations [-n number] [-s size] [-p position] [-b border] infile outfile
-n ... number ..... number of perforations; integer>0; default=8 PURPOSE: To apply film-like perforations to two opposite edges of an image. DESCRIPTION: PERFORATIONS applies film-like perforations to two opposite edges of an image. Various border types may be selected. ARGUMENTS: -n number ... NUMBER of perforations. Values are integers>0. The default=8. -s size ... SIZE of perforations as percentage of smaller image dimension. Values are 0<floats<=15. The default=6. -p position POSITION of perforations. The choices are: TB (for top/bottom edges or LR (for left/right edges). The default is along the edges corresponding to the larger image dimension. -b border ... BORDER type. The choices are: black (b), aged (a), faded (f) or none (n). The default=black. Note: border=faded fades to transparent. Requirements: IM 6.5.9.3 or higher due to the use of 1D morphology blur for border=aged or faded.
References: 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 -- Top/Bottom Edges |
Original |
![]() |
Arguments: |
![]() |
Arguments: |
![]() |
Arguments: |
![]() |
Arguments: |
![]() |
Example 2 -- Left/Right Edges |
Original |
![]() |
Arguments: |
![]() |
Arguments: |
![]() |
Arguments: |
![]() |
Arguments: |
![]() |
What the script does is as follows for border=black at the top/bottom edges:
This is equivalent to the following IM commands
|