English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

Usage and examples of PHP gd_info

PHP Image Processing

gd_info — Get information about the currently installed GD library.

Syntax

array gd_info ( void )

Returns an associative array describing the version and performance of the installed GD library.

Example

<?php
var_dump(gd_info());
?>

The example output is as follows:

array(9) {
  ["GD Version"]=>
  string(24) "bundled (2".0 compatible)"
  ["FreeType Support"]=>
  bool(false)
  ["T1Lib Support"]=>
  bool(false)
  ["GIF Read Support"]=>
  bool(true)
  ["GIF Create Support"]=>
  bool(false)
  ["JPG Support"]=>
  bool(false)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XBM Support"]=>
  bool(false)
}

Return result description:

Attribute Meaning
GD Version String value. Describes the version of libgd installed.
Freetype Support Boolean value. If Freetype support is installed, it is TRUE.
Freetype Linkage String value. Describes the method of Freetype linkage. Possible values are:39;with freetype39;, 'with TTF library39; and39;with unknown library39;. This unit is only available in The value of Freetype Support is TRUE is defined at the time.
T1Lib Support Boolean value. If support for T1Lib Support TRUE.
GIF Read Support Boolean value. If support for reading GIF images is included, it is TRUE.
GIF Create Support Boolean value. If support for creating GIF images is included, it is TRUE.
JPG Support Boolean value. If JPG support is included, it is TRUE.
PNG Support Boolean value. If PNG support is included, it is TRUE.
WBMP Support Boolean value. If WBMP support is included, it is TRUE.
XBM Support Boolean value. If XBM support is included, it is TRUE.

Related Articles

  • imagepng() Output the image in PNG format to the browser or file.
  • imagejpeg() Output the image in JPEG format to the browser or file.
  • imagegif() Output the image in GIF format to the browser or file.
  • imagewbmp() Output the image in WBMP format to the browser or file.
  • imagetypes() Return the image types supported by the current PHP version.

PHP Image Processing