/usr/share/gtk-doc/html/libiptcdata/libiptcdata-jpeg.html is in libiptcdata-doc 1.0.4-6ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JPEG: libiptcdata Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libiptcdata Reference Manual">
<link rel="up" href="ch02.html" title="Format-specific Functions">
<link rel="prev" href="ch02.html" title="Format-specific Functions">
<link rel="next" href="ch03.html" title="Helper Functions">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libiptcdata-jpeg.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libiptcdata-jpeg"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libiptcdata-jpeg.top_of_page"></a>JPEG</span></h2>
<p>JPEG — functions for loading and saving IPTC data from JPEG files</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libiptcdata-jpeg.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libiptcdata-jpeg.html#iptc-jpeg-read-ps3" title="iptc_jpeg_read_ps3 ()">iptc_jpeg_read_ps3</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libiptcdata-jpeg.html#iptc-jpeg-ps3-find-iptc" title="iptc_jpeg_ps3_find_iptc ()">iptc_jpeg_ps3_find_iptc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libiptcdata-jpeg.html#iptc-jpeg-ps3-save-iptc" title="iptc_jpeg_ps3_save_iptc ()">iptc_jpeg_ps3_save_iptc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libiptcdata-jpeg.html#iptc-jpeg-save-with-ps3" title="iptc_jpeg_save_with_ps3 ()">iptc_jpeg_save_with_ps3</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libiptcdata-jpeg.description"></a><h2>Description</h2>
<p>
Convenience functions for loading and saving IPTC data blocks from JPEG files.
</p>
</div>
<div class="refsect1">
<a name="libiptcdata-jpeg.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="iptc-jpeg-read-ps3"></a><h3>iptc_jpeg_read_ps3 ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
iptc_jpeg_read_ps3 (<em class="parameter"><code><span class="type">FILE</span> *infile</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre>
<p>Scans the headers of a JPEG file looking for a "Photoshop 3.0" header, and if
found, stores the raw contents of this header in the <em class="parameter"><code>buf</code></em>
buffer. The Photoshop
3.0 header is a series of records found in the APP13 section of a JPEG file.
If a JPEG file contains IPTC metadata, the metadata is stored in one of the
Photoshop 3.0 records.</p>
<div class="refsect3">
<a name="iptc-jpeg-read-ps3.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>infile</p></td>
<td class="parameter_description"><p>an open JPEG file with the current position set to the start of the file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>an output buffer to store the Photoshop 3.0 data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>the size of the output buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="iptc-jpeg-read-ps3.returns"></a><h4>Returns</h4>
<p> the number of bytes stored on success, 0 if the PS3 header was
not found, or -1 if an error occurred.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-jpeg-ps3-find-iptc"></a><h3>iptc_jpeg_ps3_find_iptc ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
iptc_jpeg_ps3_find_iptc (<em class="parameter"><code>const unsigned <span class="type">char</span> *ps3</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> ps3_size</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> *iptc_len</code></em>);</pre>
<p>Parses a "Photoshop 3.0" header in search of IPTC metadata.</p>
<div class="refsect3">
<a name="iptc-jpeg-ps3-find-iptc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ps3</p></td>
<td class="parameter_description"><p>the data of a Photoshop 3.0 header to search</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ps3_size</p></td>
<td class="parameter_description"><p>size in bytes of <em class="parameter"><code>ps3</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iptc_len</p></td>
<td class="parameter_description"><p>output parameter, the size in bytes of any found IPTC data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="iptc-jpeg-ps3-find-iptc.returns"></a><h4>Returns</h4>
<p> the offset in bytes from the start of <em class="parameter"><code>ps3</code></em>
where a block
of IPTC metadata begins, 0 if no IPTC metadata was found, -1 on error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-jpeg-ps3-save-iptc"></a><h3>iptc_jpeg_ps3_save_iptc ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
iptc_jpeg_ps3_save_iptc (<em class="parameter"><code>const unsigned <span class="type">char</span> *ps3</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> ps3_size</code></em>,
<em class="parameter"><code>const unsigned <span class="type">char</span> *iptc</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> iptc_size</code></em>,
<em class="parameter"><code>unsigned <span class="type">char</span> *buf</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> size</code></em>);</pre>
<p>Takes a Photoshop 3.0 header, <em class="parameter"><code>ps3</code></em>
, removes any existing IPTC data inside
that header, and inserts the new IPTC data from <em class="parameter"><code>iptc</code></em>
. Any other non-IPTC
portions of <em class="parameter"><code>ps3</code></em>
are left unmodified. If <em class="parameter"><code>ps3</code></em>
is NULL, a blank PS3 header
is created. If <em class="parameter"><code>iptc</code></em>
is NULL, the output PS3 header will contain no IPTC
data, even if <em class="parameter"><code>ps3</code></em>
originally contained some.</p>
<div class="refsect3">
<a name="iptc-jpeg-ps3-save-iptc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>ps3</p></td>
<td class="parameter_description"><p>a template PS3 header in which to insert the
new iptc data. Any non-IPTC data in this template will be preserved
in the output Photoshop 3.0 header. If NULL, a PS3 header will be
generated from scratch.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ps3_size</p></td>
<td class="parameter_description"><p>size in bytes of <em class="parameter"><code>ps3</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iptc</p></td>
<td class="parameter_description"><p>the IPTC bytestream to be encapsulated in the PS3 output. The IPTC
bytestream can be generated with <a class="link" href="libiptcdata-data.html#iptc-data-save" title="iptc_data_save ()"><code class="function">iptc_data_save()</code></a>. If
NULL, the output will still be a valid PS3 header, but without any
contained IPTC data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iptc_size</p></td>
<td class="parameter_description"><p>size in bytes of <em class="parameter"><code>iptc</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>output buffer for the generated PS3 header</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>size in bytes of <em class="parameter"><code>buf</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="iptc-jpeg-ps3-save-iptc.returns"></a><h4>Returns</h4>
<p> the number of bytes written to <em class="parameter"><code>buf</code></em>
; -1 on error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="iptc-jpeg-save-with-ps3"></a><h3>iptc_jpeg_save_with_ps3 ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
iptc_jpeg_save_with_ps3 (<em class="parameter"><code><span class="type">FILE</span> *infile</code></em>,
<em class="parameter"><code><span class="type">FILE</span> *outfile</code></em>,
<em class="parameter"><code>const unsigned <span class="type">char</span> *ps3</code></em>,
<em class="parameter"><code>unsigned <span class="type">int</span> ps3_size</code></em>);</pre>
<p>Takes an existing JPEG file, <em class="parameter"><code>infile</code></em>
, removes any existing Photoshop
3.0 header from it, and adds a new PS3 header, writing the output
to <em class="parameter"><code>outfile</code></em>
. <em class="parameter"><code>infile</code></em>
must be open for reading and is expected to point
to the beginning of the JPEG file, which should be different from <em class="parameter"><code>outfile</code></em>
,
which must be open for writing. If <em class="parameter"><code>ps3</code></em>
is NULL, the output will contain
no PS3 header. PS3 headers reside in the APP13 section of the JPEG file,
which is created if necessary. All other headers and data will be copied
directly from <em class="parameter"><code>infile</code></em>
without modification.</p>
<div class="refsect3">
<a name="iptc-jpeg-save-with-ps3.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>infile</p></td>
<td class="parameter_description"><p>the file stream from which the image data is copied</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>outfile</p></td>
<td class="parameter_description"><p>the output file stream</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ps3</p></td>
<td class="parameter_description"><p>the Photoshop 3.0 header to add to the output file</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ps3_size</p></td>
<td class="parameter_description"><p>size in bytes of <em class="parameter"><code>ps3</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="iptc-jpeg-save-with-ps3.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error. Note that even in error, some data
may have been written to <em class="parameter"><code>outfile</code></em>
, and its contents should be considered
undefined.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libiptcdata-jpeg.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|