1
0
mirror of https://github.com/php/doc-zh.git synced 2026-03-24 07:02:15 +01:00
Files
archived-doc-zh/reference/image/setup.xml
2024-01-16 08:09:01 +08:00

154 lines
4.2 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9ba738103b63ee4f129dadf3f8585568609e63b7 Maintainer: yuanyuqiang Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<chapter xml:id="image.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<!-- {{{ Requirements -->
<section xml:id="image.requirements">
&reftitle.required;
<para>
如果拥有 <acronym>GD</acronym> 库(位于 <link
xlink:href="&url.gd;">&url.gd;</link>),还可以创建和处理图像。
</para>
<para>
可以处理的图像格式取决于安装的 <acronym>GD</acronym> 版本,以及
<acronym>GD</acronym> 可能需要访问这些图像格式的任何其他库。
<note>
<simpara>
需要 libgd-2.1.0 或更高版本。或者使用 PHP 中绑定的 <acronym>GD</acronym> 库。
</simpara>
</note>
<note>
<simpara>
<acronym>GD</acronym> 库需要 zlib &gt;= 1.2.0.4。
</simpara>
</note>
</para>
<para>
可能希望增强 <acronym>GD</acronym> 库以处理更多的图像格式。
<table>
<title>支持的图像格式</title>
<tgroup cols="3">
<thead>
<row>
<entry>图像格式</entry>
<entry>需要下载的库</entry>
<entry>备注</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>gif</literal></entry>
<entry></entry>
<entry></entry>
</row>
<row>
<entry><literal>avif</literal></entry>
<entry></entry>
<entry></entry>
</row>
<row>
<entry><literal>jpeg</literal></entry>
<entry><link xlink:href="&url.jpeg;">&url.jpeg;</link></entry>
<entry>
在编译 jpeg 时(编译 PHP 之前),必须在配置步骤使用 <option role="configure">--enable-shared</option>
选项。否则,当进入编译 PHP 的配置步骤时,会收到一条错误信息,说 <literal>libjpeg.(a|so) not found</literal>
</entry>
</row>
<row>
<entry><literal>png</literal></entry>
<entry><link xlink:href="&url.libpng;">&url.libpng;</link></entry>
<entry>
</entry>
</row>
<row>
<entry><literal>xpm</literal></entry>
<entry><link xlink:href="&url.libxpm;">&url.libxpm;</link></entry>
<entry>
如果你的系统中已经安装了 X-Environment就可能已经有了这个库。
</entry>
</row>
<row>
<entry><literal>webp</literal></entry>
<entry></entry>
<entry></entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<para>
希望增强 <acronym>GD</acronym> 以处理不同的字体。<link xlink:href="&url.freetype;">FreeType 2</link>
库支持。
</para>
</section>
<!-- }}} -->
<!-- {{{ Installation -->
&reference.image.configure;
<!-- }}} -->
<!-- {{{ Configuration -->
&reference.image.ini;
<!-- }}} -->
<!-- {{{ Resources -->
<section xml:id="image.resources">
&reftitle.resources;
<para>
本扩展定义了下列资源类型:
<table>
<title>GD 库中定义的资源类型列表</title>
<tgroup cols="3">
<thead>
<row>
<entry>名称</entry>
<entry>说明</entry>
<entry>备注</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>gd</literal></entry>
<entry>图像资源,由 <function>imagecreatefrompng</function> 等函数使用</entry>
<entry>PHP 8.0.0 之前</entry>
</row>
<row>
<entry><literal>gd font</literal></entry>
<entry><function>imageloadfont</function> 函数内部创建的字体资源</entry>
<entry>PHP 8.0.0 之前</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</section>
<!-- }}} -->
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->