reference/image/functions/iptcembed.xml
0c9c2dd669fe9395eaa73d487fbd160f9057429a
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.iptcembed' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.iptcembed" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>iptcembed</refname>
6
6
<refpurpose>Embeds binary IPTC data into a JPEG image</refpurpose>
...
...
@@ -8,10 +8,10 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>mixed</type><methodname>iptcembed</methodname>
12
-
<methodparam><type>string</type><parameter>iptcdata</parameter></methodparam>
13
-
<methodparam><type>string</type><parameter>jpeg_file_name</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>spool</parameter></methodparam>
11
+
<type class="union"><type>string</type><type>bool</type></type><methodname>iptcembed</methodname>
12
+
<methodparam><type>string</type><parameter>iptc_data</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>spool</parameter><initializer>0</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Embeds binary IPTC data into a JPEG image.
...
...
@@ -22,7 +22,7 @@
22
22
<para>
23
23
<variablelist>
24
24
<varlistentry>
25
-
<term><parameter>iptcdata</parameter></term>
25
+
<term><parameter>iptc_data</parameter></term>
26
26
<listitem>
27
27
<para>
28
28
The data to be written.
...
...
@@ -30,7 +30,7 @@
30
30
</listitem>
31
31
</varlistentry>
32
32
<varlistentry>
33
-
<term><parameter>jpeg_file_name</parameter></term>
33
+
<term><parameter>filename</parameter></term>
34
34
<listitem>
35
35
<para>
36
36
Path to the JPEG image.
...
...
@@ -41,8 +41,8 @@
41
41
<term><parameter>spool</parameter></term>
42
42
<listitem>
43
43
<para>
44
-
Spool flag. If the spool flag is over 2 then the JPEG will be
45
-
returned as a string.
44
+
Spool flag. If the spool flag is less than 2 then the JPEG will be
45
+
returned as a string. Otherwise the JPEG will be printed to STDOUT.
46
46
</para>
47
47
</listitem>
48
48
</varlistentry>
...
...
@@ -52,8 +52,9 @@
52
52
<refsect1 role="returnvalues">
53
53
&reftitle.returnvalues;
54
54
<para>
55
-
If success and spool flag is lower than 2 then the JPEG will not be
56
-
returned as a string, &false; on errors.
55
+
If <parameter>spool</parameter> is less than 2, the JPEG will be returned,
56
+
&return.falseforfailure;. Otherwise returns &true; on success
57
+
&return.falseforfailure;.
57
58
</para>
58
59
</refsect1>
59
60
<refsect1 role="examples">
...
...
@@ -90,15 +91,6 @@ function iptc_make_tag($rec, $data, $value)
90
91
// Path to jpeg file
91
92
$path = './phplogo.jpg';
92
93

93
-
// We need to check if theres any IPTC data in the jpeg image. If there is then
94
-
// bail out because we cannot embed any image that already has some IPTC data!
95
-
$image = getimagesize($path, $info);
96
-

97
-
if(isset($info['APP13']))
98
-
{
99
-
die('Error: IPTC data found in source image, cannot continue');
100
-
}
101
-

102
94
// Set the IPTC tags
103
95
$iptc = array(
104
96
'2#120' => 'Test image',
...
...
@@ -133,7 +125,6 @@ fclose($fp);
133
125
</refsect1>
134
126

135
127
</refentry>
136
-

137
128
<!-- Keep this comment at the end of the file
138
129
Local variables:
139
130
mode: sgml
140
131