1
- /*
1
+ /*
2
2
gaiaexif.h -- Gaia common EXIF Metadata reading functions
3
-
3
+
4
4
version 2.3, 2008 October 13
5
5
6
6
Author: Sandro Furieri a.furieri@lqt.it
7
7
8
8
------------------------------------------------------------------------------
9
-
9
+
10
10
Version: MPL 1.1/GPL 2.0/LGPL 2.1
11
-
11
+
12
12
The contents of this file are subject to the Mozilla Public License Version
13
13
1.1 (the "License"); you may not use this file except in compliance with
14
14
the License. You may obtain a copy of the License at
15
15
http://www.mozilla.org/MPL/
16
-
16
+
17
17
Software distributed under the License is distributed on an "AS IS" basis,
18
18
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
19
19
for the specific language governing rights and limitations under the
@@ -22,7 +22,7 @@ License.
22
22
The Original Code is the SpatiaLite library
23
23
24
24
The Initial Developer of the Original Code is Alessandro Furieri
25
-
25
+
26
26
Portions created by the Initial Developer are Copyright (C) 2008
27
27
the Initial Developer. All Rights Reserved.
28
28
@@ -39,7 +39,7 @@ decision by deleting the provisions above and replace them with the notice
39
39
and other provisions required by the GPL or the LGPL. If you do not delete
40
40
the provisions above, a recipient may use your version of this file under
41
41
the terms of any one of the MPL, the GPL or the LGPL.
42
-
42
+
43
43
*/
44
44
45
45
#ifdef DLL_EXPORT
@@ -56,155 +56,155 @@ extern "C"
56
56
{
57
57
#endif
58
58
59
- /* constants used for BLOB value types */
60
- #define GAIA_HEX_BLOB 0
61
- #define GAIA_GIF_BLOB 1
62
- #define GAIA_PNG_BLOB 2
63
- #define GAIA_JPEG_BLOB 3
64
- #define GAIA_EXIF_BLOB 4
65
- #define GAIA_EXIF_GPS_BLOB 5
66
- #define GAIA_ZIP_BLOB 6
67
- #define GAIA_PDF_BLOB 7
68
- #define GAIA_GEOMETRY_BLOB 8
69
-
70
- /* constants used for EXIF value types */
71
- #define GAIA_EXIF_NONE 0
72
- #define GAIA_EXIF_BYTE 1
73
- #define GAIA_EXIF_SHORT 2
74
- #define GAIA_EXIF_STRING 3
75
- #define GAIA_EXIF_LONG 4
76
- #define GAIA_EXIF_RATIONAL 5
77
- #define GAIA_EXIF_SLONG 9
78
- #define GAIA_EXIF_SRATIONAL 10
79
-
80
- typedef struct gaiaExifTagStruct
81
- {
82
- /* an EXIF TAG */
83
- char Gps ;
84
- unsigned short TagId ;
85
- unsigned short Type ;
86
- unsigned short Count ;
87
- unsigned char TagOffset [4 ];
88
- unsigned char * ByteValue ;
89
- char * StringValue ;
90
- unsigned short * ShortValues ;
91
- unsigned int * LongValues ;
92
- unsigned int * LongRationals1 ;
93
- unsigned int * LongRationals2 ;
94
- short * SignedShortValues ;
95
- int * SignedLongValues ;
96
- int * SignedLongRationals1 ;
97
- int * SignedLongRationals2 ;
98
- float * FloatValues ;
99
- double * DoubleValues ;
100
- struct gaiaExifTagStruct * Next ;
101
- } gaiaExifTag ;
102
- typedef gaiaExifTag * gaiaExifTagPtr ;
103
-
104
- typedef struct gaiaExifTagListStruct
105
- {
106
- /* an EXIF TAG LIST */
107
- gaiaExifTagPtr First ;
108
- gaiaExifTagPtr Last ;
109
- int NumTags ;
110
- gaiaExifTagPtr * TagsArray ;
111
- } gaiaExifTagList ;
112
- typedef gaiaExifTagList * gaiaExifTagListPtr ;
113
-
114
- /* function prototipes */
115
-
116
- GAIAEXIF_DECLARE gaiaExifTagListPtr gaiaGetExifTags ( const unsigned char
117
- * blob , int size );
118
- GAIAEXIF_DECLARE void gaiaExifTagsFree ( gaiaExifTagListPtr tag_list );
119
- GAIAEXIF_DECLARE int gaiaGetExifTagsCount ( gaiaExifTagListPtr tag_list );
120
- GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagByPos ( gaiaExifTagListPtr
121
- tag_list ,
122
- const int pos );
123
- GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagById ( const gaiaExifTagListPtr
124
- tag_list ,
125
- const unsigned short
126
- tag_id );
127
- GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifGpsTagById ( const
128
- gaiaExifTagListPtr
129
- tag_list ,
130
- const unsigned short
131
- tag_id );
132
- GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagByName ( const
133
- gaiaExifTagListPtr
134
- tag_list ,
135
- const char * tag_name );
136
- GAIAEXIF_DECLARE unsigned short gaiaExifTagGetId ( const gaiaExifTagPtr tag );
137
- GAIAEXIF_DECLARE void gaiaExifTagGetName ( const gaiaExifTagPtr tag ,
138
- char * tag_name , int len );
139
- GAIAEXIF_DECLARE int gaiaIsExifGpsTag ( const gaiaExifTagPtr tag );
140
- GAIAEXIF_DECLARE unsigned short gaiaExifTagGetValueType ( const
141
- gaiaExifTagPtr
142
- tag );
143
- GAIAEXIF_DECLARE unsigned short gaiaExifTagGetNumValues ( const
144
- gaiaExifTagPtr
145
- tag );
146
- GAIAEXIF_DECLARE unsigned char gaiaExifTagGetByteValue ( const gaiaExifTagPtr
147
- tag , const int ind ,
148
- int * ok );
149
- GAIAEXIF_DECLARE void gaiaExifTagGetStringValue ( const gaiaExifTagPtr tag ,
150
- char * str , int len ,
151
- int * ok );
152
- GAIAEXIF_DECLARE unsigned short gaiaExifTagGetShortValue ( const
153
- gaiaExifTagPtr
154
- tag ,
155
- const int ind ,
156
- int * ok );
157
- GAIAEXIF_DECLARE unsigned int gaiaExifTagGetLongValue ( const gaiaExifTagPtr
158
- tag , const int ind ,
159
- int * ok );
160
- GAIAEXIF_DECLARE unsigned int gaiaExifTagGetRational1Value ( const
161
- gaiaExifTagPtr
162
- tag ,
163
- const int ind ,
164
- int * ok );
165
- GAIAEXIF_DECLARE unsigned int gaiaExifTagGetRational2Value ( const
166
- gaiaExifTagPtr
167
- tag ,
168
- const int ind ,
169
- int * ok );
170
- GAIAEXIF_DECLARE double gaiaExifTagGetRationalValue ( const gaiaExifTagPtr
171
- tag , const int ind ,
172
- int * ok );
173
- GAIAEXIF_DECLARE short gaiaExifTagGetSignedShortValue ( const gaiaExifTagPtr
174
- tag , const int ind ,
175
- int * ok );
176
- GAIAEXIF_DECLARE int gaiaExifTagGetSignedLongValue ( const gaiaExifTagPtr
177
- tag , const int ind ,
178
- int * ok );
179
- GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational1Value ( const
180
- gaiaExifTagPtr tag ,
181
- const int ind ,
182
- int * ok );
183
- GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational2Value ( const
184
- gaiaExifTagPtr tag ,
185
- const int ind ,
186
- int * ok );
187
- GAIAEXIF_DECLARE double gaiaExifTagGetSignedRationalValue ( const
188
- gaiaExifTagPtr
189
- tag ,
190
- const int ind ,
191
- int * ok );
192
- GAIAEXIF_DECLARE float gaiaExifTagGetFloatValue ( const gaiaExifTagPtr tag ,
193
- const int ind , int * ok );
194
- GAIAEXIF_DECLARE double gaiaExifTagGetDoubleValue ( const gaiaExifTagPtr tag ,
195
- const int ind , int * ok );
196
- GAIAEXIF_DECLARE void gaiaExifTagGetHumanReadable ( const gaiaExifTagPtr tag ,
197
- char * str , int len ,
198
- int * ok );
199
- GAIAEXIF_DECLARE int gaiaGuessBlobType ( const unsigned char * blob ,
200
- int size );
201
- GAIAEXIF_DECLARE int gaiaGetGpsCoords ( const unsigned char * blob , int size ,
202
- double * longitude , double * latitude );
203
- GAIAEXIF_DECLARE int gaiaGetGpsLatLong ( const unsigned char * blob , int size ,
204
- char * latlong , int ll_size );
59
+ /* constants used for BLOB value types */
60
+ #define GAIA_HEX_BLOB 0
61
+ #define GAIA_GIF_BLOB 1
62
+ #define GAIA_PNG_BLOB 2
63
+ #define GAIA_JPEG_BLOB 3
64
+ #define GAIA_EXIF_BLOB 4
65
+ #define GAIA_EXIF_GPS_BLOB 5
66
+ #define GAIA_ZIP_BLOB 6
67
+ #define GAIA_PDF_BLOB 7
68
+ #define GAIA_GEOMETRY_BLOB 8
69
+
70
+ /* constants used for EXIF value types */
71
+ #define GAIA_EXIF_NONE 0
72
+ #define GAIA_EXIF_BYTE 1
73
+ #define GAIA_EXIF_SHORT 2
74
+ #define GAIA_EXIF_STRING 3
75
+ #define GAIA_EXIF_LONG 4
76
+ #define GAIA_EXIF_RATIONAL 5
77
+ #define GAIA_EXIF_SLONG 9
78
+ #define GAIA_EXIF_SRATIONAL 10
79
+
80
+ typedef struct gaiaExifTagStruct
81
+ {
82
+ /* an EXIF TAG */
83
+ char Gps ;
84
+ unsigned short TagId ;
85
+ unsigned short Type ;
86
+ unsigned short Count ;
87
+ unsigned char TagOffset [4 ];
88
+ unsigned char * ByteValue ;
89
+ char * StringValue ;
90
+ unsigned short * ShortValues ;
91
+ unsigned int * LongValues ;
92
+ unsigned int * LongRationals1 ;
93
+ unsigned int * LongRationals2 ;
94
+ short * SignedShortValues ;
95
+ int * SignedLongValues ;
96
+ int * SignedLongRationals1 ;
97
+ int * SignedLongRationals2 ;
98
+ float * FloatValues ;
99
+ double * DoubleValues ;
100
+ struct gaiaExifTagStruct * Next ;
101
+ } gaiaExifTag ;
102
+ typedef gaiaExifTag * gaiaExifTagPtr ;
103
+
104
+ typedef struct gaiaExifTagListStruct
105
+ {
106
+ /* an EXIF TAG LIST */
107
+ gaiaExifTagPtr First ;
108
+ gaiaExifTagPtr Last ;
109
+ int NumTags ;
110
+ gaiaExifTagPtr * TagsArray ;
111
+ } gaiaExifTagList ;
112
+ typedef gaiaExifTagList * gaiaExifTagListPtr ;
113
+
114
+ /* function prototipes */
115
+
116
+ GAIAEXIF_DECLARE gaiaExifTagListPtr gaiaGetExifTags ( const unsigned char
117
+ * blob , int size );
118
+ GAIAEXIF_DECLARE void gaiaExifTagsFree ( gaiaExifTagListPtr tag_list );
119
+ GAIAEXIF_DECLARE int gaiaGetExifTagsCount ( gaiaExifTagListPtr tag_list );
120
+ GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagByPos ( gaiaExifTagListPtr
121
+ tag_list ,
122
+ const int pos );
123
+ GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagById ( const gaiaExifTagListPtr
124
+ tag_list ,
125
+ const unsigned short
126
+ tag_id );
127
+ GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifGpsTagById ( const
128
+ gaiaExifTagListPtr
129
+ tag_list ,
130
+ const unsigned short
131
+ tag_id );
132
+ GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagByName ( const
133
+ gaiaExifTagListPtr
134
+ tag_list ,
135
+ const char * tag_name );
136
+ GAIAEXIF_DECLARE unsigned short gaiaExifTagGetId ( const gaiaExifTagPtr tag );
137
+ GAIAEXIF_DECLARE void gaiaExifTagGetName ( const gaiaExifTagPtr tag ,
138
+ char * tag_name , int len );
139
+ GAIAEXIF_DECLARE int gaiaIsExifGpsTag ( const gaiaExifTagPtr tag );
140
+ GAIAEXIF_DECLARE unsigned short gaiaExifTagGetValueType ( const
141
+ gaiaExifTagPtr
142
+ tag );
143
+ GAIAEXIF_DECLARE unsigned short gaiaExifTagGetNumValues ( const
144
+ gaiaExifTagPtr
145
+ tag );
146
+ GAIAEXIF_DECLARE unsigned char gaiaExifTagGetByteValue ( const gaiaExifTagPtr
147
+ tag , const int ind ,
148
+ int * ok );
149
+ GAIAEXIF_DECLARE void gaiaExifTagGetStringValue ( const gaiaExifTagPtr tag ,
150
+ char * str , int len ,
151
+ int * ok );
152
+ GAIAEXIF_DECLARE unsigned short gaiaExifTagGetShortValue ( const
153
+ gaiaExifTagPtr
154
+ tag ,
155
+ const int ind ,
156
+ int * ok );
157
+ GAIAEXIF_DECLARE unsigned int gaiaExifTagGetLongValue ( const gaiaExifTagPtr
158
+ tag , const int ind ,
159
+ int * ok );
160
+ GAIAEXIF_DECLARE unsigned int gaiaExifTagGetRational1Value ( const
161
+ gaiaExifTagPtr
162
+ tag ,
163
+ const int ind ,
164
+ int * ok );
165
+ GAIAEXIF_DECLARE unsigned int gaiaExifTagGetRational2Value ( const
166
+ gaiaExifTagPtr
167
+ tag ,
168
+ const int ind ,
169
+ int * ok );
170
+ GAIAEXIF_DECLARE double gaiaExifTagGetRationalValue ( const gaiaExifTagPtr
171
+ tag , const int ind ,
172
+ int * ok );
173
+ GAIAEXIF_DECLARE short gaiaExifTagGetSignedShortValue ( const gaiaExifTagPtr
174
+ tag , const int ind ,
175
+ int * ok );
176
+ GAIAEXIF_DECLARE int gaiaExifTagGetSignedLongValue ( const gaiaExifTagPtr
177
+ tag , const int ind ,
178
+ int * ok );
179
+ GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational1Value ( const
180
+ gaiaExifTagPtr tag ,
181
+ const int ind ,
182
+ int * ok );
183
+ GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational2Value ( const
184
+ gaiaExifTagPtr tag ,
185
+ const int ind ,
186
+ int * ok );
187
+ GAIAEXIF_DECLARE double gaiaExifTagGetSignedRationalValue ( const
188
+ gaiaExifTagPtr
189
+ tag ,
190
+ const int ind ,
191
+ int * ok );
192
+ GAIAEXIF_DECLARE float gaiaExifTagGetFloatValue ( const gaiaExifTagPtr tag ,
193
+ const int ind , int * ok );
194
+ GAIAEXIF_DECLARE double gaiaExifTagGetDoubleValue ( const gaiaExifTagPtr tag ,
195
+ const int ind , int * ok );
196
+ GAIAEXIF_DECLARE void gaiaExifTagGetHumanReadable ( const gaiaExifTagPtr tag ,
197
+ char * str , int len ,
198
+ int * ok );
199
+ GAIAEXIF_DECLARE int gaiaGuessBlobType ( const unsigned char * blob ,
200
+ int size );
201
+ GAIAEXIF_DECLARE int gaiaGetGpsCoords ( const unsigned char * blob , int size ,
202
+ double * longitude , double * latitude );
203
+ GAIAEXIF_DECLARE int gaiaGetGpsLatLong ( const unsigned char * blob , int size ,
204
+ char * latlong , int ll_size );
205
205
206
206
#ifdef __cplusplus
207
207
}
208
208
#endif
209
209
210
- #endif /* _GAIAEXIF_H */
210
+ #endif /* _GAIAEXIF_H */
0 commit comments