前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >PHP图像函数之gd_info()

PHP图像函数之gd_info()

作者头像
申霖
发布2019-12-27 17:24:50
8650
发布2019-12-27 17:24:50
举报
文章被收录于专栏:小白程序猿小白程序猿

首先,PHP是最好的语言!

下面我们来说下PHP图像处理函数中的gd_info()函数。

timg (1).jpg
timg (1).jpg

gd_info() --取得当前安装的 GD 库的信息。

下面我们来实际输出一下(以THINKPHP5.0版本为例):

/**
 * PHP 图像函数
 */
public function imgClass()
{
    //取得当前安装的 GD 库的信息
    var_dump(gd_info());
}

返回结果是数组,共有12个序列,下面将一一介绍。

array (size=12)
  'GD Version' => string 'bundled (2.1.0 compatible)' (length=26)
  'FreeType Support' => boolean true
  'FreeType Linkage' => string 'with freetype' (length=13)
  'GIF Read Support' => boolean true
  'GIF Create Support' => boolean true
  'JPEG Support' => boolean true
  'PNG Support' => boolean true
  'WBMP Support' => boolean true
  'XPM Support' => boolean true
  'XBM Support' => boolean true
  'WebP Support' => boolean true
  'JIS-mapped Japanese Font Support' => boolean false

属性

含义

GD Version

安装的 libgd 的版本。

Freetype Support

如果安装了 Freetype 支持则为 TRUE。

Freetype Linkage

Freetype 连接的方法。取值可能为:'with   freetype', 'with TTF library' 和 'with unknown   library'。本单元仅在 Freetype Support 的值为 TRUE 时有定义。

GIF Read Support

如果包含有读取 GIF 图像的支持则为 TRUE。

GIF Create Support

如果包含有创建 GIF 图像的支持则为 TRUE。

JPG Support

如果包含有 JPG 支持则为 TRUE。

PNG Support

如果包含有 PNG 支持则为 TRUE。

WBMP Support

如果包含有 WBMP 支持则为 TRUE。

XPM Support

如果包含有 XPM 支持则为 TRUE。

XBM Support

如果包含有 XBM 支持则为 TRUE。

WebP  Support

如果包含有 WebP 支持则为 TRUE。

JIS-mapped Japanese Font Support

如果包含有 JIS-mapped Japanese Font Support 支持则为 TRUE。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-02-10,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档