I have an animated gif and I want to mask each frame of it then output an animated gif. I know I could separate the gif into individual frames, mask each frame and then put it back together, but just wondered if there's an easier way
Thanks
Masking an animated gif
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Masking an animated gif
In what way?
Just do a rectangular crop of the animation?
http://www.imagemagick.org/Usage/anim_m ... p_viewport
Or do you want to mask each frame using another image.
You can use the multi-image layers composition for this.
http://www.imagemagick.org/Usage/anim_mods/#composite
However unless you are willing to share an example animation and mask, we can not help you further.
Just do a rectangular crop of the animation?
http://www.imagemagick.org/Usage/anim_m ... p_viewport
Or do you want to mask each frame using another image.
You can use the multi-image layers composition for this.
http://www.imagemagick.org/Usage/anim_mods/#composite
However unless you are willing to share an example animation and mask, we can not help you further.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
Re: Masking an animated gif
So, I have this animated gif http://ubuntuone.com/p/RuN/ and I want to mask it using this image http://ubuntuone.com/p/RuK/ so that it looks a little like this, only animated. Is there a way to do this without having to separate the animated gif into individual frames?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Masking an animated gif
Your original animation has no timing delays!
however this does the job
the "null:" image is important to mark the end of one sequence of images and the second compose image.
however this does the job
Code: Select all
convert drink.gif -coalesce null: mask.jpg \
-compose CopyOpacity -layers composite \
drink_masked.gif
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309