reference/image/functions/imagecreatefromgd.xml
593ea510e853ff034e03f78a4be0daa41661c9d4
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.imagecreatefromgd' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.imagecreatefromgd" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>imagecreatefromgd</refname>
6
6
<refpurpose>Create a new image from GD file or URL</refpurpose>
...
...
@@ -8,7 +8,7 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>resource</type><methodname>imagecreatefromgd</methodname>
11
+
<type class="union"><type>GdImage</type><type>false</type></type><methodname>imagecreatefromgd</methodname>
12
12
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
13
13
</methodsynopsis>
14
14
<para>
...
...
@@ -35,6 +35,30 @@
35
35
&reftitle.returnvalues;
36
36
<para>&gd.return.identifier;</para>
37
37
</refsect1>
38
+

39
+
<refsect1 role="changelog">
40
+
&reftitle.changelog;
41
+
<informaltable>
42
+
<tgroup cols="2">
43
+
<thead>
44
+
<row>
45
+
<entry>&Version;</entry>
46
+
<entry>&Description;</entry>
47
+
</row>
48
+
</thead>
49
+
<tbody>
50
+
<row>
51
+
<entry>8.0.0</entry>
52
+
<entry>
53
+
On success, this function returns a <classname>GDImage</classname> instance now;
54
+
previously, a <type>resource</type> was returned.
55
+
</entry>
56
+
</row>
57
+
</tbody>
58
+
</tgroup>
59
+
</informaltable>
60
+
</refsect1>
61
+

38
62
<refsect1 role="examples">
39
63
&reftitle.examples;
40
64
<para>
...
...
@@ -47,7 +71,7 @@
47
71
$im = @imagecreatefromgd('./test.gd');
48
72

49
73
// Test if the image was loaded
50
-
if(!is_resource($im))
74
+
if(!$im)
51
75
{
52
76
die('Unable to load gd image!');
53
77
}
...
...
@@ -63,12 +87,13 @@ imagedestroy($im);
63
87
</example>
64
88
</para>
65
89
</refsect1>
90
+

66
91
<refsect1 role="notes">
67
92
&reftitle.notes;
68
-
&warn.no-win32-fopen-wrapper;
93
+
&gd.deprecated.gd-formats;
69
94
</refsect1>
70
-
</refentry>
71
95

96
+
</refentry>
72
97
<!-- Keep this comment at the end of the file
73
98
Local variables:
74
99
mode: sgml
75
100