reference/image/functions/imagecreatefromgd2part.xml
593ea510e853ff034e03f78a4be0daa41661c9d4
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.imagecreatefromgd2part' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.imagecreatefromgd2part" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>imagecreatefromgd2part</refname>
6
6
<refpurpose>Create a new image from a given part of GD2 file or URL</refpurpose>
...
...
@@ -8,10 +8,10 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>resource</type><methodname>imagecreatefromgd2part</methodname>
11
+
<type class="union"><type>GdImage</type><type>false</type></type><methodname>imagecreatefromgd2part</methodname>
12
12
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
13
-
<methodparam><type>int</type><parameter>srcX</parameter></methodparam>
14
-
<methodparam><type>int</type><parameter>srcY</parameter></methodparam>
13
+
<methodparam><type>int</type><parameter>x</parameter></methodparam>
14
+
<methodparam><type>int</type><parameter>y</parameter></methodparam>
15
15
<methodparam><type>int</type><parameter>width</parameter></methodparam>
16
16
<methodparam><type>int</type><parameter>height</parameter></methodparam>
17
17
</methodsynopsis>
...
...
@@ -33,7 +33,7 @@
33
33
</listitem>
34
34
</varlistentry>
35
35
<varlistentry>
36
-
<term><parameter>srcX</parameter></term>
36
+
<term><parameter>x</parameter></term>
37
37
<listitem>
38
38
<para>
39
39
x-coordinate of source point.
...
...
@@ -41,7 +41,7 @@
41
41
</listitem>
42
42
</varlistentry>
43
43
<varlistentry>
44
-
<term><parameter>srcY</parameter></term>
44
+
<term><parameter>y</parameter></term>
45
45
<listitem>
46
46
<para>
47
47
y-coordinate of source point.
...
...
@@ -67,6 +67,30 @@
67
67
&reftitle.returnvalues;
68
68
<para>&gd.return.identifier;</para>
69
69
</refsect1>
70
+

71
+
<refsect1 role="changelog">
72
+
&reftitle.changelog;
73
+
<informaltable>
74
+
<tgroup cols="2">
75
+
<thead>
76
+
<row>
77
+
<entry>&Version;</entry>
78
+
<entry>&Description;</entry>
79
+
</row>
80
+
</thead>
81
+
<tbody>
82
+
<row>
83
+
<entry>8.0.0</entry>
84
+
<entry>
85
+
On success, this function returns a <classname>GDImage</classname> instance now;
86
+
previously, a <type>resource</type> was returned.
87
+
</entry>
88
+
</row>
89
+
</tbody>
90
+
</tgroup>
91
+
</informaltable>
92
+
</refsect1>
93
+

70
94
<refsect1 role="examples">
71
95
&reftitle.examples;
72
96
<para>
...
...
@@ -82,8 +106,7 @@ $image = getimagesize('./test.gd2');
82
106
// sizes
83
107
$im = imagecreatefromgd2part('./test.gd2', 4, 4, ($image[0] / 2) - 6, ($image[1] / 2) - 6);
84
108

85
-
// Do an image operation, in this case we emboss the
86
-
// image if PHP 5+
109
+
// Do an image operation, in this case we emboss the image
87
110
if(function_exists('imagefilter'))
88
111
{
89
112
imagefilter($im, IMG_FILTER_EMBOSS);
...
...
@@ -98,13 +121,13 @@ imagedestroy($im);
98
121
</example>
99
122
</para>
100
123
</refsect1>
124
+

101
125
<refsect1 role="notes">
102
126
&reftitle.notes;
103
-
&note.gd.2;
104
-
&warn.no-win32-fopen-wrapper;
127
+
&gd.deprecated.gd-formats;
105
128
</refsect1>
106
-
</refentry>
107
129

130
+
</refentry>
108
131
<!-- Keep this comment at the end of the file
109
132
Local variables:
110
133
mode: sgml
111
134