Fred's ImageMagick Scripts
|
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
|