gd_info

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

gd_infoDevuelve información sobre la biblioteca GD instalada

Descripción

gd_info(): array

Devuelve información sobre la biblioteca GD instalada.

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

Devuelve un array asociativo.

Elementos del array devueltos por gd_info()
Atributo Significado
GD Version string que describe la versión de libgd que está instalada.
FreeType Support booleano. true si el soporte FreeType está instalado.
FreeType Linkage string que describe la forma en la que FreeType ha sido vinculado. Los valores esperados son: 'with freetype', 'with TTF library' y 'with unknown library'. Este elemento solo estará definido si FreeType Support es evaluado true.
GIF Read Support booleano. true si el soporte para la lectura de imágenes GIF está incluido.
GIF Create Support booleano. true si el soporte para la creación de imágenes GIF está incluido.
JPEG Support booleano. true si el soporte de JPEG está incluido.
PNG Support booleano. true si el soporte de PNG está incluido.
WBMP Support booleano. true si el soporte de WBMP está incluido.
XBM Support booleano. true si el soporte de XBM está incluido.
WebP Support Valor de tipo bool. true si el soporte WebP está incluido.
AVIF Support Valor de tipo bool. true si el soporte AVIF está incluido. Disponible a partir de PHP 8.1.0.

Ejemplos

Ejemplo #1 Ejemplo con gd_info()

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

Resultado del ejemplo anterior es similar a :

array(9) {
  ["GD Version"]=>
  string(24) "bundled (2.1.0 compatible)"
  ["FreeType 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)
  ["AVIF Support"]=>
  bool(false)
}

Ver también

  • imagepng() - Envía una imagen PNG a un navegador o a un fichero
  • imagejpeg() - Output image to browser or file
  • imagegif() - Output image to browser or file
  • imagewbmp() - Output image to browser or file
  • imagewebp() - Muestra una imagen WebP hacia un navegador o un fichero
  • imageavif() - Output image to browser or file
  • imagetypes() - Devuelve los tipos de imágenes soportados por la versión actual de PHP
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top