最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 给GIF 缩略图实例代码
时间:2010-02-01 编辑:简简单单 来源:一聚教程网
try
{
/*** Read in the animated gif ***/
$animation = new Imagick("animation.gif");
/*** Loop through the frames ***/
foreach ($animation as $frame)
{
/*** Thumbnail each frame ***/
$frame->thumbnailImage(100, 100);
/*** Set virtual canvas size to 100x100 ***/
$frame->setImagePage(100, 100, 0, 0);
}
/*** Write image to disk. Notice writeImages instead of writeImage ***/
$animation->writeImages("animation_thumbnail.gif");
echo "Images written";
}
catch(Exception $e)
{
echo $e->getMessage();
}
?>
-
上一个: php 利用GD创建缩略图
-
下一个: php 一行行读取文本文件
相关文章
- php 创建缩略图实例教程 02-22
- PHP导出数据超时的优化建议解读 10-31
- PHP之mysql位运算解析 10-31
- Laravel实现登录跳转功能解析 10-31
- php双向队列解读 10-31
- Laravel异常上下文解决教程 10-24