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 a cartoon effect to an image. |
last modified: December 16, 2018
USAGE: toon [-m method] [-g gain] [-b blur] [-s saturation] [-B brightness] [-S smoothing] infile outfile
-m ... method ....... method=1 or 2; default=1 PURPOSE: To apply a cartoon-like effect to an image. DESCRIPTION: EDGEFX applies a cartoon-like effect to an image. ARGUMENTS: -g gain ... GAIN is the edge gain (i.e. strength or intensity). Values are floats>=0. The default=5. -m method ... METHOD. The choices are: 1 or 2. The default=1. -c compose ... optional COMPOSE type for method=1. The choices are: overlay, multiply, bumpmap, hardlight, softlight, pegtoplight, pinlight, linearlight, vividlight, linearburn, colorburn. The default is no compose. -b blur ... BLUR amount for method=2. Values are floats>=0. The default=5. -s saturation ... color SATURATION. Values are integers>=0. The default=100 (no change). 0 is grayscale and 200 is twice the saturation -B brightness ... BRIGHTNESS. Values are integers>=0. The default=100 (no change). -S smoothing ... SMOOTHING. Values are 0<=integer<=100. The default=0 for method=1 and the default=30 for method=2. REQUIREMENTS: IM 6.6.2.2 due to the use of rotated kernels in -morphology convolve. 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 -- Variation in Method |
|
Original |
|
Arguments: |
Arguments: |
Example 2 -- Variation in Method |
|
Original |
|
Arguments: |
Arguments: |
Example 3 -- Variation in Method |
Original |
Arguments: |
Arguments: |
Example 4 -- Variation in Smoothing for Method 1 |
||
Original |
||
Arguments: |
Arguments: |
Arguments: |
Example 5 -- Variation in Smoothing for Method 2 |
||
Original |
||
Arguments: |
Arguments: |
Arguments: |
Example 6 -- Variation in Compose for Method 1 |
|
Original |
|
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows for method 1:
This is equivalent to the following IM commands
|