PHP is indeed a simple language for operating images in PHP. PHP is so popular because it can implement functions with the simplest statements and discard too many complicated configurations, A few words can be used to implement functions that can be implemented by writing a bunch of JAVA; this is both a bit of a disadvantage, but in any case, PHP leads a trend that is simple, simple is all;
The easiest way to operate images in php is to add watermarks and texts to images;
1. add a watermark:
Imagejpeg ($ img, $ filename, qulity): this key method has three parameters: the first is the image object, the second is the image storage path, and the third is the image quality;
If it is displayed directly, enter only the first parameter. if it is saved as a file, enter the second parameter, such as D:/img/I .jpg, and save it;
2. Add text:
Imagefttext (resource $ image, float $ size, float $ angle, int $ x, int $ y, int $ col, string $ font_file, string $ text [, array $ extrainfo]): This function is the key
3. Generate the registration code: