annotate src/exif.h @ 122:e2a8b7f2165b

Sat Dec 2 16:44:48 2006 John Ellis <johne@verizon.net> * image-overlay.[ch]: More work on osd icons. * image.c: Use correct flag when setting auto rotation state, and set the state again after the rotation so that osd can update. * img-view.c: Show osd icon when overlay is enabled. * layout.c, layout_image.[ch]: Enable overlay regardless of the full screen state, only difference now is that image description text is only shown when in full screen but icons will always appear. * layout_util.c: Make I key toggle overlay from windowed mode too. * typedefs.h (LayoutWindow): Remove no longer used full_screen_overlay_on.
author gqview
date Sat, 02 Dec 2006 21:57:12 +0000
parents 50fc73e08550
children 71e1ebee420e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
2 * GQView
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 110
diff changeset
3 * (C) 2006 John Ellis
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
4 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 * Authors:
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Support for Exif file format, originally written by Eric Swalens.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 * Modified by Quy Tonthat
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * Reimplemented with generic data storage by John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 This program is free software; you can redistribute it and/or modify
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12 it under the terms of the GNU General Public License as published by
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13 the Free Software Foundation; either version 2 of the License, or
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 (at your option) any later version.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16 This program is distributed in the hope that it will be useful,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 GNU General Public License for more details.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 You should have received a copy of the GNU General Public License
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22 along with this program; if not, write to the Free Software
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26 #ifndef __EXIF_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 #define __EXIF_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 * Tag formats
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35
54
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
36 #define EXIF_FORMAT_COUNT 13
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
37
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 typedef enum {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39 EXIF_FORMAT_UNKNOWN = 0,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 EXIF_FORMAT_BYTE_UNSIGNED = 1,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 EXIF_FORMAT_STRING = 2,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 EXIF_FORMAT_SHORT_UNSIGNED = 3,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43 EXIF_FORMAT_LONG_UNSIGNED = 4,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 EXIF_FORMAT_RATIONAL_UNSIGNED = 5,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 EXIF_FORMAT_BYTE = 6,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 EXIF_FORMAT_UNDEFINED = 7,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47 EXIF_FORMAT_SHORT = 8,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 EXIF_FORMAT_LONG = 9,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 EXIF_FORMAT_RATIONAL = 10,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 EXIF_FORMAT_FLOAT = 11,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 EXIF_FORMAT_DOUBLE = 12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 } ExifFormatType;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
54 typedef enum {
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
55 EXIF_BYTE_ORDER_INTEL,
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
56 EXIF_BYTE_ORDER_MOTOROLA
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
57 } ExifByteOrder;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
58
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 typedef struct _ExifFormatAttrib ExifFormatAttrib;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 struct _ExifFormatAttrib
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62 ExifFormatType type;
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
63 guint size;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
64 const gchar *short_name;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
65 const gchar *description;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 /* the list of known tag data formats */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 extern ExifFormatAttrib ExifFormatList[];
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 * Data storage
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
77
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
78 typedef struct _ExifData ExifData;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79 struct _ExifData
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81 GList *items; /* list of (ExifItem *) */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
82 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
83
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
84 typedef struct _ExifRational ExifRational;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
85 struct _ExifRational
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
86 {
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
87 guint32 num;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
88 guint32 den;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
89 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
90
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
91
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
92 typedef struct _ExifItem ExifItem;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
93 typedef struct _ExifMarker ExifMarker;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
94 typedef struct _ExifTextList ExifTextList;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
95
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
96 struct _ExifItem
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
97 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
98 ExifFormatType format;
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
99 guint tag;
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
100 const ExifMarker *marker;
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
101 guint elements;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
102 gpointer data;
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
103 guint data_len;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
104 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
105
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
106 struct _ExifMarker
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
107 {
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
108 guint tag;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
109 ExifFormatType format;
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
110 gint components;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
111 gchar *key;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
112 gchar *description;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
113 ExifTextList *list;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
114 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
115
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
116 #define EXIF_MARKER_LIST_END { 0x0000, EXIF_FORMAT_UNKNOWN, 0, NULL, NULL, NULL }
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
117
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
118 struct _ExifTextList
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
119 {
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
120 gint value;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
121 const gchar* description;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
122 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
123
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
124 #define EXIF_TEXT_LIST_END { -1, NULL }
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
125
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
126
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
127 typedef struct _ExifFormattedText ExifFormattedText;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
128 struct _ExifFormattedText
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
129 {
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
130 const gchar *key;
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
131 const gchar *description;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
132 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
133
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
134
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
135 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
136 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
137 * Data
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
138 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
139 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
140
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
141 /* enums useful for image manipulation */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
142
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
143 typedef enum {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
144 EXIF_ORIENTATION_UNKNOWN = 0,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
145 EXIF_ORIENTATION_TOP_LEFT = 1,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
146 EXIF_ORIENTATION_TOP_RIGHT = 2,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
147 EXIF_ORIENTATION_BOTTOM_RIGHT = 3,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
148 EXIF_ORIENTATION_BOTTOM_LEFT = 4,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
149 EXIF_ORIENTATION_LEFT_TOP = 5,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
150 EXIF_ORIENTATION_RIGHT_TOP = 6,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
151 EXIF_ORIENTATION_RIGHT_BOTTOM = 7,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
152 EXIF_ORIENTATION_LEFT_BOTTOM = 8
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
153 } ExifOrientationType;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
154
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
155 typedef enum {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
156 EXIF_UNIT_UNKNOWN = 0,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
157 EXIF_UNIT_NOUNIT = 1,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
158 EXIF_UNIT_INCH = 2,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
159 EXIF_UNIT_CENTIMETER = 3
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
160 } ExifUnitType;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
161
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
162
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
163 /* the known exif tags list */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
164 extern ExifMarker ExifKnownMarkersList[];
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
165
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
166 /* the unknown tags utilize this generic list */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
167 extern ExifMarker ExifUnknownMarkersList[];
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
168
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
169 /* the list of specially formatted keys, for human readable output */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
170 extern ExifFormattedText ExifFormattedList[];
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
171
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
172
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
173 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
174 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
175 * functions
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
176 *-----------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
177 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
178
114
50fc73e08550 Mon Nov 27 01:23:23 2006 John Ellis <johne@verizon.net>
gqview
parents: 110
diff changeset
179 ExifData *exif_read(const gchar *path, gint parse_color_profile);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
180 void exif_free(ExifData *exif);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
181
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
182 gchar *exif_get_data_as_text(ExifData *exif, const gchar *key);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
183 gint exif_get_integer(ExifData *exif, const gchar *key, gint *value);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
184 ExifRational *exif_get_rational(ExifData *exif, const gchar *key, gint *sign);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
185 double exif_rational_to_double(ExifRational *r, gint sign);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
186
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
187 ExifItem *exif_get_item(ExifData *exif, const gchar *key);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
188
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
189 const char *exif_item_get_tag_name(ExifItem *item);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
190 const char *exif_item_get_description(ExifItem *item);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
191 const char *exif_item_get_format_name(ExifItem *item, gint brief);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
192 gchar *exif_item_get_data_as_text(ExifItem *item);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
193 gint exif_item_get_integer(ExifItem *item, gint *value);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
194 ExifRational *exif_item_get_rational(ExifItem *item, gint *sign);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
195
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
196 const gchar *exif_get_description_by_key(const gchar *key);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
197
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
198 /* usually for debugging to stdout */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
199 void exif_write_data_list(ExifData *exif, FILE *f, gint human_readable_list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
200
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
201
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
202
54
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
203 /* These funcs for use by makernote/tiff parsers only */
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
204
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
205 #define EXIF_TIFF_MAX_LEVELS 4
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
206
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
207 #define EXIF_TIFD_OFFSET_TAG 0
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
208 #define EXIF_TIFD_OFFSET_FORMAT 2
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
209 #define EXIF_TIFD_OFFSET_COUNT 4
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
210 #define EXIF_TIFD_OFFSET_DATA 8
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
211 #define EXIF_TIFD_SIZE 12
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
212
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
213
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
214 guint16 exif_byte_get_int16(unsigned char *f, ExifByteOrder bo);
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
215 guint32 exif_byte_get_int32(unsigned char *f, ExifByteOrder bo);
110
9fbf210edc6f Tue Nov 14 15:36:14 2006 John Ellis <johne@verizon.net>
gqview
parents: 106
diff changeset
216 void exif_byte_put_int16(unsigned char *f, guint16 n, ExifByteOrder bo);
9fbf210edc6f Tue Nov 14 15:36:14 2006 John Ellis <johne@verizon.net>
gqview
parents: 106
diff changeset
217 void exif_byte_put_int32(unsigned char *f, guint32 n, ExifByteOrder bo);
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
218
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
219 ExifItem *exif_item_new(ExifFormatType format, guint tag,
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
220 guint elements, const ExifMarker *marker);
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
221 void exif_item_copy_data(ExifItem *item, void *src, guint len,
54
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
222 ExifFormatType src_format, ExifByteOrder bo);
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
223
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
224 gint exif_parse_IFD_table(ExifData *exif,
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
225 unsigned char *tiff, guint offset,
54
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
226 guint size, ExifByteOrder bo,
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
227 gint level,
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
228 const ExifMarker *list);
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
229
54
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
230 gint exif_tiff_directory_offset(unsigned char *data, const guint len,
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
231 guint *offset, ExifByteOrder *bo);
b58cac75ad12 Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents: 51
diff changeset
232 gint exif_tiff_parse(ExifData *exif, unsigned char *tiff, guint size, ExifMarker *list);
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
233
57
a8c9992320f4 Fri Jun 10 20:57:42 2005 John Ellis <johne@verizon.net>
gqview
parents: 54
diff changeset
234 gchar *exif_text_list_find_value(ExifTextList *list, guint value);
a8c9992320f4 Fri Jun 10 20:57:42 2005 John Ellis <johne@verizon.net>
gqview
parents: 54
diff changeset
235
47
aa4c0e1b54b0 Fri Jun 3 01:49:20 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
236
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
237 #endif
51
276ea4c98d33 Sat Jun 4 22:24:00 2005 John Ellis <johne@verizon.net>
gqview
parents: 47
diff changeset
238