Glitter text, can't get animation to work

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
metsfan666

Glitter text, can't get animation to work

Post by metsfan666 »

I'm working on writing text with glitter effects.

I am working off this command:

Code: Select all

convert -size 320x100 xc:lightblue -font arial -pointsize 72 -tile redglitter.gif -annotate +28+68 TEST font_tile.gif
This makes an image that says TEST on lightblue with a glitter effect but the problem is that it's not animating. I see only what appears to be the first frame of redglitter.gif. I've tried adding -loop 0 but that doesn't work.

I feel I am really close to this but can't get it. I know how to do it using the online imagemagick tool but i want to be able to do it through the command line. Any help would be much appreciated.

Thanks
metsfan666

Re: Glitter text, can't get animation to work

Post by metsfan666 »

I found a sample in the docs that almost does what I need.

Code: Select all

composite -compose Dst_in -gravity center wordtrans.gif image.gif -matte  out.gif
This will take my wordtrans.gif image which has a transparent background and takes image.gif to fill in the transparent parts. This is almost exactly what i want except for when i try to use an animated gif, glitter, it makes everything a solid block color. It's as if it just can't handle the animation.

Any ideas/suggestions?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Glitter text, can't get animation to work

Post by anthony »

Composite can only handle two images and an optional mask.

An animation is usually three or more images!!!! Of course it fails.

For animation composition see IM examples, Animation Modifications

A glitter specific animation has not been created yet... Contributions welcome.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
metsfan666

Re: Glitter text, can't get animation to work

Post by metsfan666 »

I figured the animation was the cause of the problem. After breaking up the animation into its sepcific frames, and "composite-ing" them one by one, i got it to work.


Thanks again
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Glitter text, can't get animation to work

Post by anthony »

You should not need to break up the animation to do it. Not with the new -layers composite operator now available.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply