Combine a animated GIF with a static PNG
Posted: 2011-09-25T03:12:35-07:00
Hi folks,
i tried a whole day now for my problem and googling my hands off but couldnt find a real solution for my problem:
I have an animated gif and a static PNG. The static PNG should get the "background" of the animated GIF (the animated GIF also has a transparency).
I tried things like:
but i get an image with the animated GIF visible only or a static pic where with one of the first frames of the animated GIF + the static PNG as background.. but not animated.
Any hints would be great..
Thanks in advance
i tried a whole day now for my problem and googling my hands off but couldnt find a real solution for my problem:
I have an animated gif and a static PNG. The static PNG should get the "background" of the animated GIF (the animated GIF also has a transparency).
I tried things like:
Code: Select all
$a = new Imagick('../a.gif');
$b = new Imagick('../b.png');
$b->compositeimage($a, imagick::COMPOSITE_MULTIPLY, 0, 0);
$b->writeimages('../img/test.gif', true);
$a->compositeimage($b, imagick::COMPOSITE_MULTIPLY, 0,0 );
$a->writeimages('../img/test2.gif', TRUE);
Any hints would be great..
Thanks in advance