exif.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright © 2000 Curtis Galloway
00004 
00005 Permission is hereby granted, free of charge, to any person obtaining
00006 a copy of this software and associated documentation files (the
00007 "Software"), to deal in the Software without restriction, including
00008 without limitation the rights to use, copy, modify, merge, publish,
00009 distribute, sublicense, and/or sell copies of the Software, and to
00010 permit persons to whom the Software is furnished to do so, subject to
00011 the following conditions:
00012 
00013 The above copyright notice and this permission notice shall be
00014 included in all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00017 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00018 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00019 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00020 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00021 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00022 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00023 
00024 */
00025 
00064 typedef struct exif_rational {
00065   int      num;
00066   unsigned denom;
00067 } exif_rational_t;
00068 
00069 typedef union {
00070   long            l;
00071   float           f;
00072   double          g;
00073   char *          s;
00074   exif_rational_t r;
00075 } exif_rec_data_t;
00076 
00077 typedef struct exif_record {
00078   char *           rec_name;
00079   char             rec_type;
00080   int              exif_format;
00081   exif_rec_data_t  rec_data;
00082 } exif_record_t;
00083 
00084 typedef struct exif_data {
00085   int           n_recs;
00086   int           n_alloc;
00087   exif_record_t recs[0];
00088 } exif_data_t;
00089 
00090 
00091 /* EXIF data formats */
00092 
00093 #define EXIF_FMT_COMPUTED  -1 /* Not in raw data */
00094 #define EXIF_FMT_BYTE       1 
00095 #define EXIF_FMT_STRING     2
00096 #define EXIF_FMT_USHORT     3
00097 #define EXIF_FMT_ULONG      4
00098 #define EXIF_FMT_URATIONAL  5
00099 #define EXIF_FMT_SBYTE      6
00100 #define EXIF_FMT_UNDEFINED  7
00101 #define EXIF_FMT_SSHORT     8
00102 #define EXIF_FMT_SLONG      9
00103 #define EXIF_FMT_SRATIONAL 10
00104 #define EXIF_FMT_SINGLE    11
00105 #define EXIF_FMT_DOUBLE    12
00106 
00107 extern void
00108 exif_init(void *(*malloc_fn)(int),
00109           void (*free_fn)(void *),
00110           void *(*realloc_fn)(void *, int));
00111 
00112 extern exif_data_t *
00113 exif_parse_fd(int fd);
00114 
00115 extern exif_data_t *
00116 exif_parse_file(const char *filename);
00117 
00118 extern void
00119 exif_free_data(exif_data_t *d);
00120 
00121 extern exif_record_t *
00122 exif_find_record(exif_data_t *d, const char *rec_name);
00123 
00124 

Generated on Wed May 23 15:37:43 2007 for EXIF library (libexif) API by  doxygen 1.5.1