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 variable blur to an image based upon a mask image. |
last modified: December 16, 2018
USAGE: variableblur [-m maxblur] [-n numblurs] infile maskfile outfile
-m .... maxblur ....... maximum blur amount in pixels; integer>1; PURPOSE: To apply a variable blur to an image based upon a mask image. DESCRIPTION: VARIABLEBLUR applies a variable blur to an image based upon a mask image. The brighter the mask image the larger the blur. Limiting factors are determined by the user supplied parameters: maxblur and numblurs. This is most useful when the mask is a radial gradient. It then blurs around the main subject of the image. ARGUMENTS: -m maxblur ... MAXBLUR is the maximum amount of blur in pixels when the mask image is fully white. No blur is applied where the image is fully black. Values must be integers>1. Typical values are less than or equal to 32. The default is 16. -n numblurs ... NUMBLURS is the number of evenly spaced blur increments up to maxblur. Values are integers between 2 and maxblur-1. The default=maxblur-1. For improved performance with slight loss of quality when maxblur is large, use numblurs=maxblur/2. 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. |
Flower 1 |
||
Flower 1 |
Mask - Radial Gradient |
|
![]() |
![]() |
|
Arguments: |
Arguments: |
Arguments: |
![]() |
![]() |
![]() |
Zelda |
||
Flower 1 |
Mask - Exponentiated Radial Gradient |
|
![]() |
![]() |
|
Arguments: |
Arguments: |
Arguments: |
![]() |
![]() |
![]() |
Flower 2 |
||
Flower 2 |
Red Channel |
Mask - White Thresholded Red Channel |
![]() |
![]() |
![]() |
Arguments: |
Arguments: |
Arguments: |
![]() |
![]() |
![]() |
Flower 2 |
||
Flower 2 |
Red Channel |
Mask - Negated White Thresholded Red Channel |
![]() |
![]() |
![]() |
Arguments: |
Arguments: |
Arguments: |
![]() |
![]() |
![]() |
What the script does is as follows:
This is equivalent to the following IM commands
|