Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion reference/image/functions/getimagesize.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 89ae180a851621c308f0ea4604ff2e919aa57a7f Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: f8d1e172bd6d11986f0dfeb11756b90c039a39bc Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.getimagesize">
<refnamediv>
Expand Down Expand Up @@ -98,6 +98,13 @@
可能无法正确确定图像大小。<function>getimagesize</function> 此时会返回的宽高为 0。
</para>
</note>
<note>
<simpara>
<function>getimagesize</function> 是独立于任何图像元数据的。
例如,如果 Exif <literal>Orientation</literal> 标志设置为将图像旋转 90 或 270 度的值,
索引 0 和 1 被交换,即包含高度和宽度。
</simpara>
</note>
<para>
索引 2 是表示图像类型的某个 <constant>IMAGETYPE_<replaceable>*</replaceable></constant> 常量。
</para>
Expand Down
6 changes: 3 additions & 3 deletions reference/image/functions/imagegd.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 55f2d0cda1972031881f6e3464946144dfb900a2 Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.imagegd" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>imagegd</refname>
Expand All @@ -15,7 +15,7 @@
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>file</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
输出 GD 图像到指定 <parameter>file</parameter>。
输出或保存 <parameter>image</parameter> 参数指定的 GD 图像
</para>
</refsect1>
<refsect1 role="parameters">
Expand Down
4 changes: 2 additions & 2 deletions reference/image/functions/imagegd2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: 2a3e48b0edb8daeebb6479ade819c397759c74be Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.imagegd2" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand All @@ -17,7 +17,7 @@
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>IMG_GD2_RAW</constant></initializer></methodparam>
</methodsynopsis>
<para>
输出 GD2 图像到指定 <parameter>file</parameter>。
输出或保存 <parameter>image</parameter> 参数指定的 GD2 图像
</para>
</refsect1>
<refsect1 role="parameters">
Expand Down
13 changes: 8 additions & 5 deletions reference/image/functions/imagettftext.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9960a09a5705102bf4dd0ce63e03d9ec716d0015 Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 20a9aaa1f195160622f9c53eabcfd2da7b32b346 Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.imagettftext" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>imagettftext</refname>
Expand Down Expand Up @@ -87,11 +87,11 @@
UTF-8 编码的文本字符串。
</para>
<para>
可以包含十进制数字化字符表示(形式为:&amp;#8364;)来访问字体中超过位置
127 的字符,支持十六进制格式(如 &amp;#xA9;)。UTF-8 编码的字符串可以直接传递。
可以包含十进制数字化字符表示(形式为:<literal>&amp;#8364;</literal>)来访问字体中超过位置
127 的字符,支持十六进制格式(如 <literal>&amp;#xA9;</literal>)。UTF-8 编码的字符串可以直接传递。
</para>
<para>
不支持命名实体,比如 &amp;copy;。可以考虑使用 <function>html_entity_decode</function>
不支持命名实体,比如 <literal>&amp;copy;</literal>。可以考虑使用 <function>html_entity_decode</function>
将这些命名实体解码为 UTF-8 字符。
</para>
<para>
Expand Down Expand Up @@ -143,6 +143,7 @@
<programlisting role="php">
<![CDATA[
<?php

// 设置 content-type
header('Content-Type: image/png');

Expand All @@ -157,6 +158,7 @@ imagefilledrectangle($im, 0, 0, 399, 29, $white);

// 要绘制的文本
$text = 'Testing...';

// 用自己的字体路径替换路径
$font = 'arial.ttf';

Expand All @@ -168,6 +170,7 @@ imagettftext($im, 20, 0, 10, 20, $black, $font, $text);

// 与 imagejpeg() 相比,使用 imagepng() 可产生更清晰的文本
imagepng($im);

?>
]]>
</programlisting>
Expand Down