Home PHP Libraries Picture library Add text watermark to existing pictures php code class
Add text watermark to existing pictures php code class

Add text watermark to existing pictures php code class, This class library only supports text watermark for the time being, the location is the lower right corner, and the color is random.

Calling method:
1. Introduce the class library at the top of the file that needs to be watermarked:
include_once 'imageClass.php';
2. Declare a new class:
$tpl=new image_fu;
3. Provide parameters for the image watermark:
$tpl->img(picture path, watermark text, font path, font size, font angle);
For example: $tpl->img('abc.jpg','This is watermark text','ziti.ttf',30,0)

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

How to add a picture border to the picture and adapt the picture size_html/css_WEB-ITnose How to add a picture border to the picture and adapt the picture size_html/css_WEB-ITnose

24 Jun 2016

Please tell me how to add a picture border to the picture and adjust the picture size

[Emergency help] After the large picture obtains the small picture through coordinates, how to remove the border on the small picture? _html/css_WEB-ITnose [Emergency help] After the large picture obtains the small picture through coordinates, how to remove the border on the small picture? _html/css_WEB-ITnose

24 Jun 2016

[Emergency help] After the large picture obtains the small picture through coordinates, how to remove the border on the small picture?

CSS3 vertical mouse move to picture picture scrolling, graphic menu code_html/css_WEB-ITnose CSS3 vertical mouse move to picture picture scrolling, graphic menu code_html/css_WEB-ITnose

24 Jun 2016

CSS3 vertical mouse move to picture picture scrolling, graphic menu code

How to output multiple sizes of images in php How to output multiple sizes of images in php

06 Jul 2016

{Code...} The picture above is a picture with a width of 480 and a height of 270. Remove the suffix !w480h270 to access the original picture. Question: 1. How is this kind of picture usually stored on the server? Is it just the original picture? 2. Add the suffix !w480h270 to generate corresponding thumbnails. How thumbnails are generally stored...

When inserting a picture into td in html, why the picture cannot fill the entire td_html/css_WEB-ITnose When inserting a picture into td in html, why the picture cannot fill the entire td_html/css_WEB-ITnose

24 Jun 2016

When inserting a picture into a TD in HTML, why can’t the picture fill the entire TD?

Image display problem_html/css_WEB-ITnose Image display problem_html/css_WEB-ITnose

24 Jun 2016

Picture display problem

See all articles