-
-
$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 ,'著作権');
- $draw->setGravity(imagick::GRAVITY_SOUTHEAST);
- $draw->annotation(5,15 ,'著作権'); p>
$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 ();
- ?>
-
复制代
出典图片:
効果図:
|