Chapter 4 process images. Learning points: 1. Creating Images 2. simple small cases in PHP5, it is much easier to process dynamic images than before. PHP5 contains the GD extension package in the php. ini file. you only need to remove the GD extension.
Learning points:
1. create an image
2. simple small cases
In PHP5, processing of dynamic images is much easier than before. PHP5 contains GD extension in the php. ini file
Expand the package. you only need to remove the corresponding comments of the GD extension package to use it normally. The GD library contained in PHP5 is upgraded.
GD2 Library, which contains some useful JPG functions that support true color image processing.
Generally, generated images are stored in the PHP document format. However, you can insert HTML images to SRC.
To directly obtain dynamic images. For example, verification code, watermark, and thumbnail.
1. create an image
General process for creating images:
1) set the header to tell the browser the MIME type you want to generate.
2) create an image region based on which operations will be performed in the future.
3) fill the background in the blank image area.
4) draw the input text of the graphic outline on the background.
5). output the final image.
6) clear all resources.
7). call images on other pages.
Set the header to specify the MIME output type
Create a blank image area
Fill background in blank image area
Draw a graphical outline input text on the background
Output final image
Clear all resources
Images created by calling other pages
II. simple small cases
Simple verification code
Load existing images
Load existing system fonts
Image thumbnail
Note: This article is a video tutorial from Li Yanhui PHP. This article is intended for communication purposes only and cannot be used for commercial purposes. Otherwise, the consequences will be borne by you.
Step 1. Create Images 2. simple small cases in PHP5, it is much easier to process dynamic images than before. PHP5 contains the GD extension package in the php. ini file. you only need to remove the GD extension...