Fred's ImageMagick Scripts
My scripts are available free of charge for non-commercial 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 in the script or not, is restricted to the above licensing arrangements. It is also subject to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php |
|
Superimposes a set of horizontal and/or vertical grid lines on an image. |
last modified: May 30, 2008
|
USAGE: grid [-s spacing] [-c color] [-t thickness] [-o opacity] infile outfile
-s ...... spacing ..... x,y spacing between grid lines; default=16,16 or 16; PURPOSE: To superimpose a set of horizontal and/or vertical grid lines on an image. DESCRIPTION: GRID superimposes a set of horizontal and/or vertical grid lines on an image. Parameters are available to select the grid line color, thickness and opacity. ARGUMENTS: -s spacing ... SPACING specifies the horizontal (x) and vertical (y) grid offset between lines. Spacing must be provided as integer values. If the second value is left off, then it will be set identical to the first. If only vertical lines are desired, set the horizontal (x) spacing larger than the width of the image. If only horizontal lines are desired, set the vertical (y) spacing larger than the height of the image. The default=8. Note: if you want the bottom and/or right grid line to show, then the image dimension(s) must be a multiple of the grid spacing plus 1. -c color ... COLOR is the color of the grid lines. Any valid IM color specification is allowed. Be sure to color values in double quotes. The default="black". -t thickness ... THICKNESS is the grid line thickness. Values are positive integers. The default=1 -o opacity ... OPACITY is the grid line opacity. Values are non-negative floats between 0.0 and 1.0. The default=1 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. |
|
Grid Lines Superimposed On Image |
|||||
|
Original Image |
arguments: |
arguments: |
arguments: |
arguments: |
arguments: |
|
|
|
|
|
|
|
What the script does is as follows:
This is equivalent to the following IM commands for the case of
|