<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>EXIF library (libexif) API: libexif/exif-data.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">EXIF library (libexif) API <span id="projectnumber">0.6.20</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('exif-data_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <h1>exif-data.h</h1> </div> </div> <div class="contents"> <a href="exif-data_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00004"></a>00004 <span class="comment">/*</span> <a name="l00005"></a>00005 <span class="comment"> * \author Lutz Mueller <lutz@users.sourceforge.net></span> <a name="l00006"></a>00006 <span class="comment"> * \date 2001-2005</span> <a name="l00007"></a>00007 <span class="comment"> *</span> <a name="l00008"></a>00008 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span> <a name="l00010"></a>00010 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00011"></a>00011 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span> <a name="l00012"></a>00012 <span class="comment"> *</span> <a name="l00013"></a>00013 <span class="comment"> * This library is distributed in the hope that it will be useful, </span> <a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of </span> <a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00016"></a>00016 <span class="comment"> * Lesser General Public License for more details. </span> <a name="l00017"></a>00017 <span class="comment"> *</span> <a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span> <a name="l00019"></a>00019 <span class="comment"> * License along with this library; if not, write to the</span> <a name="l00020"></a>00020 <span class="comment"> * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,</span> <a name="l00021"></a>00021 <span class="comment"> * Boston, MA 02110-1301 USA.</span> <a name="l00022"></a>00022 <span class="comment"> */</span> <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="preprocessor">#ifndef __EXIF_DATA_H__</span> <a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __EXIF_DATA_H__</span> <a name="l00026"></a>00026 <span class="preprocessor"></span> <a name="l00027"></a>00027 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00029"></a>00029 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="preprocessor">#include <libexif/exif-byte-order.h></span> <a name="l00032"></a>00032 <span class="preprocessor">#include <libexif/exif-data-type.h></span> <a name="l00033"></a>00033 <span class="preprocessor">#include <libexif/exif-ifd.h></span> <a name="l00034"></a>00034 <span class="preprocessor">#include <libexif/exif-log.h></span> <a name="l00035"></a>00035 <span class="preprocessor">#include <libexif/exif-tag.h></span> <a name="l00036"></a>00036 <a name="l00038"></a><a class="code" href="exif-data_8h.html#ae62aab6698d7c078e38cd445ddcb8abf">00038</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">_ExifData</a> <a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a>; <a name="l00039"></a>00039 <span class="keyword">typedef</span> <span class="keyword">struct </span>_ExifDataPrivate ExifDataPrivate; <a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="preprocessor">#include <libexif/exif-content.h></span> <a name="l00042"></a>00042 <span class="preprocessor">#include <libexif/exif-mnote-data.h></span> <a name="l00043"></a>00043 <span class="preprocessor">#include <libexif/exif-mem.h></span> <a name="l00044"></a>00044 <a name="l00046"></a><a class="code" href="struct__ExifData.html">00046</a> <span class="keyword">struct </span><a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">_ExifData</a> <a name="l00047"></a>00047 { <a name="l00049"></a><a class="code" href="struct__ExifData.html#a93efef6710d8b867b743ed0a152d5293">00049</a> <a class="code" href="struct__ExifContent.html">ExifContent</a> *<a class="code" href="struct__ExifData.html#a93efef6710d8b867b743ed0a152d5293" title="Data for each IFD.">ifd</a>[EXIF_IFD_COUNT]; <a name="l00050"></a>00050 <a name="l00052"></a><a class="code" href="struct__ExifData.html#a6adaa7f443903d8fc2d2b232c67bf660">00052</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="struct__ExifData.html#a6adaa7f443903d8fc2d2b232c67bf660" title="Pointer to thumbnail image, or NULL if not available.">data</a>; <a name="l00053"></a>00053 <a name="l00055"></a><a class="code" href="struct__ExifData.html#a83a9d29c7769854ea86dd48979f8b21b">00055</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct__ExifData.html#a83a9d29c7769854ea86dd48979f8b21b" title="Number of bytes in thumbnail image at data.">size</a>; <a name="l00056"></a>00056 <a name="l00057"></a>00057 ExifDataPrivate *priv; <a name="l00058"></a>00058 }; <a name="l00059"></a>00059 <a name="l00067"></a>00067 <a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *exif_data_new (<span class="keywordtype">void</span>); <a name="l00068"></a>00068 <a name="l00076"></a>00076 <a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *exif_data_new_mem (<a class="code" href="exif-mem_8h.html#aab8aacbc0ed6f11a1f022b7b1bf4750e" title="ExifMem define a memory allocator.">ExifMem</a> *); <a name="l00077"></a>00077 <a name="l00084"></a>00084 <a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *exif_data_new_from_file (<span class="keyword">const</span> <span class="keywordtype">char</span> *path); <a name="l00085"></a>00085 <a name="l00092"></a>00092 <a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *exif_data_new_from_data (<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *data, <a name="l00093"></a>00093 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size); <a name="l00094"></a>00094 <a name="l00105"></a>00105 <span class="keywordtype">void</span> exif_data_load_data (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *d, <a name="l00106"></a>00106 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size); <a name="l00107"></a>00107 <a name="l00118"></a>00118 <span class="keywordtype">void</span> exif_data_save_data (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> **d, <a name="l00119"></a>00119 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *ds); <a name="l00120"></a>00120 <a name="l00121"></a>00121 <span class="keywordtype">void</span> exif_data_ref (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data); <a name="l00122"></a>00122 <span class="keywordtype">void</span> exif_data_unref (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data); <a name="l00123"></a>00123 <span class="keywordtype">void</span> exif_data_free (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data); <a name="l00124"></a>00124 <a name="l00130"></a>00130 ExifByteOrder exif_data_get_byte_order (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data); <a name="l00131"></a>00131 <a name="l00139"></a>00139 <span class="keywordtype">void</span> exif_data_set_byte_order (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data, ExifByteOrder order); <a name="l00140"></a>00140 <a name="l00149"></a>00149 <a class="code" href="struct__ExifMnoteData.html">ExifMnoteData</a> *exif_data_get_mnote_data (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *d); <a name="l00150"></a>00150 <a name="l00158"></a>00158 <span class="keywordtype">void</span> exif_data_fix (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *d); <a name="l00159"></a>00159 <a name="l00160"></a>00160 <span class="keyword">typedef</span> void (* ExifDataForeachContentFunc) (<a class="code" href="struct__ExifContent.html">ExifContent</a> *, <span class="keywordtype">void</span> *user_data); <a name="l00161"></a>00161 <a name="l00168"></a>00168 <span class="keywordtype">void</span> exif_data_foreach_content (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data, <a name="l00169"></a>00169 ExifDataForeachContentFunc func, <a name="l00170"></a>00170 <span class="keywordtype">void</span> *user_data); <a name="l00171"></a>00171 <a name="l00173"></a><a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96d">00173</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { <a name="l00175"></a><a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96da37a62c4c36dfb4d533338062a4040dee">00175</a> <a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96da37a62c4c36dfb4d533338062a4040dee" title="Act as though unknown tags are not present.">EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS</a> = 1 << 0, <a name="l00176"></a>00176 <a name="l00178"></a><a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96dae8470cc4acd5755528f7ff36ba168023">00178</a> <a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96dae8470cc4acd5755528f7ff36ba168023" title="Fix the EXIF tags to follow the spec.">EXIF_DATA_OPTION_FOLLOW_SPECIFICATION</a> = 1 << 1, <a name="l00179"></a>00179 <a name="l00181"></a><a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96da02a9ae63a51323c42968d1612e8215e7">00181</a> <a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96da02a9ae63a51323c42968d1612e8215e7" title="Leave the MakerNote alone, which could cause it to be corrupted.">EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE</a> = 1 << 2 <a name="l00182"></a>00182 } <a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96d" title="Options to configure the behaviour of ExifData.">ExifDataOption</a>; <a name="l00183"></a>00183 <a name="l00189"></a>00189 <span class="keyword">const</span> <span class="keywordtype">char</span> *exif_data_option_get_name (<a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96d" title="Options to configure the behaviour of ExifData.">ExifDataOption</a> o); <a name="l00190"></a>00190 <a name="l00196"></a>00196 <span class="keyword">const</span> <span class="keywordtype">char</span> *exif_data_option_get_description (<a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96d" title="Options to configure the behaviour of ExifData.">ExifDataOption</a> o); <a name="l00197"></a>00197 <a name="l00203"></a>00203 <span class="keywordtype">void</span> exif_data_set_option (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *d, <a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96d" title="Options to configure the behaviour of ExifData.">ExifDataOption</a> o); <a name="l00204"></a>00204 <a name="l00210"></a>00210 <span class="keywordtype">void</span> exif_data_unset_option (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *d, <a class="code" href="exif-data_8h.html#a324f86ac1d053b37aaee45d2cfbda96d" title="Options to configure the behaviour of ExifData.">ExifDataOption</a> o); <a name="l00211"></a>00211 <a name="l00217"></a>00217 <span class="keywordtype">void</span> exif_data_set_data_type (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *d, ExifDataType dt); <a name="l00218"></a>00218 <a name="l00224"></a>00224 ExifDataType exif_data_get_data_type (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *d); <a name="l00225"></a>00225 <a name="l00231"></a>00231 <span class="keywordtype">void</span> exif_data_dump (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data); <a name="l00232"></a>00232 <a name="l00238"></a>00238 <span class="keywordtype">void</span> exif_data_log (<a class="code" href="struct__ExifData.html" title="Represents the entire EXIF data found in an image.">ExifData</a> *data, <a class="code" href="exif-log_8h.html#a6b225115984bb2016282923cb487f16b" title="State maintained by the logging interface.">ExifLog</a> *log); <a name="l00239"></a>00239 <a name="l00248"></a><a class="code" href="exif-data_8h.html#a984540c607eb7cfce58cf34e7374ab47">00248</a> <span class="preprocessor">#define exif_data_get_entry(d,t) \</span> <a name="l00249"></a>00249 <span class="preprocessor"> (exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ? \</span> <a name="l00250"></a>00250 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_0],t) : \</span> <a name="l00251"></a>00251 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_1],t) ? \</span> <a name="l00252"></a>00252 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_1],t) : \</span> <a name="l00253"></a>00253 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) ? \</span> <a name="l00254"></a>00254 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) : \</span> <a name="l00255"></a>00255 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) ? \</span> <a name="l00256"></a>00256 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) : \</span> <a name="l00257"></a>00257 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) ? \</span> <a name="l00258"></a>00258 <span class="preprocessor"> exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) : NULL)</span> <a name="l00259"></a>00259 <span class="preprocessor"></span> <a name="l00260"></a>00260 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00261"></a>00261 <span class="preprocessor"></span>} <a name="l00262"></a>00262 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> <a name="l00263"></a>00263 <a name="l00264"></a>00264 <span class="preprocessor">#endif </span><span class="comment">/* __EXIF_DATA_H__ */</span> </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="exif-data_8h.html">exif-data.h</a> </li> <li class="footer">Generated on Fri Mar 18 2011 for EXIF library (libexif) API by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li> </ul> </div> </body> </html>