reference/image/functions/imagexbm.xml
62126c55f1c6ed444043e7272c4f9e233818a44b
...
...
@@ -9,9 +9,9 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>bool</type><methodname>imagexbm</methodname>
12
-
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
13
-
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>foreground</parameter></methodparam>
12
+
<methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
13
+
<methodparam><type class="union"><type>string</type><type>null</type></type><parameter>filename</parameter></methodparam>
14
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>foreground_color</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Outputs or save an <acronym>XBM</acronym> version of the given
...
...
@@ -21,6 +21,7 @@
21
21
<simpara>
22
22
<function>imagexbm</function> doesn't apply any padding, so the image width
23
23
has to be a multiple of 8.
24
+
This restriction does no longer apply as of PHP 7.0.9.
24
25
</simpara>
25
26
</note>
26
27
</refsect1>
...
...
@@ -32,11 +33,18 @@
32
33
<varlistentry>
33
34
<term><parameter>filename</parameter></term>
34
35
<listitem>
35
-
<para>&gd.image.path;</para>
36
+
<para>The path to save the file to, given as &string;. If &null;, the raw image stream will be output directly.</para>
37
+
<para>
38
+
The <parameter>filename</parameter> (without the .xbm extension) is also
39
+
used for the C identifiers of the <acronym>XBM</acronym>, whereby non
40
+
alphanumeric characters of the current locale are substituted by
41
+
underscores. If <parameter>filename</parameter> is set to &null;,
42
+
<literal>image</literal> is used to build the C identifiers.
43
+
</para>
36
44
</listitem>
37
45
</varlistentry>
38
46
<varlistentry>
39
-
<term><parameter>foreground</parameter></term>
47
+
<term><parameter>foreground_color</parameter></term>
40
48
<listitem>
41
49
<para>
42
50
You can set the foreground color with this parameter by setting an
...
...
@@ -54,7 +62,38 @@
54
62
<para>
55
63
&return.success;
56
64
</para>
65
+
&gd.return.trueonerror;
66
+
</refsect1>
67
+

68
+
<refsect1 role="changelog">
69
+
&reftitle.changelog;
70
+
<informaltable>
71
+
<tgroup cols="2">
72
+
<thead>
73
+
<row>
74
+
<entry>&Version;</entry>
75
+
<entry>&Description;</entry>
76
+
</row>
77
+
</thead>
78
+
<tbody>
79
+
&gd.changelog.image-param;
80
+
<row>
81
+
<entry>8.0.0</entry>
82
+
<entry>
83
+
<parameter>foreground_color</parameter> is now nullable.
84
+
</entry>
85
+
</row>
86
+
<row>
87
+
<entry>8.0.0</entry>
88
+
<entry>
89
+
The fourth parameter, which was unused, has been removed.
90
+
</entry>
91
+
</row>
92
+
</tbody>
93
+
</tgroup>
94
+
</informaltable>
57
95
</refsect1>
96
+

58
97
<refsect1 role="examples">
59
98
&reftitle.examples;
60
99
<para>
...
...
@@ -103,11 +142,8 @@ imagedestroy($im);
103
142
</example>
104
143
</para>
105
144
</refsect1>
106
-
<refsect1 role="notes">
107
-
&reftitle.notes;
108
-
</refsect1>
109
-
</refentry>
110
145

146
+
</refentry>
111
147
<!-- Keep this comment at the end of the file
112
148
Local variables:
113
149
mode: sgml
114
150