gd_info
(PHP 4 >= 4.3.0, PHP 5)
gd_info — Retrieve information about the currently installed GD library
Description
array gd_info
( void
)
Gets information about the version and capabilities of the installed GD library.
Return Values
Returns an associative array.
Attribute | Meaning |
---|---|
GD Version | string value describing the installed libgd version. |
FreeType Support | boolean value. TRUE
if FreeType Support is installed. |
FreeType Linkage | string value 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 | boolean value. TRUE
if T1Lib support is included. |
GIF Read Support | boolean value. TRUE
if support for reading GIF
images is included. |
GIF Create Support | boolean value. TRUE
if support for creating GIF
images is included. |
JPEG Support | boolean value. TRUE
if JPEG support is included. |
PNG Support | boolean value. TRUE
if PNG support is included. |
WBMP Support | boolean value. TRUE
if WBMP support is included. |
XBM Support | boolean value. TRUE
if XBM support is included. |
WebP Support | boolean value. TRUE
if WebP support is included. |
Note:
Previous to PHP 5.3.0, the JPEG Support attribute was named JPG Support.
Examples
Example #1 Using gd_info()
<?php
var_dump(gd_info());
?>
The above example will output something similar to:
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) ["JPEG Support"]=> bool(false) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XBM Support"]=> bool(false) }
Changelog
Version | Description |
---|---|
5.5.0 | WebP Support added. |
5.3.0 | JPG Support attribute renamed to JPEG Support. |
See Also
- imagepng() - Output a PNG image to either the browser or a file
- imagejpeg() - Output image to browser or file
- imagegif() - Output image to browser or file
- imagewbmp() - Output image to browser or file
- imagetypes() - Return the image types supported by this PHP build
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Обработка и генерация изображений
- Обработка изображений и GD
- gd_info
- getimagesize
- getimagesizefromstring
- image_type_to_extension
- image_type_to_mime_type
- image2wbmp
- imageaffine
- imageaffinematrixconcat
- imageaffinematrixget
- imagealphablending
- imageantialias
- imagearc
- imagechar
- imagecharup
- imagecolorallocate
- imagecolorallocatealpha
- imagecolorat
- imagecolorclosest
- imagecolorclosestalpha
- imagecolorclosesthwb
- imagecolordeallocate
- imagecolorexact
- imagecolorexactalpha
- imagecolormatch
- imagecolorresolve
- imagecolorresolvealpha
- imagecolorset
- imagecolorsforindex
- imagecolorstotal
- imagecolortransparent
- imageconvolution
- imagecopy
- imagecopymerge
- imagecopymergegray
- imagecopyresampled
- imagecopyresized
- imagecreate
- imagecreatefromgd2
- imagecreatefromgd2part
- imagecreatefromgd
- imagecreatefromgif
- imagecreatefromjpeg
- imagecreatefrompng
- imagecreatefromstring
- imagecreatefromwbmp
- imagecreatefromwebp
- imagecreatefromxbm
- imagecreatefromxpm
- imagecreatetruecolor
- imagecrop
- imagecropauto
- imagedashedline
- imagedestroy
- imageellipse
- imagefill
- imagefilledarc
- imagefilledellipse
- imagefilledpolygon
- imagefilledrectangle
- imagefilltoborder
- imagefilter
- imageflip
- imagefontheight
- imagefontwidth
- imageftbbox
- imagefttext
- imagegammacorrect
- imagegd2
- imagegd
- imagegif
- imagegrabscreen
- imagegrabwindow
- imageinterlace
- imageistruecolor
- imagejpeg
- imagelayereffect
- imageline
- imageloadfont
- imagepalettecopy
- imagepalettetotruecolor
- imagepng
- imagepolygon
- imagepsbbox
- imagepsencodefont
- imagepsextendfont
- imagepsfreefont
- imagepsloadfont
- imagepsslantfont
- imagepstext
- imagerectangle
- imagerotate
- imagesavealpha
- imagescale
- imagesetbrush
- imagesetinterpolation
- imagesetpixel
- imagesetstyle
- imagesetthickness
- imagesettile
- imagestring
- imagestringup
- imagesx
- imagesy
- imagetruecolortopalette
- imagettfbbox
- imagettftext
- imagetypes
- imagewbmp
- imagewebp
- imagexbm
- iptcembed
- iptcparse
- jpeg2wbmp
- png2wbmp
Коментарии
echo "<pre>".print_r(gd_info(), true)."</pre>";