note 98078 deleted from imagick.addimage by googleguy

From: Date: Tue, 22 Oct 2013 06:49:24 +0000
Subject: note 98078 deleted from imagick.addimage by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196659@lists.php.net to get a copy of this message
Note Submitter: fortruth at mabang dot net ---- to create an animation gif from filelist using addImage <?php $filelist = array("fileitem1.png","fileitem2.png","fileitem3.png"); $aniGif = new Imagick(); $aniGif->setFormat("gif"); foreach($filelist as $frameitem){ echo "-----------------------\n adding frame {$frameitem}\n"; $frame = new Imagick($frameitem); $aniGif->addImage($frame); //$delay time unit is micro second so 100 = 1s, one picture per second $aniGif->setImageDelay($delay = 100); echo "end of adding frame {$frameitem}\n"; } //there more than one file, so must be using writeImages() $aniGif->writeImages($fileTarget = "aniGif.gif", $adjoin = true); ?>

« previous php.notes (#196659) next »