最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php gif图片加水印代码
时间:2022-06-24 21:09:45 编辑:袖梨 来源:一聚教程网
| 代码如下 | 复制代码 |
|
$imagedraw = new imagick(); $pixel = new imagickpixel('gray'); $pixel->setcolor('black'); $imagedraw->newimage(100, 75, $pixel); $draw = new imagickdraw(); $draw->setfont('bookman-demiitalic'); $draw->setfontsize(12); $image=new imagick(); $animation = new imagick(); $animation->setformat( "gif" ); $image->readimage("old.gif"); $unitl = $image->getimageindex(); $image->writeimages('animation.gif',false); $delay = $image->getimagedelay(); $filename = 'animation-'; for ($i=0; $i $thisimage = new imagick(); $thisimage->readimage($filename.$i.'.gif'); $thisimage->annotateimage($draw, 0, 12, 0, 'copyright by mpeg'); $animation->addimage($thisimage); $animation->setimagedelay($delay); } header("content-type: image/gif"); echo $animation->getimagesblob(); ?> |
|
imagemagick功能的php扩展。使用这个扩展可以使php具备和imagemagick相同的功能。 imagemagick是一套功能强大、稳定而且免费的工具集和开发包,可以用来读、写和处理超过185种基本格式的图片文件,包括流行的tiff, jpeg, gif, png, pdf以及photocd等格式。利用imagemagick,你可以根据web应用程序的需要动态生成图片, 还可以对一个(或一组)图片进行改变大小、旋转、锐化、减色或增加特效等操作,并将操作的结果以相同格式或其它格式保存。
组件下载地址
相关文章
- 致命公司铲子可攻击怪物类型汇总 12-05
- 星球重启20级头盔制作方法详解 12-05
- 星球重启分解废品任务完成方法 12-05
- 星球重启偶像任务攻略 偶像任务过法 12-05
- 星球重启9个酸液腺体获取攻略 12-05
- 星球重启采集工具制作方法 采集工具怎么做 12-05