Include class files first
Then instantiate the class:
$img = new Images;
Then provide the picture:
$img->imgpath(original image path and name, watermark image path and name);
Start adding watermark after:
$img->send();
illustrate:
send( strimg filename ) This method has a function that can be omitted. In the case of omission, the path and name of the saved image will be the same as the original one. If you need to save it as an exception image, provide the image to be saved here. Path and name
Exception, there is another method, show(); This method is used to display watermarked pictures
This method can be called individually, but the send() method must be called first, or it can be called continuously: $img->send()->show();
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
24 Jun 2016
Add watermarks to pictures uploaded to Baidu UEDITOR editor
12 Jul 2016
How to add watermark to images in PHP. Implementation method of adding watermark to PHP images. This article describes the implementation method of adding watermark to PHP images. Share it with everyone for your reference, the details are as follows: phpecho img_water_mark("2008112023204423477
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...
![How to Add Watermarks to Images Using PHP?](https://img.php.cn/upload/article/001/246/273/172923132442073.jpg)
18 Oct 2024
How to Watermark Images Using PHPProblem:Users need to upload images to a website and have a watermark (logo) added to them. The watermark should be placed prominently, such as in a corner where it will be visible.Solution:To add a watermark to image
12 Jul 2016
PHP uses the Mysqli class library to achieve perfect paging effects, the mysqli class library. How PHP uses the Mysqli class library to achieve perfect paging effects, mysqli class library This article describes how PHP uses the Mysqli class library to achieve perfect paging effects. Share it with everyone for your reference.
![How to Redefine Class Methods in PHP Without Inheritance?](https://img.php.cn/upload/article/001/246/273/173120442347571.jpg)
10 Nov 2024
Redefining Class Methods Without InheritanceYou want to redefine a method in a third-party library without modifying the library itself. This can...
![](/static/imghw/down_right.png)
![](/static/imghw/taglogo.png)
Hot Tools
PHP multifunctional image processing class
PHP multifunctional image processing class
PHP library for creating animated GIFs
PHP library for creating animated GIFs
![](/static/imghw/taglogo.png)