Page 1 of 1
Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T16:24:59-07:00
by mikebikeboy
Hi Everyone
I'm new here. I have been given the task of stitching 3 animated gifs together, all side-by-side. Is this possible with Imagemagick? The original images would live on a webserver and the final rendering would live on the webserver as well. PHP would be the scripting language.
Any help appreciated. I thought I'd ask before investing more time in looking for a solution.
Thanks!!!
mikebikeboy
Re: Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T16:31:30-07:00
by GreenKoopa
This is possible with IM. Do the animations have the same number and timing of their frames?
Animation Basics:
http://www.imagemagick.org/Usage/anim_basics/
PHP interfaces:
http://imagemagick.org/script/api.php#php
Re: Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T16:32:25-07:00
by mikebikeboy
If it's necessary, they can have the same timing and # of frames.
Re: Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T16:41:19-07:00
by mikebikeboy
Hey, thanks for the info! I'm looking throught PHP documentation and it appears to have the methods I need. I should have looked there before posting, but I was at the end of my rope, I've been searching for a solution to this all day. Thanks again.
Re: Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T16:44:19-07:00
by GreenKoopa
Fair enough to ask if something is possible or for direction to further reading. I don't have much experience with animations, so I can't offer much more anyway. That said, stitching two animations together must mean stitching frames together. Each merged frame would have a single color table, timing, disposal method, etc. If these already match, this is an easy project. The more these are mismatched, the harder this is using any tool.
Re: Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T16:51:00-07:00
by mikebikeboy
The animated gifs will be randomly nominated, and most likely will have completely different color tables. I will be able to control the timing of the frames though.
I'm just wondering if the method "Imagick::appendImages" is going to handle animated gifs or if it only works for regular images...If anybody knows, please let me know.. Otherwise, I'm on my way to find out and will post the results.
Re: Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T18:11:38-07:00
by fmw42
see
http://www.imagemagick.org/Usage/anim_mods/#append
However, if the two animations have different colormaps, you may need to process each frame to contain only the colors you want.
see -remap
http://www.imagemagick.org/Usage/quantize/#remap
http://www.imagemagick.org/Usage/video/ (this example should be using -remap and not the older -map)
Re: Stitch two (2) animated gifs together, side by side
Posted: 2013-05-08T18:30:52-07:00
by anthony
See...
IM examples, Animation Modifications, Side by Side Appending (time synced)
http://www.imagemagick.org/Usage/anim_mods/#append
This goes thru 3 different ways you can append the images together.
Later examples goes into time synchronizing, and layering of animations