0

I have some JPEG files and I want to create a GIF animation with them. However this code doesn't work. Can you see what the problem is?

// animation $animation = new Imagick(); $animation->setFormat("GIF"); // frames foreach($tmpJpegPath as $jpepPath) { $frame = new Imagick($jpepPath); $frame->thumbnailImage(176, 144); $animation->addImage($frame); $animation->setImageDelay(100); $animation->nextImage(); } // save gif animation $animation->writeImages('./animation.gif', true); 
4
  • 1
    Sure it has jpeg support built in out of the box? How exactly does it "not work"? Errors? Commented Dec 21, 2012 at 21:38
  • @ficuscr if your mean is $jpepPath is a path for my jpeg files. thats right. Commented Dec 21, 2012 at 21:40
  • problem solved ... imagick must be >= 3.1.0RC1 Commented Dec 21, 2012 at 22:10
  • @sweb, please post that as an actual answer, then mark it as accepted. This will help future people that might encounter this problem. Commented Dec 22, 2012 at 5:20

2 Answers 2

2

problem solved ... imagick must be >= 3.1.0RC1

Sign up to request clarification or add additional context in comments.

1 Comment

Don't forget to tick this answer :)
1

I had same issue with latest php5-imagick package on debian wheezy.

My solution:

for sure we remove package

apt-get remove php5-imagick 

this is needed for next step

apt-get install libmagickwand-dev 

install imagick from pecl

pecl install imagick echo "extension=imagick.so" >> /path/to/your/php.ini 

done

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.