exif.h

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 
00026 typedef struct exif_rational {
00027   int      num;
00028   unsigned denom;
00029 } exif_rational_t;
00030 
00031 typedef union {
00032   long            l;
00033   float           f;
00034   double          g;
00035   char *          s;
00036   exif_rational_t r;
00037 } exif_rec_data_t;
00038 
00039 typedef struct exif_record {
00040   char *           rec_name;
00041   char             rec_type;
00042   int              exif_format;
00043   exif_rec_data_t  rec_data;
00044 } exif_record_t;
00045 
00046 typedef struct exif_data {
00047   int           n_recs;
00048   int           n_alloc;
00049   exif_record_t recs[0];
00050 } exif_data_t;
00051 
00052 
00053 /* EXIF data formats */
00054 
00055 #define EXIF_FMT_COMPUTED  -1 /* Not in raw data */
00056 #define EXIF_FMT_BYTE       1 
00057 #define EXIF_FMT_STRING     2
00058 #define EXIF_FMT_USHORT     3
00059 #define EXIF_FMT_ULONG      4
00060 #define EXIF_FMT_URATIONAL  5
00061 #define EXIF_FMT_SBYTE      6
00062 #define EXIF_FMT_UNDEFINED  7
00063 #define EXIF_FMT_SSHORT     8
00064 #define EXIF_FMT_SLONG      9
00065 #define EXIF_FMT_SRATIONAL 10
00066 #define EXIF_FMT_SINGLE    11
00067 #define EXIF_FMT_DOUBLE    12
00068 
00069 extern void
00070 exif_init(void *(*malloc_fn)(int),
00071           void (*free_fn)(void *),
00072           void *(*realloc_fn)(void *, int));
00073 
00074 extern exif_data_t *
00075 exif_parse_fd(int fd);
00076 
00077 extern exif_data_t *
00078 exif_parse_file(const char *filename);
00079 
00080 extern void
00081 exif_free_data(exif_data_t *d);
00082 
00083 extern exif_record_t *
00084 exif_find_record(exif_data_t *d, const char *rec_name);
00085 
00086 

Generated on Tue Dec 27 22:20:43 2005 for EXIF library (libexif) API by  doxygen 1.4.5