(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
gd_info — Reunir información acerca de la biblioteca GD instalada actualmente
Obtiene información acerca de la versión y capacidades de la biblioteca GD instalada.
Devuelve un array asociativo.
| Atributo | Significado |
|---|---|
| GD Version | valor de tipo string que describe la versión de
libgd instalada. |
| FreeType Support | valor de tipo boolean. true
si está instalado el soporte para Freetype. |
| Freetype Linkage | valor de tipo string que describe la forma en la cual
Freetype fue vinculado. Los valores esperados son: 'with freetype',
'with TTF library' y 'with unknown library'. Este elemento sólo
estará definido si Freetype Support fue evaluado como
true. |
| T1Lib Support | valor de tipo boolean. true
si el soporte para T1Lib está incluido. |
| GIF Read Support | valor de tipo boolean. true
si el soporte para la lectura de imágenes GIF
está incluido. |
| GIF Create Support | valor de tipo boolean. true
si el soporte para la creación de imágenes GIF
está incluido. |
| JPEG Support | valor de tipo boolean. true
si el soporte para JPEG está incluido. |
| PNG Support | valor de tipo boolean. true
si el soporte para PNG está incluido. |
| WBMP Support | valor de tipo boolean. true
si el soporte para WBMP está incluido. |
| XBM Support | valor de tipo boolean. true
si el soporte para XBM está incluido. |
| WebP Support | Valor de tipo boolean. true
si el soporte para WebP está incluido. |
Nota:
Antes de PHP 5.3.0, el atributo
JPEG Supportse llamabaJPG Support.
Ejemplo #1 Empleo de gd_info()
<?php
var_dump(gd_info());
?>El resultado del ejemplo sería algo similar a:
array(10) {
["GD Version"]=>
string(24) "bundled (2.1.0 compatible)"
["FreeType Support"]=>
bool(false)
["T1Lib Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(false)
["JPEG Support"]=>
bool(false)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XBM Support"]=>
bool(false)
["WebP Support"]=>
bool(false)
}
| Versión | Descripción |
|---|---|
| 5.6.12 |
Se añadió WebP Support.
|
| 5.3.0 |
El atributo JPG Support se renombró a JPEG Support.
|