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

查看所有标签

Numerical Linear Algebra

Numerical Linear Algebra

Lloyd N. Trefethen、David Bau III / SIAM: Society for Industrial and Applied Mathematics / 1997-06-01 / USD 61.00

Numerical Linear Algebra is a concise, insightful, and elegant introduction to the field of numerical linear algebra.一起来看看 《Numerical Linear Algebra》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具