making a starburst with transparent background

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jamadagni
Posts: 11
Joined: 2013-12-06T19:03:10-07:00
Authentication code: 6789

making a starburst with transparent background

Post by jamadagni »

Hello. I want to make the equivalent of the white/blue starburst seen at the bottom of the example page http://imagemagick.org/Usage/advanced/i ... ial_flares but with two conditions:
  1. the background must be transparent and not black unlike in the example
  2. as seen here the square border of the image should not be visible

As you can see (from the "here" link above) I have already seen the earlier thread asking how to use the radial flare as a mask. My question is however different. I want to use the starburst image itself but with a transparent background. I tried changing the black to none in the Usage page code to get the following:

Code: Select all

convert -size 512x1 xc: +noise Random -channel G -separate +channel \
        -size 512x511 xc:none -append -motion-blur 0x204-90 \
        \( -size 512x256 gradient:white-none -evaluate cos .5 -negate \
           -size 512x256 xc:none -append   -sigmoidal-contrast 3x100% \) \
        \( -size 1x256 xc:none  -size 1x1 xc:grey50  -size 1x255 xc:none \
           -append -blur 0x2 -scale 512x512\! \) \
                                            -scene 10 -write flare_%x.png \
        -background none -compose screen -flatten    -write flare_f.png \
        -virtual-pixel HorizontalTileEdge -distort Polar -1 -write flare_final_white.png \
        -fill SkyBlue -tint 100% flare_final_blue.png
but I'm only getting a sort of hazy white light within a blackish circle.

I also tried Fred's script as follows:

Code: Select all

./starburst.sh -s 512x512 -b none -f SkyBlue foo.png
but again I'm getting almost the equivalent of what I got with my above code but with blue tint i.o. white. I'd much appreciate any help in trying to achieve my objective. Thanks!

And while I'm at it, a huge thanks to Anthony for his examples!
Post Reply