reference/image/functions/imagecreatefromstring.xml
9f7b578adf85bcbc94397c11a7a813d1d3d0cc56
...
...
@@ -8,14 +8,14 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>resource</type><methodname>imagecreatefromstring</methodname>
12
-
<methodparam><type>string</type><parameter>image</parameter></methodparam>
11
+
<type class="union"><type>GdImage</type><type>false</type></type><methodname>imagecreatefromstring</methodname>
12
+
<methodparam><type>string</type><parameter>data</parameter></methodparam>
13
13
</methodsynopsis>
14
14
<para>
15
15
<function>imagecreatefromstring</function> returns an image identifier
16
-
representing the image obtained from the given <parameter>image</parameter>.
16
+
representing the image obtained from the given <parameter>data</parameter>.
17
17
These types will be automatically detected if your build of PHP supports
18
-
them: JPEG, PNG, GIF, WBMP, and GD2.
18
+
them: JPEG, PNG, GIF, BMP, WBMP, GD2, and WEBP.
19
19
</para>
20
20
</refsect1>
21
21
<refsect1 role="parameters">
...
...
@@ -23,7 +23,7 @@
23
23
<para>
24
24
<variablelist>
25
25
<varlistentry>
26
-
<term><parameter>image</parameter></term>
26
+
<term><parameter>data</parameter></term>
27
27
<listitem>
28
28
<para>
29
29
A string containing the image data.
...
...
@@ -36,11 +36,49 @@
36
36
<refsect1 role="returnvalues">
37
37
&reftitle.returnvalues;
38
38
<para>
39
-
An image resource will be returned on success. &false; is returned if
39
+
An image object will be returned on success. &false; is returned if
40
40
the image type is unsupported, the data is not in a recognised format,
41
41
or the image is corrupt and cannot be loaded.
42
42
</para>
43
43
</refsect1>
44
+

45
+
<refsect1 role="errors">
46
+
&reftitle.errors;
47
+
<para>
48
+
<function>imagecreatefromstring</function> raises an E_WARNING level error,
49
+
if the data is not in a recognized format.
50
+
</para>
51
+
</refsect1>
52
+

53
+
<refsect1 role="changelog">
54
+
&reftitle.changelog;
55
+
<informaltable>
56
+
<tgroup cols="2">
57
+
<thead>
58
+
<row>
59
+
<entry>&Version;</entry>
60
+
<entry>&Description;</entry>
61
+
</row>
62
+
</thead>
63
+
<tbody>
64
+
<row>
65
+
<entry>8.0.0</entry>
66
+
<entry>
67
+
On success, this function returns a <classname>GDImage</classname> instance now;
68
+
previously, a <type>resource</type> was returned.
69
+
</entry>
70
+
</row>
71
+
<row>
72
+
<entry>7.3.0</entry>
73
+
<entry>
74
+
WEBP is supported now (if supported by the libgd in use).
75
+
</entry>
76
+
</row>
77
+
</tbody>
78
+
</tgroup>
79
+
</informaltable>
80
+
</refsect1>
81
+

44
82
<refsect1 role="examples">
45
83
&reftitle.examples;
46
84
<para>
...
...
@@ -79,17 +117,14 @@ else {
79
117
</refsect1>
80
118
<refsect1 role="seealso">
81
119
&reftitle.seealso;
82
-
<para>
83
-
<simplelist>
84
-
<member><function>imagecreatefromjpeg</function></member>
85
-
<member><function>imagecreatefrompng</function></member>
86
-
<member><function>imagecreatefromgif</function></member>
87
-
<member><function>imagecreatetruecolor</function></member>
88
-
</simplelist>
89
-
</para>
120
+
<simplelist>
121
+
<member><function>imagecreatefromjpeg</function></member>
122
+
<member><function>imagecreatefrompng</function></member>
123
+
<member><function>imagecreatefromgif</function></member>
124
+
<member><function>imagecreatetruecolor</function></member>
125
+
</simplelist>
90
126
</refsect1>
91
127
</refentry>
92
-

93
128
<!-- Keep this comment at the end of the file
94
129
Local variables:
95
130
mode: sgml
96
131