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 Feb 2025
Protect your images with watermarks! This guide shows you how to add text and image-based watermarks to your photos on Windows 11 using various methods. Method 1: Using Paint for Text Watermarks The simplest way to add a text watermark is with Paint

21 Jun 2025
PHP's GD library supports image processing operations without additional dependencies. 1. Resize: Use imagecreatefromjpeg() to load the picture, create a new size canvas, scale and save it through imagecopyresampled(); 2. Crop: After loading the original image, create a new target size canvas and copy the specified area; 3. Add a watermark: Use imagettftext() to add text or use imagecopy() to overlay the transparent PNG logo. The basic functions are simple and effective, and other libraries can be considered for complex needs.

24 Jun 2016
Add watermarks to pictures uploaded to Baidu UEDITOR editor

11 Jul 2025
There are three main ways to add watermarks in Photoshop, namely text watermark, image watermark and batch processing. 1. When adding text watermarks, use the text tool to enter the content and adjust the font, size and color. It is recommended to set it to light gray or white translucent, with the opacity set to about 50%, and place it in the corner of the picture to avoid interference with the subject; 2. When using image watermarks, you need to prepare a transparent background image in PNG format. After dragging it into the document, you need to adjust the size, position and transparency, be careful not to block the main content; 3. Adding watermarks in batches can record the operation process of adding watermarks through the "action" function, and then automatically apply it to multiple files through the "batch" function. The key to improving efficiency is to prepare a unified watermark template in advance.

09 Jul 2025
The key to adding watermarks in PremierePro is position selection and parameter settings to ensure that the subject screen does not affect the clear logo. A common practice is to place the watermark in the lower right corner or the upper left corner to avoid the face or important content areas; it is recommended to choose a fixed position on the edge of the dynamic picture. The watermark size is generally controlled within 10% of the screen width. There are two main ways to add: 1. Import the image as a layer and adjust the position, size and transparency (PNG format is recommended); 2. Use the built-in watermark function in the export settings (applicable to later versions of 2022). Pay attention to details including using high-definition pictures, avoiding occlusion of important information, considering background light and dark contrast, and whether the export format supports Alpha channel, such as MOV format. The whole process is clear and suitable for beginners

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


Hot Tools

PHP multifunctional image processing class
PHP multifunctional image processing class

PHP library for creating animated GIFs
PHP library for creating animated GIFs
