1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
|
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<link rel=StyleSheet href="style.css" type="text/css">
<META NAME="keywords" CONTENT="JPEG Metadata Application Segments APP0 APP1 APP2 APP3 APP12 APP13 APP14 EXIF DCF XMP RDF Photoshop IRB IPTC DCMI JFIF">
<title>The PHP JPEG Metadata Toolkit - Documentation</title>
</head>
<body>
<div class="headerbar">
<H1 align="center" style="padding:15">The PHP JPEG Metadata Toolkit - Documentation</H1>
</div>
<a href="index.html">Go to Documentation - Home</a>
<div class="maintext">
<h2>Photoshop IRB & IPTC-NAA IIM Function Reference</h2>
<p>
The Photoshop Image Resource Block (IRB) resides in
the "App 13" segment of a JPEG image.
It contains photoshop information but can also contain the
IPTC-NAA IIM record. (International Press Telecommunications Council, Newspaper Association of America, Information Interchange Model)
</p>
<br>
<br>
<table border cellpadding=8 cellspacing=0>
<tr>
<td>Function:</td>
<td colspan=2><b>get_Photoshop_IRB</b></td>
</tr>
<tr>
<td>Description:</td>
<td colspan=2>
Retrieves the Photoshop Information Resource Block (IRB) information
from an App13 JPEG segment and returns it as an array. This may
include IPTC-NAA IIM Information. Uses information
supplied by the get_jpeg_header_data function
</td>
<tr>
<tr>
<td>Parameters:</td>
<td width=1%>jpeg_header_data</td>
<td>a JPEG header data array in the same format as from get_jpeg_header_data</td>
</tr>
<tr>
<td rowspan=2>Returns:</td>
<td>IRBdata</td>
<td>The array of Photoshop IRB records</td>
</tr>
<tr>
<td>FALSE</td>
<td>if an APP 13 Photoshop IRB segment could not be found, or if an error occured</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<table border cellpadding=8 cellspacing=0>
<tr>
<td>Function:</td>
<td colspan=2><b>put_Photoshop_IRB</b></td>
</tr>
<tr>
<td>Description:</td>
<td colspan=2>
Adds or modifies the Photoshop Information Resource Block (IRB)
information from an App13 JPEG segment. If a Photoshop IRB already
exists, it is replaced, otherwise a new one is inserted, using the
supplied data. Uses information supplied by the get_jpeg_header_data
function
</td>
<tr>
<tr>
<td rowspan=2>Parameters:</td>
<td width=1%>jpeg_header_data</td>
<td>a JPEG header data array in the same format as from get_jpeg_header_data</td>
</tr>
<tr>
<td width=1%>new_IRB_data</td>
<td>
an array of the data to be stored in the Photoshop
IRB segment. Should be in the same format as received
from get_Photoshop_IRB
</td>
</tr>
<tr>
<td rowspan=2>Returns:</td>
<td>jpeg_header_data</td>
<td>the JPEG header data array with the Photoshop IRB added.</td>
</tr>
<tr>
<td>FALSE</td>
<td>if an error occured</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<table border cellpadding=8 cellspacing=0>
<tr>
<td>Function:</td>
<td colspan=2><b>get_Photoshop_IPTC</b></td>
</tr>
<tr>
<td>Description:</td>
<td colspan=2>
Retrieves IPTC-NAA IIM information from within a Photoshop
IRB (if it is present) and returns it in an array. Uses
information supplied by the get_jpeg_header_data function
</td>
<tr>
<tr>
<td rowspan=1>Parameters:</td>
<td width=1%>Photoshop_IRB_data</td>
<td>an array of Photoshop IRB records, as returned from get_Photoshop_IRB</td>
</tr>
<tr>
<td rowspan=2>Returns:</td>
<td>IPTC_Data_Out</td>
<td>The array of IPTC-NAA IIM records</td>
</tr>
<tr>
<td>FALSE</td>
<td>if an IPTC-NAA IIM record could not be found, or if an error occured</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<table border cellpadding=8 cellspacing=0>
<tr>
<td>Function:</td>
<td colspan=2><b>put_Photoshop_IPTC</b></td>
</tr>
<tr>
<td>Description:</td>
<td colspan=2>
Inserts a new IPTC-NAA IIM resource into a Photoshop
IRB, or replaces an the existing resource if one is present.
Uses information supplied by the get_Photoshop_IRB function
</td>
<tr>
<tr>
<td rowspan=2>Parameters:</td>
<td width=1%>Photoshop_IRB_data</td>
<td>an array of Photoshop IRB records, as returned from get_Photoshop_IRB, into which the IPTC-NAA IIM record will be inserted</td>
</tr>
<tr>
<td width=1%>new_IPTC_block</td>
<td>an array of IPTC-NAA records in the same format as those returned by get_Photoshop_IPTC</td>
</tr>
<tr>
<td rowspan=1>Returns:</td>
<td>Photoshop_IRB_data</td>
<td>The Photoshop IRB array with the IPTC-NAA IIM resource inserted</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<table border cellpadding=8 cellspacing=0>
<tr>
<td>Function:</td>
<td colspan=2><b>Interpret_IRB_to_HTML</b></td>
</tr>
<tr>
<td>Description:</td>
<td colspan=2>
Generates html showing the information contained in a Photoshop
IRB data array, as retrieved with get_Photoshop_IRB, including
any IPTC-NAA IIM records found.<br>
<br>
Note: The following resource numbers are not currently
decoded: ( Many of these do not apply to JPEG images)<br>
0x03E9, 0x03EE, 0x03EF, 0x03F0, 0x03F1, 0x03F2, 0x03F6, 0x03F9,
0x03FA, 0x03FB, 0x03FD, 0x03FE, 0x0400, 0x0401, 0x0402, 0x0405,
0x040E, 0x040F, 0x0410, 0x0412, 0x0413, 0x0415, 0x0416, 0x0417,
0x041B, 0x041C, 0x041D, 0x0BB7<br>
<br>
( Also these Obsolete resource numbers)<br>
0x03E8, 0x03EB, 0x03FC, 0x03FF, 0x0403
</td>
<tr>
<tr>
<td rowspan=2>Parameters:</td>
<td width=1%>IRB_array</td>
<td>a Photoshop IRB data array as from get_Photoshop_IRB</td>
</tr>
<tr>
<td width=1%>filename</td>
<td>the name of the JPEG file being processed (used by the script which displays the Photoshop thumbnail)</td>
</tr>
<tr>
<td rowspan=1>Returns:</td>
<td>output_str</td>
<td>the HTML string</td>
</tr>
</table>
<br>
<br>
<table border cellpadding=8 cellspacing=0>
<tr>
<td>Function:</td>
<td colspan=2><b>Interpret_IPTC_to_HTML</b></td>
</tr>
<tr>
<td>Description:</td>
<td colspan=2>
Generates html detailing the contents a IPTC-NAA IIM array which was retrieved with the get_Photoshop_IPTC function
</td>
<tr>
<tr>
<td rowspan=1>Parameters:</td>
<td width=1%>IPTC_info</td>
<td>the IPTC-NAA IIM array,as read from get_IPTC</td>
</tr>
<tr>
<td rowspan=1>Returns:</td>
<td>OutputStr</td>
<td>A string containing the HTML</td>
</tr>
</table>
<br>
<br>
</div>
</body>
</html>
|