PHP gd_info - 取得当前安装的 GD 库的信息

PHP 教程 · 2019-01-31 06:27:06

gd_info — 取得当前安装的 GD 库的信息。

语法

array gd_info ( void )

返回一个关联数组描述了安装的 GD 库的版本和性能。

实例

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

以上实例输出结果为:

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)
  ["JPG Support"]=>
  bool(false)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XBM Support"]=>
  bool(false)
}

返回结果说明:

属性 含义
GD Version string 值。描述了安装的 libgd 的版本。
Freetype Support boolean 值。如果安装了 Freetype 支持则为 TRUE
Freetype Linkage string 值。描述了 Freetype 连接的方法。取值可能为:'with freetype', 'with TTF library' 和 'with unknown library'。本单元仅在 Freetype Support 的值为 TRUE 时有定义。
T1Lib Support boolean 值。如果包含有 T1Lib 支持则为 TRUE
GIF Read Support boolean 值。如果包含有读取 GIF 图像的支持则为 TRUE
GIF Create Support boolean 值。如果包含有创建 GIF 图像的支持则为 TRUE
JPG Support boolean 值。如果包含有 JPG 支持则为 TRUE
PNG Support boolean 值。如果包含有 PNG 支持则为 TRUE
WBMP Support boolean 值。如果包含有 WBMP 支持则为 TRUE
XBM Support boolean 值。如果包含有 XBM 支持则为 TRUE

相关文章

  • imagepng() 以 PNG 格式将图像输出到浏览器或文件。
  • imagejpeg() 以 JPEG 格式将图像输出到浏览器或文件。
  • imagegif() 以 GIF 格式将图像输出到浏览器或文件。
  • imagewbmp() 以 WBMP 格式将图像输出到浏览器或文件。
  • imagetypes() 返回当前 PHP 版本所支持的图像类型。

点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Web Operations

Web Operations

John Allspaw、Jesse Robbins / O'Reilly Media / 2010-6-28 / USD 39.99

A web application involves many specialists, but it takes people in web ops to ensure that everything works together throughout an application's lifetime. It's the expertise you need when your start-u......一起来看看 《Web Operations》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

SHA 加密
SHA 加密

SHA 加密工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具