31 #define CF(format,target,v,maxlen) \
33 if (format != target) { \
34 snprintf (v, maxlen, \
35 _("Invalid format '%s', " \
37 exif_format_get_name (format), \
38 exif_format_get_name (target)); \
43 #define CC(number,target,v,maxlen) \
45 if (number != target) { \
46 snprintf (v, maxlen, \
47 _("Invalid number of components (%i, " \
48 "expected %i)."), (int) number, (int) target); \
60 #ifndef NO_VERBOSE_TAG_DATA
67 {0x0082,
N_(
"Medium soft")},
68 {0x0084,
N_(
"Medium hard")},
69 {0x8000,
N_(
"Film simulation mode")},
74 {0x100,
N_(
"Daylight")},
75 {0x200,
N_(
"Cloudy")},
76 {0x300,
N_(
"Daylight fluorescent")},
77 {0x301,
N_(
"Day white fluorescent")},
78 {0x302,
N_(
"White fluorescent")},
79 {0x400,
N_(
"Incandescent")},
81 {0xF00,
N_(
"Custom")},
84 { {0,
N_(
"Standard")},
85 {0x0080,
N_(
"Medium high")},
87 {0x0180,
N_(
"Medium low")},
88 {0x0200,
N_(
"Original")},
89 {0x0300,
N_(
"Black & white")},
90 {0x8000,
N_(
"Film simulation mode")},
93 { {0,
N_(
"Standard")},
94 {0x0080,
N_(
"Medium hard")},
96 {0x0180,
N_(
"Medium soft")},
97 {0x0200,
N_(
"Original")},
98 {0x8000,
N_(
"Film simulation mode")},
104 {3,
N_(
"Red-eye reduction")},
121 {2,
N_(
"Landscape")},
124 {6,
N_(
"Program AE")},
125 {7,
N_(
"Natural photo")},
126 {8,
N_(
"Vibration reduction")},
127 {0x000A,
N_(
"Sunset")},
128 {0x000B,
N_(
"Museum")},
129 {0x000C,
N_(
"Party")},
130 {0x000D,
N_(
"Flower")},
131 {0x000E,
N_(
"Text")},
132 {0x000F,
N_(
"NP & flash")},
133 {0x0010,
N_(
"Beach")},
134 {0x0011,
N_(
"Snow")},
135 {0x0012,
N_(
"Fireworks")},
136 {0x0013,
N_(
"Underwater")},
137 {0x0100,
N_(
"Aperture priority AE")},
138 {0x0200,
N_(
"Shutter priority AE")},
139 {0x0300,
N_(
"Manual exposure")},
146 { {0x00,
N_(
"F-Standard")},
147 {0x10,
N_(
"F-Chrome")},
151 { {0,
N_(
"No blur")},
152 {1,
N_(
"Blur warning")},
155 { {0,
N_(
"Focus good")},
156 {1,
N_(
"Out of focus")},
159 { {0,
N_(
"AE good")},
160 {1,
N_(
"Over exposed")},
163 { {1,
N_(
"Standard")},
167 { {0,
N_(
"F0/Standard")},
168 {0x0100,
N_(
"F1/Studio portrait")},
169 {0x0110,
N_(
"F1a/Professional portrait")},
170 {0x0120,
N_(
"F1b/Professional portrait")},
171 {0x0130,
N_(
"F1c/Professional portrait")},
172 {0x0200,
N_(
"F2/Fujichrome")},
173 {0x0300,
N_(
"F3/Studio portrait Ex")},
174 {0x0400,
N_(
"F4/Velvia")},
177 { {0,
N_(
"Auto (100-400%)")},
179 {0x0100,
N_(
"Standard (100%)")},
180 {0x0200,
N_(
"Wide1 (230%)")},
181 {0x0201,
N_(
"Wide2 (400%)")},
182 {0x8000,
N_(
"Film simulation mode")},
191 char *val,
unsigned int maxlen)
201 if (!entry)
return (NULL);
203 memset (val, 0, maxlen);
206 switch (entry->
tag) {
210 memcpy (val, entry->
data,
MIN(maxlen, entry->
size));
234 for (i = 0; (
items[i].tag &&
items[i].tag != entry->
tag); i++);
236 snprintf (val, maxlen,
237 _(
"Internal error (unknown value %i)"), vs);
242 for (j = 0;
items[i].elem[j].string &&
243 (
items[i].elem[j].index < vs); j++);
245 snprintf (val, maxlen,
246 _(
"Internal error (unknown value %i)"), vs);
249 strncpy (val,
_(
items[i].
elem[j].
string), maxlen);
256 snprintf (val, maxlen,
"%i, %i", vs, vs2);
264 snprintf (val, maxlen,
_(
"%2.2f mm"), (
double) vr.
numerator /
271 strncpy (val, (
char *)entry->
data,
MIN(maxlen, entry->
size));
275 snprintf (val, maxlen,
"%hu", vs);
279 snprintf (val, maxlen,
"%hi", vss);
283 snprintf (val, maxlen,
"%lu", (
long unsigned) vl);
287 snprintf (val, maxlen,
"%li", (
long int) vsl);
292 snprintf (val, maxlen,
"%2.4f", (
double) vr.
numerator /
298 snprintf (val, maxlen,
"%2.4f", (
double) vsr.
numerator /
303 snprintf (val, maxlen,
_(
"%i bytes unknown data"),
ExifRational exif_get_rational(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifRational value from memory.
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.
ExifSRational exif_get_srational(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifSRational value from memory.
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)
char * mnote_fuji_entry_get_value(MnoteFujiEntry *entry, char *val, unsigned int maxlen)
#define CF(format, target, v, maxlen)
static const struct @10 items[]
enum _MnoteFujiTag MnoteFujiTag
@ MNOTE_FUJI_TAG_MAX_FOCAL_LENGTH
@ MNOTE_FUJI_TAG_DYNAMIC_RANGE_SETTING
@ MNOTE_FUJI_TAG_FLASH_MODE
@ MNOTE_FUJI_TAG_WHITE_BALANCE
@ MNOTE_FUJI_TAG_SHARPNESS
@ MNOTE_FUJI_TAG_CONT_TAKING
@ MNOTE_FUJI_TAG_BLUR_CHECK
@ MNOTE_FUJI_TAG_SLOW_SYNC
@ MNOTE_FUJI_TAG_PICTURE_MODE
@ MNOTE_FUJI_TAG_FINEPIX_COLOR
@ MNOTE_FUJI_TAG_AUTO_EXPOSURE_CHECK
@ MNOTE_FUJI_TAG_FOCUS_POINT
@ MNOTE_FUJI_TAG_DYNAMIC_RANGE
@ MNOTE_FUJI_TAG_MIN_FOCAL_LENGTH
@ MNOTE_FUJI_TAG_FILM_MODE
@ MNOTE_FUJI_TAG_FOCUS_MODE
@ MNOTE_FUJI_TAG_FOCUS_CHECK
EXIF Unsigned Rational data type.
EXIF Signed Rational data type.