If you want to use PHP to add background tile watermark effect to the image, you must use a PHP plug-in to the instance, that is, using Imagick, he can add background tile watermark Effect Oh, below we provide an example code.
If you want to use PHP tutorial to add background tile watermark effect to the picture, you must use a PHP plugin to instance, that is, using Imagick, he can add background tile watermark effect Oh, below we provide an example code.
Imagemagic official removal of the command line mode of the picture background:
Convert-size 140x80 xc:none-fill grey-gravity northwest-draw "text 10,10 ' copyright '"-gravity sou Theast-draw "text 5,15 ' copyright '" miff:-| Composite-tile-logo.jpg wmark_text_tiled.jpg
Imagick Code:
<?php
$image = new Imagick (' logo.jpg ');
$im = new Imagick ();
$im->newimage ("None") (Imagickpixel, new);
$draw = new Imagickdraw ();
$draw->setfillcolor (New Imagickpixel ("Grey"));
$draw->setgravity (imagick::gravity_northwest);
$draw->annotation (10,10, ' copyright ');
$draw->setgravity (imagick::gravity_southeast);
$draw->annotation (5,15, ' copyright ');
$im->drawimage ($draw);
$image = $image->textureimage ($im);
$image->compositeimage ($image, imagick::composite_copy,0,0);
Header ("content-type:image/{$image->getimageformat ()}");
$image->writeimage (' wmark_text_tiled.jpg ');
$image->clear ();
$image->destroy ();
?>
If your model has not been installed Php_imagick download it, as follows
Http://pecl.php.net/package/imagick
PHP Add background Tile watermark code to Picture