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 circular halo to an image. |
last modified: December 15, 2018
USAGE: halo [-r radius] [-w width] [-c center] [-o opacity] [-k contrast] [-m mixture] [-b basecolor] [-s saturation] [-a angle] [-d density] [-n newseed] [-f feather] infile outfile
-r .... radius ........... radius from center point to beginning of halo; PURPOSE: To apply a circular halo to an image. DESCRIPTION: HALO applies a circular halo of given center, inner radius and width to outer radius. The user can also control the coloring of the halo, its striation contrast, its overall transparency and saturation and rotation of the halo striation pattern. ARGUMENTS: -r radius ... RADIUS is the radius from center point to beginning of halo. Values are integers>=0. The default is one quarter of the minimum dimension of the image. -w width ... WIDTH is the distance of halo to outer radius. Values are integers>0. The default is one quarter of the minimum dimension of the image. Note: the halo will start to fade out for widths less than or equal to the feather amount. -c center ... CENTER=cx,cy are the comma separated coordinates in the image determining the center of the halo. Values are integers>=0. The default is the center of the image. -o opacity ... OPACITY is the opacity of the halo. Values are integers, such that 0<=opacity<=100. An opacity=100 is fully opaque. An opacity=0 if fully transparent. The default=40. -k contrast ... CONTRAST is the contrast of the halo striations. Values are integers, such that 0<=contrast<=100. A contrast=0 is no striations. A contrast=100 is fully transparent gaps between striations. The default=50. -m mixture ... MIXTURE is the halo mixture of primary colors from the base color. Values are integers such that 0<=mixture<=100. A mixture=0 is full separation of primary colors. A mixture=100 is full overlap of primary colors causing a solid halo color of the basecolor. A mixture=25 is a nice even full rainbow halo. The default=65 is a non-rainbow halo of subdued colors. -b basecolor ... BASECOLOR is the base color for the halo from which its primary colors will be extracted. Any valid IM color is allowed, but should not have zero percent of either red, green or blue primary components. The default="rgb(100%,90%,80%)". See http://imagemagick.org/script/color.php -s saturation ... SATURATION is the saturation of the halo colors. Values are integer such that 0<=saturation<=100. The default=100. -a angle ... ANGLE is the clockwise rotation angle for the halo striation pattern. Values are integers such that 0<=angle<=360. The default=0. -d density ... DENSITY is the density of random striation pattern in the halo. Values are integers such that 0<=density<=100. Larger values have smaller gaps between striations and smaller values have larger gaps between striations. Thus at contrast=100 and density=0, there is no halo (i.e, fully transparent). And at contrast=100 and density=100 there is a solid halo with no striations. The default=40. -n newseed ... NEWSEED is the seed value for the random striations. Values are integers>0. The default=100. -f feather ... FEATHER is the feathering or blurring distance at the inner and outer halo radii. Values are integer>=0; The default=10. NOTE: Requires IM 6.4.2-8 or higher due to the use of -distort polar/depolar. 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 |
||
Original |
||
![]() |
||
Arguments: |
Arguments: |
Animation |
![]() |
![]() |
![]() |
Example 2 |
|
Original |
|
![]() |
|
Arguments: |
Arguments: |
![]() |
![]() |
Gray Background --- Variation In Opacity |
|||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
![]() |
![]() |
![]() |
![]() |
Gray Background --- Variation In Striation Contrast |
||
Arguments: |
Arguments: |
Arguments: |
![]() |
![]() |
![]() |
Gray Background --- Variation In Color Mixture |
|||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
![]() |
![]() |
![]() |
![]() |
What the script does is as follows:
This is equivalent to the following IM commands
|