What is the php extension gd

藏色散人
Release: 2023-03-13 17:52:02
Original
2955 people have browsed it

php gd is an extension library for processing graphics in php. The GD library provides a series of APIs for processing pictures. You can use the GD library to process pictures or generate pictures.

What is the php extension gd

The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer

What is the php extension gd?

GD library is an extension library for PHP to process graphics. The GD library provides a series of APIs for processing pictures. You can use the GD library to process pictures or generate pictures.

On the website, the GD library is usually used to generate thumbnails, or to add watermarks to pictures, or to generate Chinese character verification codes, or to generate reports on website data, etc. To process images in PHP, you can use the GD library. The GD library initially supported GIF. However, because GIF used the copyright-controversial LZW algorithm, it would cause legal issues, so starting from GD library version 1.6, all GIF support was moved. Except, but it was added back in GD library version 2.0.28. GIF related functions are not available when using an intermediate version of the GD library.

Installation and configuration

Edit

If it is a win server, it is relatively simple. The steps are as follows:

1. Use the dos command (you can also do it manually , copy all dll files in the dlls folder to the system32 directory) copy c:\php\dlls\*.dll c:\windows\system32\

2. Open php.ini

Set extension_dir = "c:/php/extensions/";

3. In the line ";extension=php_gd2.dll", remove the semicolon in front of extension. If there is no php_gd2.dll, php_gd.dll will also Same, make sure this file c:/php/extensions/php_gd2.dll.

Configuration method on Linux server:

yum install php-gd* #适用于32bit操作系统安装命令;
yum install php-gd.x86_64 #适用于64bit操作系统安装命令;
Copy after login

Recommended study: "PHP Video Tutorial

The above is the detailed content of What is the php extension gd. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template