search
HomePHP LibrariesPicture libraryPHP class to add watermark to images
PHP class to add watermark to images Share a php class that adds watermarks to images, supports watermark images, Calling method:
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();
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

Watermark PHP class used to add watermarks to imagesWatermark PHP class used to add watermarks to images

29Jul2016

Add watermark: Add watermark PHP class used to add watermark to pictures: Copy the code as follows:

PHP class to add watermark to imagesPHP class to add watermark to images

25Jul2016

PHP class to add watermark to images

PHP and GD library tutorial: How to add watermark to imagesPHP and GD library tutorial: How to add watermark to images

12Jul2023

PHP and GD library tutorial: How to add watermarks to images Introduction: In website development, we often encounter the need to add watermarks to images. Watermarks can play a role in image copyright protection, brand promotion, etc. This article will introduce how to add watermarks to images using PHP and the GD library. Introduction to GD library: GD library is a library for processing images in PHP. It provides a set of functions to create, edit and output images. To use the GD library, you need to ensure that PHP has the GD extension library installed. Add text watermark: Add text watermark to pictures

Use PHP code to add watermark to images, _PHP tutorialUse PHP code to add watermark to images, _PHP tutorial

13Jul2016

Use PHP code to add watermark to images. Use PHP code to add watermark to pictures. First find a picture, rename it face.jpeg, and create watermark.php: php /** * Created by PhpStorm. * User: Administrator * Date: 2015/6/29 * Time:

Add watermark to images using PHP code_PHP tutorialAdd watermark to images using PHP code_PHP tutorial

13Jul2016

Add watermark to images using PHP code. Use PHP code to add watermark to pictures. This article mainly introduces the relevant information about using PHP code to add watermarks to pictures. Friends who need it can refer to it. First find a picture, change its name to face.jpeg, and create

How to add watermark to images using Node.jsHow to add watermark to images using Node.js

04Feb2017

To use Node.js to add watermarks to images, you must first ensure that the node environment is installed locally. Then, we need to use a Node.js library for image editing operations: images. You can learn more about the specific details in this article

See all articles