## STARBURST

 Applies a starburst pattern to an image.

### EXAMPLES

 No Input Image --- Variation In Radius Arguments: -s 100x100 -n 100 -r 25 Arguments: -s 100x100 -n 100 -r 33 Arguments: -s 100x100 -n 100 -r 45

 No Input Image --- Variation In Glow Arguments: -s 100x100 -n 100 -r 33 -g 25 Arguments: -s 100x100 -n 100 -r 33 -g 50 Arguments: -s 100x100 -n 100 -r 33 -g 75

 No Input Image --- Variation In Contrast Arguments: -s 100x100 -n 100 -r 33 -g 50 -c -20 Arguments: -s 100x100 -n 100 -r 33 -g 50 -c 0 Arguments: -s 100x100 -n 100 -r 33 -g 50 -c 20 Arguments: -s 100x100 -n 100 -r 33 -g 50 -c 40

 No Input Image --- Variation In Colors Arguments: Tint : -s 100x100 -n 100 -t lightblue Arguments: Foreground: -s 100x100 -n 100 -f lightblue Arguments: Tint And Foreground: -s 100x100 -n 100 -t lightblue -f lightblue Arguments: Background: -s 100x100 -n 100 -b blue Arguments: Foreground And Background: -s 100x100 -n 100 -f red -b blue

 No Input Image --- Variation In Angle Arguments: Animation -- Increment Angle 30 deg -s 100x100 -n 100 -a 0 to -s 100x100 -n 100 -a 330

 Starburst On Background Image http://www.jhlabs.com/ip/filters/SparkleFilter.html Original Arguments: (default) Arguments: Tint And Foreground: -t white -f pink

 Starburst On Background Image -- Variation In Tint And Foreground Color Original Arguments: Tint: -t yellow Arguments: Foreground: -f yellow Arguments: Tint And Foreground: -t yellow -f yellow

 What the script does is as follows: Creates starburst pattern as follows: create random values in a 1 row image roll as needed for rotation angle and add foreground and/or background color append remaining rows of background color and motion-blur vertically create central glow taper mask, where taper has shape of cosine raised to 1.5 power use -compose screen so that will only brighten and not darken convert from polar back to rectangular coords Apply starburst to background color or to input image This is equivalent to the following IM commands. if [ "\$infile" != "" ]; then ww=`convert \$tmpA -ping -format "%[fx:w]" info:` hh=`convert \$tmpA -ping -format "%[fx:h]" info:` else ww=\$width hh=\$height fi ww=`convert \$infile -format "%[fx:w]" info:` hh=`convert \$infile -format "%[fx:h]" info:` mwh=`convert xc: -format "%[fx:min(\$ww,\$hh)]" info:` mwh1=`convert xc: -format "%[fx:\$mwh-1]" info:` glow1=`convert xc: -format "%[fx:4*\$rad*\$glow/100]" info:` roll=`convert xc: -format "%[fx:\$ww*(360-\$angle)/360]" info:` test=`convert xc: -format "%[fx:\$contrast<0?0:1]" info:` if [ \$test -eq 0 ]; then loval=`convert xc: -format "%[fx:abs(\$contrast)]" info:` hival=100 else loval=0 hival=`convert xc: -format "%[fx:100-\$contrast]" info:` fi if [ "\$center" = "" ]; then cx=`convert xc: -format "%[fx:0.5*(\$ww-1)]" info:` cy=`convert xc: -format "%[fx:0.5*(\$hh-1)]" info:` fi ox=`convert xc: -format "%[fx:floor(\$cx-0.5*(\$mwh-1))]" info:` oy=`convert xc: -format "%[fx:floor(\$cy-0.5*(\$mwh-1))]" info:` if [ `echo "\$ox < 0" | bc` -eq 1 ]; then ox="\$ox" else ox="+\$ox" fi if [ `echo "\$oy < 0" | bc` -eq 1 ]; then oy="\$oy" else oy="+\$oy" fi if [ "\$tcolor" = "white" ]; then tint="" else tint="-fill \$tcolor -tint 100%" fi convert -size \${mwh}x1 xc: -seed \$newseed +noise Random -channel G -separate +channel \ -roll +\${roll}+0 +level-colors \$bcolor,\$fcolor \ -size \${mwh}x\${mwh1} xc:\$bcolor -append -motion-blur \${rad}x65535-90 \ \( -size \${mwh}x\${glow1} gradient:\$fcolor-\$bcolor -evaluate cos .5 -negate -evaluate pow 1.5 \) \ -compose screen -composite \ -distort Polar -1 \$tmp0 if [ "\$infile" = "" ]; then convert \( -size \${ww}x\${hh} xc:\$bcolor \) \ \( \$tmp0 -level \${loval},\${hival}% \$tint \) \ -geometry \${ox}\${oy} -composite \$outfile else convert \$infile \( \$tmp0 -level \${loval},\${hival}% \$tint \) \ -geometry \${ox}\${oy} -compose screen -composite \$outfile fi