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. |
Transforms the graylevels in each RGB channel according to a sinusoidal wave function. |
last modified: December 16, 2018
USAGE: wavemap [-c cycles] [-p phase] infile outfile
-c .... cycles ..... number of cycles in sinusiodal wave transform; PURPOSE: To transform the graylevels in each RGB channel according to a sinusoidal wave function. DESCRIPTION: WAVEMAP transform the graylevels in each RGB channel according to a sinusoidal wave function. This is similar to GIMP's Alien Map. ARGUMENTS: -c cycle ... CYCLES is the number of cycles in the sinusoidal wave transform. Values are floats>=0. One or three comma delimited values may be provided, one for each of the RGB channels. If only the one value is provided, the other two will be set to the same value. The default=0.5 (which is the same as 0.5,0.5,0.5). With phase=0, this produces a nearly linear transform. -p phase ... PHASE is the phase shift in degrees from a cosine wave. Values are in the range 0<=float<=360. One or three comma delimited values may be provided, one for each of the RGB channels. If only the one value is provided, the other two will be set to the same value. The default=0 (or 0,0,0) will produce a cosine wave. See http://www.imagemagick.org/Usage/transform/#function_sinusoid. In wavemap, we will add 90 degrees to the phase value so that the sinusoid will be shifted from a sine to a cosine wave as the default. With cycles=0.5, this produces a nearly linear transform. REQUIREMENT: IM version 6.4.8-9 or higher due to the use of -function sinusoid. 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 Image |
|
Arguments: -c 0.5 -p 0 (default) |
|
Arguments: -c 0.5 -p 30 |
|
Arguments: -c 0.7,0.5,0.5 -p 0 |
|
Arguments: -c 0.3,0.5,0.5 -p 0 |
|
Arguments: -c 0.5,0,0 -p 0 |
|
Arguments: -c 1 -p 0 |
What the script does is as follows:
This is equivalent to the following IM commands.
|