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. |
Simulates a woodgrain texture. |
last modified: December 16, 2018
USAGE: woodgrain [-p process] [-d dimensions] [-m maincolor] [-g graincolor]
-p ... process ....... processing method; choices are 1 or 2; 1 is 1D expand PURPOSE: To simulate a woodgrain texture. DESCRIPTION: WOODGRAIN simulates a woodgrain texture. The user may control main (background) and grain (foreground) colors, coarse grain thickness, elongation, density, curviness and other factors. The newseed values allow the grain patterns to change. ARGUMENTS: -p process ... PROCESS is the processing method. Choices are 1 or 2. 1 is using 1D expand and 2 is using motion blur. The results are different but comparable. Method 2 is faster, especially when rotations are involved. The default=1 -d dimensions ... DIMENSIONS of the output image. Values are "x" separated integers>0 in the form of WIDTHxHEIGHT (with no spaces). The default=300x300 -m maincolor ... MAIN (background) COLOR of the texture image. Any valid opaque IM color is allowed. The default=burlywood. -g graincolor ... GRAIN (foreground) COLOR of the texture image. Any valid opaque IM color is allowed. The default=tan4. -t thickness ... THICKNESS of the coarse grain texture. Values are integers>0. The default=1. -e elongation ... ELONGATION of grain texture. Values are integers>0. The default=30. -D densities ... DENSITIES for coarse and fine grain textures. Values are comma separate integers>=0 in the form COARSE,FINE (densities). (with no spaces). The default=50,50. Note a fine density of 0 will disable any fine grain texture. -I intensities ... INTENSITIES for coarse and fine grain textures. Values are comma separate integers>=0 in the form COARSE,FINE (intensities) (with no spaces). The default=0,1. Note a fine intensity of 0 will disable any fine grain texture. -c curviness ... CURVINESS of coarse grain texture. Values are integers>=0. The default=5. -w wiggles ... WIGGLES are the wiggle amount of the coarse grain texture. Values are integers>=0. The default=5. -n newseeds ... NEWSEEDS are the new seed values for coarse grain, fine grain and noise textures. Values are comma separate integers>=0 in the form COARSE,FINE,NOISE (seeds) (with no spaces). The default=100,200,300. Note that changing these values causes the grain patterns to change. However, using the same value for all three newseeds should be avoided. -a amplify ... AMPLIFY is the amplification factor for added noise texture. Values are floast>=0. The default=2. Note a value of zero will disable any noise added to the texture. -s sharpen ... SHARPEN is the sharpening of the grain textures. Values are integers>=0. The default=5. -r rotation ... ROTATION of the texture pattern. Values are 0<=integer<=360. The default=0. -B brightness ... BRIGHTNESS factor for the output image. Values are integers>=0. The default=100 (nominal value). -S saturation ... SATURATION factor for the output image. Values are integers>=0. The default=100 (nominal value). -H hue ... HUE factor for the output image. Values are integers>=0. The default=100 (nominal value). NOTE: Results cannot be tiled without special processing.
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 - Variations in Colors |
|
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Example 2 - Variations in Thickness |
|
Arguments: |
Arguments: |
Example 3 - Variations in Elongation |
|
Arguments: |
Arguments: |
Example 4 - Variations in Curviness and Wiggles |
|
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Example 5 - Variations in Intensity |
|
Arguments: |
Arguments: |
Example 6 - Variations in Seeds |
|
Arguments: |
Arguments: |
Example 7 - Variations in Rotation |
|
Arguments: |
Arguments: |
Example 8 - Disable Fine Grain |
|
Arguments: |
Arguments: |
Example 9 - Disable Fine Grain and Disable Noise |
|
Arguments: |
Arguments: |
Example 10 - Variation in Method |
|
Arguments: |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands for tint case.
|