Fred's ImageMagick Scripts



    Licensing:

    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.

GLOW


Creates a glowing effect in an image.

Download Script

last modified: December 15, 2018



USAGE: glow [-a amount] [-s softening] infile outfile
USAGE: glow [-h or -help]

-a .... amount ......... glow amount; float; amount>=1; default=1.5
-s .... softening ...... softening; integer; soft>=0; default=0

PURPOSE: To create a glowing effect in an image.

DESCRIPTION: GLOW creates a glowing effect in an image by applying a gain factor (amount) and optionally a blurring (soft).

ARGUMENTS:

-a amount ... AMOUNT of glow expressed as a gain factor. Values floats greater than or equal to 1. A value of 1 produces no glow. Larger values increase the glow. Typical values are between 1 and 2. The default is 1.5.

-s softening ... SOFTENING creates a soft blurring effect to the glow. Values are integers greater than or equal to 0. A value of 0 produces no softening. Larger values increase the softening. Typical values are between 0 and 50. The default is 0.

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.


EXAMPLES


Image Glow
http://www.jhlabs.com/ip/blurring.html

Original

Arguments:
-a 1.3

Arguments:
-a 1.5

Arguments:
-a 1.7

Arguments:
-a 1.9



Image Glow With Softening
http://www.jhlabs.com/ip/blurring.html

Original

Arguments:
-a 1.7 -s 0

Arguments:
-a 1.7 -s 12

Arguments:
-a 1.7 -s 36

Arguments:
-a 1.7 -s 108



What the script does is as follows:

  • Applies a gain factor to the image and optionally blurs it
  • Adds that result to the original image

This is equivalent to the following IM commands

  • amount=`convert xc: -format "%[fx:$amount-1]" info:`
  • sigma=`convert xc: -format "%[fx:$soft/3]" info:`
  • convert $infile \( +clone -evaluate multiply $amount -blur 0x$sigma \) -compose plus -composite $outfile