reference/image/functions/imagegd2.xml
18f17b3e03337b79205d5306b9de20da01c3ac75
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.imagegd2' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.imagegd2" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>imagegd2</refname>
6
6
<refpurpose>Output GD2 image to browser or file</refpurpose>
...
...
@@ -9,13 +9,13 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>imagegd2</methodname>
12
-
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
13
-
<methodparam choice="opt"><type>string</type><parameter>filename</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>chunk_size</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>IMG_GD2_RAW</initializer></methodparam>
12
+
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
13
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>file</parameter><initializer>&null;</initializer></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>chunk_size</parameter><initializer>128</initializer></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>IMG_GD2_RAW</constant></initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
-
Outputs a GD2 image to the given <parameter>filename</parameter>.
18
+
Outputs a GD2 image to the given <parameter>file</parameter>.
19
19
</para>
20
20
</refsect1>
21
21
<refsect1 role="parameters">
...
...
@@ -24,7 +24,7 @@
24
24
<variablelist>
25
25
&gd.image.description;
26
26
<varlistentry>
27
-
<term><parameter>filename</parameter></term>
27
+
<term><parameter>file</parameter></term>
28
28
<listitem>
29
29
<para>&gd.image.path;</para>
30
30
</listitem>
...
...
@@ -38,7 +38,7 @@
38
38
</listitem>
39
39
</varlistentry>
40
40
<varlistentry>
41
-
<term><parameter>type</parameter></term>
41
+
<term><parameter>mode</parameter></term>
42
42
<listitem>
43
43
<para>
44
44
Either <constant>IMG_GD2_RAW</constant> or
...
...
@@ -55,7 +55,32 @@
55
55
<para>
56
56
&return.success;
57
57
</para>
58
+
&gd.return.trueonerror;
58
59
</refsect1>
60
+

61
+
<refsect1 role="changelog">
62
+
&reftitle.changelog;
63
+
<informaltable>
64
+
<tgroup cols="2">
65
+
<thead>
66
+
<row>
67
+
<entry>&Version;</entry>
68
+
<entry>&Description;</entry>
69
+
</row>
70
+
</thead>
71
+
<tbody>
72
+
<row>
73
+
<entry>8.0.3</entry>
74
+
<entry>
75
+
<parameter>file</parameter> is now nullable.
76
+
</entry>
77
+
</row>
78
+
&gd.changelog.image-param;
79
+
</tbody>
80
+
</tgroup>
81
+
</informaltable>
82
+
</refsect1>
83
+

59
84
<refsect1 role="examples">
60
85
&reftitle.examples;
61
86
<para>
...
...
@@ -104,48 +129,21 @@ imagedestroy($im);
104
129
</refsect1>
105
130
<refsect1 role="notes">
106
131
&reftitle.notes;
107
-
&note.gd.2;
108
132
<note>
109
133
<para>
110
134
The GD2 format is commonly used to allow fast loading of parts of images.
111
135
Note that the GD2 format is only usable in GD2-compatible applications.
112
136
</para>
113
137
</note>
114
-
</refsect1>
115
-
<refsect1 role="changelog">
116
-
&reftitle.changelog;
117
-
<para>
118
-
<informaltable>
119
-
<tgroup cols="2">
120
-
<thead>
121
-
<row>
122
-
<entry>&Version;</entry>
123
-
<entry>&Description;</entry>
124
-
</row>
125
-
</thead>
126
-
<tbody>
127
-
<row>
128
-
<entry>4.3.2</entry>
129
-
<entry>
130
-
<parameter>chunk_size</parameter> and <parameter>type</parameter>
131
-
were added.
132
-
</entry>
133
-
</row>
134
-
</tbody>
135
-
</tgroup>
136
-
</informaltable>
137
-
</para>
138
+
&gd.deprecated.gd-formats;
138
139
</refsect1>
139
140
<refsect1 role="seealso">
140
141
&reftitle.seealso;
141
-
<para>
142
-
<simplelist>
143
-
<member><function>imagegd</function></member>
144
-
</simplelist>
145
-
</para>
142
+
<simplelist>
143
+
<member><function>imagegd</function></member>
144
+
</simplelist>
146
145
</refsect1>
147
146
</refentry>
148
-

149
147
<!-- Keep this comment at the end of the file
150
148
Local variables:
151
149
mode: sgml
152
150