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 softfocus effect to an image. |
last modified: December 15, 2018
USAGE: softfocus [-m mix] [-b bluramt1] [-B bluramt2] [-o opacity1] [-O opacity2] [-c coords] [-r radius] infile outfile
-m ... mix ......... mix percent between compose softlight and compose over PURPOSE: To apply a softfocus effect to an image. DESCRIPTION: SOFTFOCUS appliesa softfocus effect to an image. This will be a blend of two methods. One used -compose softlight and the other uses -compose over. The latter applies a ramped blur and allows a center region with no blur. ARGUMENTS: -m mix ... MIX is the mix percent between compose softlight and compose over methods. Mix=0 is -compose softlight and mix=100 is -compose over. Values are integers between 0 and 100. The default=50 (equal blend of the two methods). -b bluramt1 ... BLURAMT1 is the blur amount when using the compose softlight method. Values are floats>=0. The default=4. -B bluramt2 ... BLURAMT2 is the blur amount when using the compose over method. Values are floats>=0. The default is automatically computed from the image size. -o opacity1 ... OPACITY1 is the opacity amount when using the compose softlight method. Values are integers between 0 and 100. The default=50. -O opacity2 ... OPACITY2 is the opacity amount when using the compose over method. Values are integers between 0 and 100. The default=50. -c coords ... COORDS are the x,y center coordinates for the no blur region when using the compose over method. Values are integers>=0. The default is the image center. -r radius ... RADIUS is the percent of the minimum distance between the specified coords and the edges of image. This radius computes the size of the no blur center region when the method is over. Values are integers between 0 and 100. The default=25. When no coords are specified the ramped blur will have an elliptical shape if the image is not square; otherwise, it will be a circle. It will always be a circle, if coords are specified. 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 -- Equal Blend of Compose Softlight and Compose Over |
|
Original | |
Arguments: |
Arguments: |
Example 2 -- Variation In Opacity For Compose Softlight |
|
Original | |
Arguments: |
Arguments: |
Example 2 -- Variation In Opacity For Compose Over |
|
Original | |
Arguments: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands for dim specified as percent:
|