Alternative glitter text example.
This one does NOT care about the number of images in the glitter tile
but requires a 'viewport' size that is larger than the text image size.
Code: Select all
convert -background none -strokewidth 2 \
-font Candice -pointsize 72 label:'Glitter Text' \
\
null: \
\( tile.gif -set option:distort:viewport 500x100 \
-virtual-pixel tile -distort SRT 0 \) \
-compose In -layers Composite \
\
null: \
-fill none -stroke black label:'Glitter Text' \
-compose Over -layers Composite \
\
-loop 0 -trim +repage \
-layers OptimizeFrame \
-layers OptimizeTransparency \
result.gif
NOTE if you know what type of background the text is going to be displayed on you can generate a better edge to the animation.
For example on a very light background (light shading edging)
Code: Select all
convert -background none -strokewidth 5 \
-font Candice -pointsize 72 label:'Glitter Text' \
\
null: \
\( tile.gif -set option:distort:viewport 500x100 \
-virtual-pixel tile -distort SRT 0 \) \
-compose In -layers Composite \
\
null: \
\( -background white -fill black -stroke black \
label:'Glitter Text' \
-fuzz 20% -transparent white \) \
-compose DstOver -layers Composite \
\
-loop 0 -trim +repage \
-layers OptimizeFrame \
-layers OptimizeTransparency \
gif:- | animate &
For a Gray background just replace the two 'white' arguments with 'gray'.
and so on for other backgrounds. (lightblue, cream, etc).
I hope from this, that you can see the beauty of the multi-image
-layers Composite operator. Now if we can get a composite tiling setting, we can make this even simpler!