What is a GD database? Introduction to loading the GD Library in PHP

Source: Internet
Author: User
Tags php development environment
First, we will introduce what is the GD library: the GD Library is an extension library for php to process graphics. the GD Library provides a series of APIs for processing images. the GD library can process images, or generate images. the GD Library is an open function library that dynamically creates images and exposes source code. it can be downloaded from the official website. Currently, the GD library supports GIF, PNG, JPEG, WBMP, XBM, and other image formats for image processing! What is a GD database? Introduction to loading the GD Library in PHP

What is a GD database?

First, we will introduce what is the GD library: the GD Library is an extension library for php to process graphics. the GD Library provides a series of APIs for processing images. the GD library can process images, or generate images. the GD Library is an open function library that dynamically creates images and exposes source code. it can be downloaded from the official website. Currently, the GD library supports GIF, PNG, JPEG, WBMP, XBM, and other image formats for image processing!

The GD Library is installed in PHP5 by default, but the GD library must be activated. You must set the php. ini file to remove the semicolon (;) before the "; extension = php_gd2.dll" option in the file. Save the modified file and restart the Apache server!

After successfully loading the GD2 function library, you can use the phpinfo () function to obtain the installation information of the GD2 function library, verify that the GD Library is successfully installed, and check whether GD support is available on the page, if not, install additional extensions.

There are two methods to verify the GD Library. The first method is to create a php file and output phpinfo () directly. the code is as follows:

 

The second method is to enter "127.0.0.1/phpinfo. php "and press the Enter key. The first method and the second method get the same result. if you find the GD Library installation information on the page, it means that the GD Library is successfully installed! For example:

Note:

1. if you use the integrated installation package to configure the PHP development environment, do not worry about this problem, because in the integrated installation package, the default GD2 function library has been loaded.

2. the GD library can be used in both Linux and Windows systems. the functions are identical, but the coordinates of the images are offset. If the two systems are transplanted to each other, you must re-view the interface.

We will introduce the GD library loaded in PHP. The next article will introduce the application of graphics and images, for more information, see create an image and color and fill the background color (PHP graphic image typical application tutorial 1).

What is the GD library above? Load the GD Library in PHP. For more information, see other related articles in the first PHP community!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.