I'm trying to blend a pattern onto an animtion
For a single frame, it works great,
composite -blend 50x50 frame.jpg pattern.jpg out.jpg
But, if I use an animated gif, it gets flattened.
I've looked into -layers Composite, but it just overlays it without any blending.
Is there anyway to blend an animation without having to disassemble the animation?
Blend Animation with image
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Blend Animation with image
IM works on individual images, not animations. An animation is always disassembled before processing.
Without seeing your images, advice is difficult, but:
1. You probably need "-layers coalesce" to make complete individual frames from the input animation.
2. You might want "-layers optimize" at the end.
3. To composite an individual image with each of the animation frames, you probably want a "NULL:" between the frames and image, then "-layers composite".
4. To get a compose other than the default "over", you need a "-compose something".
See http://www.imagemagick.org/script/comma ... php#layers
See also the animation pages linked from http://www.imagemagick.org/Usage/
Without seeing your images, advice is difficult, but:
1. You probably need "-layers coalesce" to make complete individual frames from the input animation.
2. You might want "-layers optimize" at the end.
3. To composite an individual image with each of the animation frames, you probably want a "NULL:" between the frames and image, then "-layers composite".
4. To get a compose other than the default "over", you need a "-compose something".
See http://www.imagemagick.org/script/comma ... php#layers
See also the animation pages linked from http://www.imagemagick.org/Usage/
snibgo's IM pages: im.snibgo.com
Re: Blend Animation with image
Is there a compose operator that does blending? I've studied all the examples. NONE of the animation examples involve blending.
I'm trying to make a generic function here that works for any animation, so deconstructing the animation is problematic.
Maybe there is a script here that efficiently deconstructs an animation, acts on each frame, then reassembles the animation?
(frame timing, looping, offsets need to be maintained)
I'm trying to make a generic function here that works for any animation, so deconstructing the animation is problematic.
Maybe there is a script here that efficiently deconstructs an animation, acts on each frame, then reassembles the animation?
(frame timing, looping, offsets need to be maintained)
Re: Blend Animation with image
Some operators work fine with animations, some do not.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Blend Animation with image
Best I can suggest is to use -coalesce. Also see http://www.imagemagick.org/Usage/anim_mods/#composite
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Blend Animation with image
"convert -list compose" lists the available compose options. Near the top, you should find "Blend". Use it with, for example, "-define compose:args=25" for a 25% blend.dognose wrote:Is there a compose operator that does blending?
snibgo's IM pages: im.snibgo.com