Tuesday, November 19, 2024
Google search engine
HomeLanguagesPHP | gd_info() Function

PHP | gd_info() Function

The gd_info() function is an inbuilt function in PHP which is used to retrieve the information about the currently installed GD library. This function returns the information about the version and capabilities of the installed GD library.

Syntax:

array gd_info( void )

Parameters: This function does not accept any parameter.

Return Value: This function returns an associative array contains information about installed GD library.
The information returned by this function are listed below:

  • GD Version: It is an string value describing the installed libgd version.
  • FreeType Support: It is a boolean value. It is True if FreeType Support is installed.
  • FreeType Linkage: It is a string describing the way in which FreeType was linked. Expected values are: with freetype, with TTF library, and with unknown library. This element will only be defined if FreeType Support evaluated to TRUE.
  • T1Lib Support: It is a boolean value. It is True if T1Lib support is included.
  • GIF Read Support: It is boolean value. It return True if support for reading GIF images is included.
  • GIF Create Support: It is a boolean value. It return True if support for creating GIF images is included.
  • JPEG Support: It is a boolean value. It return True if JPEG support is included.
  • PNG Support: It is a boolean value. It return True if PNG support is included.
  • WBMP Support: It is a boolean value. It return True if WBMP support is included.
  • XBM Support: It is a boolean value. It return True if XBM support is included.
  • WebP Support: It is a boolean value. It return True if WebP support is included.

Below program illustrate the gd_info() function in PHP:

Program:




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


Output:

array(12) { 
    ["GD Version"]=> string(26) "bundled (2.1.0 compatible)" 
    ["FreeType Support"]=> bool(true) 
    ["FreeType Linkage"]=> string(13) "with freetype" 
    ["GIF Read Support"]=> bool(true) 
    ["GIF Create Support"]=> bool(true) 
    ["JPEG Support"]=> bool(true) 
    ["PNG Support"]=> bool(true) 
    ["WBMP Support"]=> bool(true) 
    ["XPM Support"]=> bool(true) 
    ["XBM Support"]=> bool(true) 
    ["WebP Support"]=> bool(true) 
    ["JIS-mapped Japanese Font Support"]=> bool(false) 
} 

Related Articles:

Reference: http://php.net/manual/en/function.gd-info.php

RELATED ARTICLES

Most Popular

Recent Comments