35 #define CF(format,target,v,maxlen) \
37 if (format != target) { \
38 snprintf (v, maxlen, \
39 _("Invalid format '%s', " \
41 exif_format_get_name (format), \
42 exif_format_get_name (target)); \
47 #define CC(number,target,v,maxlen) \
49 if (number != target) { \
50 snprintf (v, maxlen, \
51 _("Invalid number of components (%i, " \
52 "expected %i)."), (int) number, (int) target); \
57 #define CC2(number,t1,t2,v,maxlen) \
59 if ((number != t1) && (number != t2)) { \
60 snprintf (v, maxlen, \
61 _("Invalid number of components (%i, " \
62 "expected %i or %i)."), (int) number, \
63 (int) t1, (int) t2); \
75 #ifndef NO_VERBOSE_TAG_DATA
78 {1,
N_(
"Night scene")},
80 {4,
N_(
"Multi-exposure")},
85 {2,
N_(
"Best")},{0,NULL}}},
94 {6,
N_(
"Red-eye reduction")},
101 {4,
N_(
"Fluorescent")},
127 {2,
N_(
"Black & white")},
132 {1,
N_(
"Night scene")},
134 {4,
N_(
"Multi-exposure")},
150 {8,
N_(
"2560x1920 or 2304x1728")},
156 {22,
N_(
"2304x1728 or 2592x1944")},
158 {25,
N_(
"2816x2212 or 2816x2112")},
163 { {0,
N_(
"Program")},
164 {2,
N_(
"Program AE")},
167 {6,
N_(
"Landscape")},
169 {9,
N_(
"Night scene")},
171 {12,
N_(
"Surf & snow")},
172 {13,
N_(
"Sunset or candlelight")},
175 {17,
N_(
"Fireworks")},
177 {19,
N_(
"Panorama")},
178 {30,
N_(
"Self portrait")},
179 {31,
N_(
"Illustrations")},
180 {33,
N_(
"Digital filter")},
183 {40,
N_(
"Green mode")},
184 {49,
N_(
"Light pet")},
185 {50,
N_(
"Dark pet")},
186 {51,
N_(
"Medium pet")},
187 {53,
N_(
"Underwater")},
188 {54,
N_(
"Candlelight")},
189 {55,
N_(
"Natural skin tone")},
190 {56,
N_(
"Synchro sound record")},
191 {58,
N_(
"Frame composite")},
194 { {0x0000,
N_(
"Auto, did not fire")},
196 {0x0003,
N_(
"Auto, did not fire, red-eye reduction")},
197 {0x0100,
N_(
"Auto, fired")},
199 {0x0103,
N_(
"Auto, fired, red-eye reduction")},
200 {0x0104,
N_(
"On, red-eye reduction")},
201 {0x0105,
N_(
"On, wireless")},
202 {0x0108,
N_(
"On, soft")},
203 {0x0109,
N_(
"On, slow-sync")},
204 {0x010a,
N_(
"On, slow-sync, red-eye reduction")},
205 {0x010b,
N_(
"On, trailing-curtain sync")},
212 {5,
N_(
"Pan focus")},
217 { {1,
N_(
"Upper-left")},
219 {3,
N_(
"Upper-right")},
223 {7,
N_(
"Mid-right")},
225 {9,
N_(
"Lower-left")},
227 {11,
N_(
"Lower-right")},
228 {0xfffe,
N_(
"Fixed center")},
229 {0xffff,
N_(
"Auto")},
232 { {0,
N_(
"Multiple")},
234 {2,
N_(
"Top-center")},
235 {3,
N_(
"Top-right")},
239 {7,
N_(
"Bottom-left")},
240 {8,
N_(
"Bottom-center")},
241 {9,
N_(
"Bottom-right")},
242 {0xffff,
N_(
"None")},
248 {3,
N_(
"Fluorescent")},
251 {6,
N_(
"Daylight fluorescent")},
252 {7,
N_(
"Day white fluorescent")},
253 {8,
N_(
"White fluorescent")},
256 {0xfffe,
N_(
"Unknown")},
257 {0xffff,
N_(
"User selected")},
268 static const struct {
275 #ifndef NO_VERBOSE_TAG_DATA
277 { {0, 0,
"2304x1728"},
281 {34, 0,
"1536x1024"},
282 {36, 0,
N_(
"3008x2008 or 3040x2024")},
283 {37, 0,
"3008x2000"},
284 {35, 1,
"2400x1600"},
287 {34, 2,
"1536x1024"},
290 { {0, 0,
N_(
"Auto")},
291 {5, 0,
N_(
"Portrait")},
292 {53, 0,
N_(
"Underwater")},
293 {255, 0,
N_(
"Digital filter?")},
294 {5, 1,
N_(
"Portrait")},
295 {9, 1,
N_(
"Night scene")},
296 {13, 1,
N_(
"Candlelight")},
297 {15, 1,
N_(
"Macro")},
298 {53, 1,
N_(
"Underwater")},
299 {0, 2,
N_(
"Program AE")},
300 {5, 2,
N_(
"Portrait")},
301 {6, 2,
N_(
"Landscape")},
309 char *val,
unsigned int maxlen)
317 if (!entry)
return (NULL);
319 memset (val, 0, maxlen);
322 switch (entry->
tag) {
349 for (i = 0; (
items[i].tag &&
items[i].tag != entry->
tag); i++);
351 snprintf (val, maxlen,
352 _(
"Internal error (unknown value %hu)"), vs);
357 for (j = 0;
items[i].elem[j].string &&
358 (
items[i].elem[j].index < vs); j++);
360 snprintf (val, maxlen,
361 _(
"Internal error (unknown value %hu)"), vs);
364 strncpy (val,
_(
items[i].
elem[j].
string), maxlen);
375 snprintf (val, maxlen,
376 _(
"Internal error (unknown value %hu %hu)"), vs, vs2);
381 for (j = 0;
items2[i].elem[j].string && ((
items2[i].elem[j].index2 < vs2)
384 snprintf (val, maxlen,
385 _(
"Internal error (unknown value %hi %hi)"), vs, vs2);
388 strncpy (val,
_(
items2[i].
elem[j].
string), maxlen);
396 snprintf (val, maxlen,
"%lu", (
long unsigned) vl);
401 snprintf (val, maxlen,
_(
"%i bytes unknown data"),
408 strncpy (val, (
char*)entry->
data,
MIN(maxlen, entry->
size));
415 snprintf (val, maxlen,
"%hi:%02i:%02i", vs, entry->
data[2], entry->
data[3]);
420 snprintf (val, maxlen,
"%02i:%02i:%02i", entry->
data[0], entry->
data[1], entry->
data[2]);
425 strncpy (val, (
char *)entry->
data,
MIN(maxlen, entry->
size));
429 const unsigned char *data = entry->
data;
430 size_t k, len = strlen(val), sizeleft;
432 sizeleft = entry->
size;
437 snprintf (val+len, maxlen-len,
"%hu ", vs);
446 const unsigned char *data = entry->
data;
447 size_t k, len = strlen(val), sizeleft;
449 sizeleft = entry->
size;
454 snprintf (val+len, maxlen-len,
"%hi ", vss);
463 const unsigned char *data = entry->
data;
464 size_t k, len = strlen(val), sizeleft;
466 sizeleft = entry->
size;
471 snprintf (val+len, maxlen-len,
"%lu ", (
long unsigned) vl);
480 const unsigned char *data = entry->
data;
481 size_t k, len = strlen(val), sizeleft;
483 sizeleft = entry->
size;
488 snprintf (val+len, maxlen-len,
"%li ", (
long int) vsl);
497 snprintf (val, maxlen,
_(
"%i bytes unknown data"),
@ EXIF_BYTE_ORDER_MOTOROLA
Big-endian byte order.
ExifLong exif_get_long(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifLong value from memory.
ExifShort exif_get_short(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifShort value from memory.
ExifSLong exif_get_slong(const unsigned char *b, ExifByteOrder order)
Retrieve an ExifSLong value from memory.
ExifSShort exif_get_sshort(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifSShort value from memory.
EXIF data manipulation functions and types.
uint32_t ExifLong
EXIF Unsigned Long data type.
int32_t ExifSLong
EXIF Signed Long data type.
uint16_t ExifShort
EXIF Unsigned Short data type.
int16_t ExifSShort
EXIF Signed Short data type.
#define CC(number, target, v, maxlen)
static const struct @17 items2[]
static const struct @16 items[]
#define CF(format, target, v, maxlen)
#define CC2(number, t1, t2, v, maxlen)
char * mnote_pentax_entry_get_value(MnotePentaxEntry *entry, char *val, unsigned int maxlen)
enum _MnotePentaxTag MnotePentaxTag
@ MNOTE_PENTAX2_TAG_FLASH_MODE
@ MNOTE_PENTAX2_TAG_QUALITY
@ MNOTE_PENTAX_TAG_SHARPNESS
@ MNOTE_PENTAX2_TAG_AUTO_AFPOINT
@ MNOTE_PENTAX_TAG_TZ_DST
@ MNOTE_PENTAX_TAG_CONTRAST
@ MNOTE_PENTAX_TAG_QUALITY
@ MNOTE_PENTAX2_TAG_IMAGE_SIZE
@ MNOTE_PENTAX_TAG_SATURATION
@ MNOTE_PENTAX2_TAG_AFPOINT_SELECTED
@ MNOTE_PENTAX2_TAG_FOCUS_MODE
@ MNOTE_CASIO2_TAG_BESTSHOT_MODE
@ MNOTE_PENTAX_TAG_ISO_SPEED
@ MNOTE_PENTAX2_TAG_PICTURE_MODE
@ MNOTE_PENTAX_TAG_WHITE_BALANCE
@ MNOTE_PENTAX2_TAG_WHITE_BALANCE
@ MNOTE_PENTAX_TAG_PRINTIM
@ MNOTE_PENTAX_TAG_TZ_CITY