21,886
社区成员
发帖
与我相关
我的任务
分享
$filelist = array(
'frames/1.gif',
'frames/2.gif',
'frames/3.gif',
'frames/4.gif',
'frames/5.gif',
'frames/6.gif',
'frames/7.gif'
);
$animation = new Imagick(); //create animation object
$animation->setFormat('gif'); // set file type
foreach ( $filelist as $file ){
$image = new Imagick();
$image->readImage( $file );
$unitl = $image->getNumberImages();
$animation->addImage( $image );
$animation->setImageDelay(40); //$image->getImageDelay()
unset( $image );
}
header( "Content-Type: image/gif" );
echo( $animation->getImagesBlob() );