Ⅰ 怎么给php 网站视频添加水印
通过php调用ffmpeg命令加水印!
Ⅱ php如何实现水印平铺
代码如下:
imagick代码:
<?php
$image = new imagick('logo.jpg');
$im = new imagick();
$im->newimage( 140, 80, new imagickpixel( "none" ) );
$draw = new imagickdraw();
$draw->setfillcolor(new imagickpixel( "grey" ));
$draw->setgravity(imagick::gravity_northwest);
$draw->annotation(10,10 ,'right');
$draw->setgravity(imagick::gravity_southeast);
$draw->annotation(5,15 ,'right');
$im->drawimage( $draw);
$image = $image->textureimage($im);
$image->compositeimage($image,imagick::composite_,0,0);
header( "content-type: image/{$image->getimageformat()}" );
$image->writeimage('wmark_text_tiled.jpg');
$image->clear();
$image->destroy();
?>
Ⅲ thinkphp 文字水印 怎么调透明度
可以支持水印图片的透明度(0~100,默认值是80),例如:
$image=newThinkImage();
//在图片左上角添加水印(水印文件位于./logo.png)水印图片的透明度为50并保存为water.jpg
$image->open('./1.jpg')->water('./logo.png',ThinkImage::IMAGE_WATER_NORTHWEST,50)->save("water.jpg");