PHP 8.6.0 Beta 1 is available for testing

gd_info

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

gd_infoDevuelve información sobre la biblioteca GD instalada

Descripción

function 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 bool . 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 bool . true si el soporte para la lectura de imágenes GIF está incluido.
GIF Create Support bool . true si el soporte para la creación de imágenes GIF está incluido.
JPEG Support bool . true si el soporte de JPEG está incluido.
PNG Support bool . true si el soporte de PNG está incluido.
WBMP Support bool . true si el soporte de WBMP está incluido.
XBM Support bool . 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)
}

Véase también

  • imagepng() - Envía una imagen PNG a un navegador o a un fichero
  • imagejpeg() - Enviar la imagen al navegador o a un fichero
  • imagegif() - Enviar la imagen al navegador o a un fichero
  • imagewbmp() - Enviar la imagen al navegador o a un fichero
  • imagewebp() - Muestra una imagen WebP hacia un navegador o un fichero
  • imageavif() - Enviar la imagen al navegador o a un fichero
  • imagetypes() - Devuelve los tipos de imágenes soportados por la versión actual de PHP

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /