Today, to learn about the use of the PD library in PHP to achieve the image Watermark text watermark method, do not need PS Oh!
First, prepare the footage
(1) Prepare a picture
(2) Prepare a watermark (preferably transparent, i.e. the background is a white bottom)
(3) Prepare a font (in the computer C:\Windows\Fonts location, where you can find a copy of your favorite)
(4) Put all the above 3 steps in one folder (in the WWW folder directory)
This is my preparation!
(5) Open the GD library function (in the php.ini file, remove the preceding semicolon, restart the server)
1. Create a new PHP file (imageziti.php)
2. Steps (Four steps for each method)
Small steps to open a picture
(1)
(2)
Meaning of the getimagesize () function
(3)
Meaning of the image_type_to_extension () function
(4)
(5)
Small steps to manipulate pictures
(1)
(2)
Meaning of the Imagecopymerge () function
(3)
(4)
Effect
(5)
Effect
(6)
Overall code
END
RELATED links:
Add a text watermark to the original picture: http://www.cnblogs.com/finalanddistance/p/7239583.html
PHP uses GD library to implement image watermark and thumbnail image--add image watermark to Image