Exiv2
tags_int.hpp
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 #ifndef TAGS_INT_HPP_
4 #define TAGS_INT_HPP_
5 
6 // *****************************************************************************
7 // included header files
8 #include "error.hpp"
9 #include "tags.hpp"
10 
11 // *****************************************************************************
12 // namespace extensions
13 
14 namespace Exiv2::Internal {
15 // *****************************************************************************
16 // class definitions
17 
19 struct SectionInfo {
21  const char* name_;
22  const char* desc_;
23 };
24 
29 struct TagDetails {
30  int64_t val_;
31  const char* label_;
32 
34  bool operator==(int64_t key) const {
35  return val_ == key;
36  }
37 }; // struct TagDetails
38 
44  const char* val_;
45  const char* label_;
46 
48  bool operator==(const std::string& key) const {
49  return (key == val_);
50  }
51 }; // struct TagDetails
52 
57 using TagDetailsBitmask = std::pair<uint32_t, const char*>;
58 
66 using TagDetailsBitlistSorted = std::pair<uint32_t, const char*>;
67 
72 struct TagVocabulary {
73  const char* voc_;
74  const char* label_;
75 
83  bool operator==(const std::string& key) const;
84 }; // struct TagDetails
85 
90 template <size_t N, const StringTagDetails (&array)[N]>
91 std::ostream& printTagString(std::ostream& os, const std::string& value, const ExifData*) {
92  if (auto td = Exiv2::find(array, value)) {
93  os << exvGettext(td->label_);
94  } else {
95  os << "(" << value << ")";
96  }
97  return os;
98 }
99 
104 template <size_t N, const StringTagDetails (&array)[N]>
105 std::ostream& printTagString(std::ostream& os, const Value& value, const ExifData* data) {
106  return printTagString<N, array>(os, value.toString(0), data);
107 }
108 
110 #define EXV_PRINT_STRING_TAG_1(array) printTagString<std::size(array), array>
111 
116 template <size_t N, const StringTagDetails (&array)[N]>
117 std::ostream& printTagString2(std::ostream& os, const Value& value, const ExifData* data) {
118  if (value.count() < 2)
119  return os << "(" << value << ")";
120  std::string temp = value.toString(0) + " " + value.toString(1);
121  return printTagString<N, array>(os, temp, data);
122 }
123 
125 #define EXV_PRINT_STRING_TAG_2(array) printTagString2<std::size(array), array>
126 
131 template <size_t N, const StringTagDetails (&array)[N]>
132 std::ostream& printTagString4(std::ostream& os, const Value& value, const ExifData* data) {
133  if (value.count() < 4)
134  return os << "(" << value << ")";
135  std::string temp = value.toString(0) + " " + value.toString(1) + " " + value.toString(2) + " " + value.toString(3);
136  return printTagString<N, array>(os, temp, data);
137 }
138 
140 #define EXV_PRINT_STRING_TAG_4(array) printTagString4<std::size(array), array>
141 
146 template <size_t N, const TagDetails (&array)[N]>
147 std::ostream& printTagNoError(std::ostream& os, const int64_t value, const ExifData*) {
148  if (auto td = Exiv2::find(array, value)) {
149  os << exvGettext(td->label_);
150  } else {
151  os << value;
152  }
153  return os;
154 }
155 
160 template <size_t N, const TagDetails (&array)[N]>
161 std::ostream& printTagNoError(std::ostream& os, const Value& value, const ExifData* data) {
162  return printTagNoError<N, array>(os, value.toInt64(), data);
163 }
164 
166 #define EXV_PRINT_TAG_NO_ERROR(array) printTagNoError<std::size(array), array>
167 
172 template <size_t N, const TagDetails (&array)[N]>
173 std::ostream& printTag(std::ostream& os, const int64_t value, const ExifData*) {
174  if (auto td = Exiv2::find(array, value)) {
175  os << exvGettext(td->label_);
176  } else {
177  os << "(" << value << ")";
178  }
179  return os;
180 }
181 
186 template <size_t N, const TagDetails (&array)[N]>
187 std::ostream& printTag(std::ostream& os, const Value& value, const ExifData* data) {
188  return printTag<N, array>(os, value.toInt64(), data);
189 }
190 
192 #define EXV_PRINT_TAG(array) printTag<std::size(array), array>
193 
198 template <size_t N, const TagDetailsBitmask (&array)[N]>
199 std::ostream& printTagBitmask(std::ostream& os, const Value& value, const ExifData*) {
200  const auto val = value.toUint32();
201  if (val == 0 && N > 0) {
202  auto [mask, label] = *array;
203  if (mask == 0)
204  return os << exvGettext(label);
205  }
206  bool sep = false;
207  for (size_t i = 0; i < N; ++i) {
208  auto [mask, label] = *(array + i);
209 
210  if (val & mask) {
211  if (sep) {
212  os << ", " << exvGettext(label);
213  } else {
214  os << exvGettext(label);
215  sep = true;
216  }
217  }
218  }
219  return os;
220 }
221 
223 #define EXV_PRINT_TAG_BITMASK(array) printTagBitmask<std::size(array), array>
224 
231 template <size_t N, const TagDetailsBitlistSorted (&array)[N]>
232 std::ostream& printTagBitlistAllLE(std::ostream& os, const Value& value, const ExifData*) {
233  if constexpr (N == 0)
234  throw Error(ErrorCode::kerErrorMessage, std::string("Passed zero length TagDetailsBitlistSorted"));
235 
236  uint32_t vN = 0;
237  uint32_t currentVNBit = 0;
238  size_t lastArrayPos = 0; // Prevents unneeded searching of array
239  constexpr auto maxArrayBit = (array + N - 1)->first;
240  auto allVNZero = true;
241  auto useSep = false;
242 
243  // For each value
244  for (size_t i = 0; i < value.count(); i++) {
245  vN = value.toUint32(i);
246  if (vN == 0) { // If all bits zero, then nothing to process
247  currentVNBit += 8;
248  continue;
249  }
250  allVNZero = false;
251  // Cycle through every bit in that byte
252  for (auto j = 0; j < 8; j++, currentVNBit++) {
253  if ((vN >> j & 0x01) == 0) { // If bit not set, then nothing to process
254  continue;
255  }
256  if (currentVNBit > maxArrayBit) { // If beyond array values, output unknown index
257  os << ", [" << currentVNBit << "]";
258  continue;
259  }
260 
261  // Check to see if the numbered bit is found in the array
262  for (size_t k = lastArrayPos; k < N; ++k) {
263  auto [bit, label] = *(array + k);
264 
265  if (currentVNBit == bit) {
266  lastArrayPos = k;
267  if (useSep) {
268  os << ", " << exvGettext(label);
269  } else {
270  os << exvGettext(label);
271  useSep = true;
272  }
273  break;
274  }
275  }
276  }
277  }
278  if (allVNZero)
279  os << exvGettext("None");
280  return os;
281 }
282 
284 #define EXV_PRINT_TAG_BITLIST_ALL_LE(array) printTagBitlistAllLE<std::size(array), array>
285 
290 template <size_t N, const TagVocabulary (&array)[N]>
291 std::ostream& printTagVocabulary(std::ostream& os, const Value& value, const ExifData*) {
292  if (auto td = Exiv2::find(array, value.toString())) {
293  os << exvGettext(td->label_);
294  } else {
295  os << "(" << value << ")";
296  }
297  return os;
298 }
299 
301 #define EXV_PRINT_VOCABULARY(array) printTagVocabulary<std::size(array), array>
302 
303 template <size_t N, const TagVocabulary (&array)[N]>
304 std::ostream& printTagVocabularyMulti(std::ostream& os, const Value& value, const ExifData*) {
305  if (value.count() == 0) {
306  os << "(" << value << ")";
307  return os;
308  }
309 
310  for (size_t i = 0; i < value.count(); i++) {
311  if (i != 0)
312  os << ", ";
313  auto td = Exiv2::find(array, value.toString(i));
314  if (td) {
315  os << exvGettext(td->label_);
316  } else {
317  os << "(" << value.toString(i) << ")";
318  }
319  }
320 
321  return os;
322 }
323 
325 #define EXV_PRINT_VOCABULARY_MULTI(array) printTagVocabularyMulti<std::size(array), array>
326 
327 // *****************************************************************************
328 // free functions
329 
331 const TagInfo* ifdTagList();
333 const TagInfo* exifTagList();
335 const TagInfo* iopTagList();
337 const TagInfo* gpsTagList();
339 const TagInfo* mnTagList();
341 const TagInfo* mpfTagList();
342 
343 const GroupInfo* groupList();
344 const TagInfo* tagList(const std::string& groupName);
345 
347 IfdId groupId(const std::string& groupName);
349 const char* ifdName(IfdId ifdId);
351 const char* groupName(IfdId ifdId);
352 
354 bool isMakerIfd(IfdId ifdId);
356 bool isExifIfd(IfdId ifdId);
357 
359 void taglist(std::ostream& os, IfdId ifdId);
361 const TagInfo* tagList(IfdId ifdId);
363 const TagInfo* tagInfo(uint16_t tag, IfdId ifdId);
365 const TagInfo* tagInfo(const std::string& tagName, IfdId ifdId);
373 uint16_t tagNumber(const std::string& tagName, IfdId ifdId);
374 
376 
377 std::ostream& printValue(std::ostream& os, const Value& value, const ExifData*);
380 std::ostream& printInt64(std::ostream& os, const Value& value, const ExifData*);
382 std::ostream& printFloat(std::ostream& os, const Value& value, const ExifData*);
384 std::ostream& printDegrees(std::ostream& os, const Value& value, const ExifData*);
386 std::ostream& printUcs2(std::ostream& os, const Value& value, const ExifData*);
388 std::ostream& printExifUnit(std::ostream& os, const Value& value, const ExifData*);
390 std::ostream& printLensSpecification(std::ostream& os, const Value& value, const ExifData*);
392 std::ostream& print0x0000(std::ostream& os, const Value& value, const ExifData*);
394 std::ostream& print0x0005(std::ostream& os, const Value& value, const ExifData*);
396 std::ostream& print0x0006(std::ostream& os, const Value& value, const ExifData*);
398 std::ostream& print0x0007(std::ostream& os, const Value& value, const ExifData*);
400 std::ostream& print0x0009(std::ostream& os, const Value& value, const ExifData*);
402 std::ostream& print0x000a(std::ostream& os, const Value& value, const ExifData*);
404 std::ostream& print0x000c(std::ostream& os, const Value& value, const ExifData*);
406 std::ostream& print0x0019(std::ostream& os, const Value& value, const ExifData*);
408 std::ostream& print0x001e(std::ostream& os, const Value& value, const ExifData*);
410 std::ostream& print0x0112(std::ostream& os, const Value& value, const ExifData*);
412 std::ostream& print0x0213(std::ostream& os, const Value& value, const ExifData*);
414 std::ostream& print0x8298(std::ostream& os, const Value& value, const ExifData*);
416 std::ostream& print0x829a(std::ostream& os, const Value& value, const ExifData*);
418 std::ostream& print0x829d(std::ostream& os, const Value& value, const ExifData*);
420 std::ostream& print0x8822(std::ostream& os, const Value& value, const ExifData*);
422 std::ostream& print0x8827(std::ostream& os, const Value& value, const ExifData*);
424 std::ostream& print0x9101(std::ostream& os, const Value& value, const ExifData*);
426 std::ostream& print0x9201(std::ostream& os, const Value& value, const ExifData*);
428 std::ostream& print0x9202(std::ostream& os, const Value& value, const ExifData*);
430 std::ostream& print0x9204(std::ostream& os, const Value& value, const ExifData*);
432 std::ostream& print0x9206(std::ostream& os, const Value& value, const ExifData*);
434 std::ostream& print0x9207(std::ostream& os, const Value& value, const ExifData*);
436 std::ostream& print0x9208(std::ostream& os, const Value& value, const ExifData*);
438 std::ostream& print0x920a(std::ostream& os, const Value& value, const ExifData*);
440 std::ostream& print0xa001(std::ostream& os, const Value& value, const ExifData*);
442 std::ostream& print0xa217(std::ostream& os, const Value& value, const ExifData*);
444 std::ostream& print0xa300(std::ostream& os, const Value& value, const ExifData*);
446 std::ostream& print0xa301(std::ostream& os, const Value& value, const ExifData*);
448 std::ostream& print0xa401(std::ostream& os, const Value& value, const ExifData*);
450 std::ostream& print0xa402(std::ostream& os, const Value& value, const ExifData*);
452 std::ostream& print0xa403(std::ostream& os, const Value& value, const ExifData*);
454 std::ostream& print0xa404(std::ostream& os, const Value& value, const ExifData*);
456 std::ostream& print0xa405(std::ostream& os, const Value& value, const ExifData*);
458 std::ostream& print0xa406(std::ostream& os, const Value& value, const ExifData*);
460 std::ostream& print0xa407(std::ostream& os, const Value& value, const ExifData*);
462 std::ostream& print0xa409(std::ostream& os, const Value& value, const ExifData*);
464 std::ostream& print0xa40c(std::ostream& os, const Value& value, const ExifData*);
466 std::ostream& printGPSDirRef(std::ostream& os, const Value& value, const ExifData*);
468 std::ostream& printNormalSoftHard(std::ostream& os, const Value& value, const ExifData*);
470 std::ostream& printExifVersion(std::ostream& os, const Value& value, const ExifData*);
472 std::ostream& printXmpVersion(std::ostream& os, const Value& value, const ExifData*);
474 std::ostream& printXmpDate(std::ostream& os, const Value& value, const ExifData*);
477 std::ostream& printBitmask(std::ostream& os, const Value& value, const ExifData*);
479 
481 float fnumber(float apertureValue);
482 
485 
486 } // namespace Exiv2::Internal
487 
488 #endif // #ifndef TAGS_INT_HPP_
const char * desc_
Section description.
Definition: tags_int.hpp:22
const char * ifdName(IfdId ifdId)
Return the name of the IFD.
Definition: tags_int.cpp:2471
std::ostream & print0x0009(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS status.
Definition: tags_int.cpp:2773
uint16_t tagNumber(const std::string &tagName, IfdId ifdId)
Return the tag number for one combination of IFD id and tagName. If the tagName is not known...
Definition: tags_int.cpp:2539
EXIV2API ExifData::const_iterator shutterSpeedValue(const ExifData &ed)
Return the shutter speed value. Please keep in mind that this accessor is provided for convenience on...
Definition: easyaccess.cpp:371
Helper structure for lookup tables for translations of numeric tag values to human readable labels...
Definition: tags_int.hpp:29
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:373
const TagInfo * iopTagList()
Return read-only list of built-in IOP tags.
Definition: tags_int.cpp:2372
std::ostream & print0xa300(std::ostream &os, const Value &value, const ExifData *metadata)
Print file source.
Definition: tags_int.cpp:3032
std::ostream & printValue(std::ostream &os, const Value &value, const ExifData *)
Default print function, using the Value output operator.
Definition: tags_int.cpp:2483
std::ostream & printTagVocabulary(std::ostream &os, const Value &value, const ExifData *)
Generic pretty-print function to translate a controlled vocabulary value (string) to a description by...
Definition: tags_int.hpp:291
int64_t val_
Tag value.
Definition: tags_int.hpp:30
std::ostream & print0xa403(std::ostream &os, const Value &value, const ExifData *metadata)
Print white balance.
Definition: tags_int.cpp:3060
Simple error class used for exceptions. An output operator is provided to print errors to a stream...
Definition: error.hpp:235
std::ostream & print0xa404(std::ostream &os, const Value &value, const ExifData *)
Print digital zoom ratio.
Definition: tags_int.cpp:3064
std::ostream & printTagBitlistAllLE(std::ostream &os, const Value &value, const ExifData *)
Generic print function to translate the bits in the values by looking up the indices in a reference t...
Definition: tags_int.hpp:232
IfdId groupId(const std::string &groupName)
Return the group id for a group name.
Definition: tags_int.cpp:2465
std::ostream & printTagNoError(std::ostream &os, const int64_t value, const ExifData *)
Generic pretty-print function to translate a long value to a description by looking up a reference ta...
Definition: tags_int.hpp:147
bool operator==(const std::string &key) const
Comparison operator for use with the find template.
Definition: tags.cpp:48
std::ostream & print0xa406(std::ostream &os, const Value &value, const ExifData *metadata)
Print scene capture type.
Definition: tags_int.cpp:3096
std::ostream & print0x0007(std::ostream &os, const Value &value, const ExifData *)
Print GPS timestamp.
Definition: tags_int.cpp:2738
const char * label_
Translation of the tag value.
Definition: tags_int.hpp:31
std::ostream & print0x9101(std::ostream &os, const Value &value, const ExifData *)
Print components configuration specific to compressed data.
Definition: tags_int.cpp:2873
std::ostream & printLensSpecification(std::ostream &os, const Value &value, const ExifData *)
Print function for lens specification.
Definition: tags_int.cpp:2633
const TagInfo * tagInfo(uint16_t tag, IfdId ifdId)
Return the tag info for tag and ifdId.
Definition: tags_int.cpp:2439
const TagInfo * tagList(IfdId ifdId)
Return the tag list for ifdId.
Definition: tags_int.cpp:2432
std::ostream & print0x8827(std::ostream &os, const Value &value, const ExifData *)
Print ISO speed ratings.
Definition: tags_int.cpp:2869
std::ostream & print0xa402(std::ostream &os, const Value &value, const ExifData *metadata)
Print exposure mode.
Definition: tags_int.cpp:3053
std::string toString() const
Return the value as a string. Implemented in terms of write(std::ostream& os) const of the concrete c...
Definition: value.cpp:73
std::ostream & printFloat(std::ostream &os, const Value &value, const ExifData *)
Print a Rational or URational value in floating point format.
Definition: tags_int.cpp:2558
The details of a section.
Definition: tags_int.hpp:19
std::ostream & printDegrees(std::ostream &os, const Value &value, const ExifData *)
Print a longitude or latitude value.
Definition: tags_int.cpp:2568
std::ostream & printTagString(std::ostream &os, const std::string &value, const ExifData *)
Generic pretty-print function to translate a full string value to a description by looking up a refer...
Definition: tags_int.hpp:91
virtual size_t count() const =0
Return the number of components of the value.
std::ostream & print0x0000(std::ostream &os, const Value &value, const ExifData *)
Print GPS version.
Definition: tags_int.cpp:2705
const char * name_
Section name (one word)
Definition: tags_int.hpp:21
std::ostream & print0x9208(std::ostream &os, const Value &value, const ExifData *metadata)
Print light source.
Definition: tags_int.cpp:2981
std::ostream & print0x9206(std::ostream &os, const Value &value, const ExifData *)
Print the subject distance.
Definition: tags_int.cpp:2951
std::ostream & printTag(std::ostream &os, const int64_t value, const ExifData *)
Generic pretty-print function to translate a long value to a description by looking up a reference ta...
Definition: tags_int.hpp:173
std::ostream & print0x8298(std::ostream &os, const Value &value, const ExifData *)
Print the copyright.
Definition: tags_int.cpp:2803
std::ostream & print0xa401(std::ostream &os, const Value &value, const ExifData *metadata)
Print custom rendered.
Definition: tags_int.cpp:3046
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags.hpp:34
std::ostream & printTagString4(std::ostream &os, const Value &value, const ExifData *data)
Generic pretty-print function to translate the first 4 values in Value as a string, to a description by looking up a reference table.
Definition: tags_int.hpp:132
bool operator==(const std::string &key) const
Comparison operator for use with the find template.
Definition: tags_int.hpp:48
URational exposureTime(float shutterSpeedValue)
Calculate the exposure time from an APEX shutter speed value.
Definition: tags_int.cpp:2520
const T * find(T(&src)[N], const K &key)
Find an element that matches key in the array src.
Definition: types.hpp:449
std::ostream & print0xa301(std::ostream &os, const Value &value, const ExifData *metadata)
Print scene type.
Definition: tags_int.cpp:3039
std::ostream & print0x001e(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS differential correction.
Definition: tags_int.cpp:2789
Helper structure for lookup tables for translations of string tag values to human readable labels...
Definition: tags_int.hpp:43
std::ostream & print0x9207(std::ostream &os, const Value &value, const ExifData *metadata)
Print metering mode.
Definition: tags_int.cpp:2977
std::ostream & print0xa217(std::ostream &os, const Value &value, const ExifData *metadata)
Print sensing method.
Definition: tags_int.cpp:3021
std::ostream & printTagBitmask(std::ostream &os, const Value &value, const ExifData *)
Generic print function to translate a long value to a description by looking up bitmasks in a referen...
Definition: tags_int.hpp:199
EXIV2API const char * exvGettext(const char *str)
Translate a string using the gettext framework. This wrapper hides all the implementation details fro...
Definition: types.cpp:504
EXIV2API ExifData::const_iterator apertureValue(const ExifData &ed)
Return the aperture value. Please keep in mind that this accessor is provided for convenience only an...
Definition: easyaccess.cpp:379
std::ostream & printUcs2(std::ostream &os, const Value &value, const ExifData *)
Print function converting from UCS-2LE to UTF-8.
Definition: tags_int.cpp:2602
std::ostream & print0x0005(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS altitude ref.
Definition: tags_int.cpp:2719
const TagInfo * mnTagList()
Return read-only list of built-in Exiv2 Makernote info tags.
Definition: tags_int.cpp:2388
std::ostream & print0x9202(std::ostream &os, const Value &value, const ExifData *)
Print f-number converted from APEX aperture value.
Definition: tags_int.cpp:2918
std::ostream & print0x0112(std::ostream &os, const Value &value, const ExifData *metadata)
Print orientation.
Definition: tags_int.cpp:2793
std::ostream & printExifUnit(std::ostream &os, const Value &value, const ExifData *metadata)
Print function for Exif units.
Definition: tags_int.cpp:2629
std::ostream & printTagString2(std::ostream &os, const Value &value, const ExifData *data)
Generic pretty-print function to translate the first 2 values in Value as a string, to a description by looking up a reference table.
Definition: tags_int.hpp:117
std::ostream & print0xa409(std::ostream &os, const Value &value, const ExifData *metadata)
Print saturation.
Definition: tags_int.cpp:3114
std::ostream & print0x0019(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS destination distance ref.
Definition: tags_int.cpp:2785
const TagInfo * ifdTagList()
Return read-only list of built-in IFD0/1 tags.
Definition: tags_int.cpp:1714
const char * val_
Tag value.
Definition: tags_int.hpp:44
std::ostream & print0x0213(std::ostream &os, const Value &value, const ExifData *metadata)
Print YCbCrPositioning.
Definition: tags_int.cpp:2799
std::ostream & print0x829d(std::ostream &os, const Value &value, const ExifData *)
Print the f-number.
Definition: tags_int.cpp:2844
bool operator==(int64_t key) const
Comparison operator for use with the find template.
Definition: tags_int.hpp:34
Helper structure for the Matroska tags lookup table.
Definition: matroskavideo.hpp:39
const char * voc_
Vocabulary string.
Definition: tags_int.hpp:73
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2477
std::ostream & print0x829a(std::ostream &os, const Value &value, const ExifData *)
Print the exposure time.
Definition: tags_int.cpp:2823
const TagInfo * mpfTagList()
Return read-only list of built-in mfp Tags http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/MPF...
Definition: tags_int.cpp:2346
std::ostream & print0x0006(std::ostream &os, const Value &value, const ExifData *)
Print GPS altitude.
Definition: tags_int.cpp:2723
Common interface for all types of values used with metadata.
Definition: value.hpp:33
std::ostream & printGPSDirRef(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS direction ref.
Definition: tags_int.cpp:3131
std::ostream & print0xa407(std::ostream &os, const Value &value, const ExifData *metadata)
Print gain control.
Definition: tags_int.cpp:3107
Helper structure for lookup tables for translations of controlled vocabulary strings to their descrip...
Definition: tags_int.hpp:72
Error class for exceptions, log message class.
std::ostream & print0xa001(std::ostream &os, const Value &value, const ExifData *metadata)
Print color space.
Definition: tags_int.cpp:3006
const TagInfo * exifTagList()
Return read-only list of built-in Exif IFD tags.
Definition: tags_int.cpp:2109
std::ostream & print0x8822(std::ostream &os, const Value &value, const ExifData *metadata)
Print exposure program.
Definition: tags_int.cpp:2865
const char * label_
Translation of the tag value.
Definition: tags_int.hpp:45
float fnumber(float apertureValue)
Calculate F number from an APEX aperture value.
Definition: tags_int.cpp:2512
std::pair< uint32_t, uint32_t > URational
8 byte unsigned rational type.
Definition: types.hpp:29
std::ostream & print0x000c(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS speed ref.
Definition: tags_int.cpp:2781
virtual uint32_t toUint32(size_t n=0) const =0
Convert the n-th component of the value to a float. The behaviour of this method may be undefined if ...
std::ostream & print0x000a(std::ostream &os, const Value &value, const ExifData *metadata)
Print GPS measurement mode.
Definition: tags_int.cpp:2777
std::ostream & print0x9204(std::ostream &os, const Value &value, const ExifData *)
Print the exposure bias value.
Definition: tags_int.cpp:2931
bool isMakerIfd(IfdId ifdId)
Return true if ifdId is a makernote IFD id. (Note: returns false for makerIfd)
Definition: tags_int.cpp:2392
std::ostream & printXmpVersion(std::ostream &os, const Value &value, const ExifData *)
Print any version encoded in the ASCII string majormajorminorminor.
Definition: tags_int.cpp:3156
SectionId sectionId_
Section id.
Definition: tags_int.hpp:20
void taglist(std::ostream &os, IfdId ifdId)
Print the list of tags for ifdId to the output stream os.
Definition: tags_int.cpp:2424
std::ostream & printNormalSoftHard(std::ostream &os, const Value &value, const ExifData *metadata)
Print contrast, sharpness (normal, soft, hard)
Definition: tags_int.cpp:3138
virtual int64_t toInt64(size_t n=0) const =0
Convert the n-th component of the value to an int64_t. The behaviour of this method may be undefined ...
std::ostream & printBitmask(std::ostream &os, const Value &value, const ExifData *metadata)
Print a bitmask as (none) | n | n,m... where: (none) = no bits set | n = bit n from left (0=left-most...
Definition: tags_int.cpp:2487
const char * label_
Description of the vocabulary string.
Definition: tags_int.hpp:74
std::ostream & printInt64(std::ostream &os, const Value &value, const ExifData *)
Print the value converted to a int64_t.
Definition: tags_int.cpp:2551
std::ostream & printExifVersion(std::ostream &os, const Value &value, const ExifData *)
Print any version packed in 4 Bytes format : major major minor minor.
Definition: tags_int.cpp:3142
std::ostream & print0x920a(std::ostream &os, const Value &value, const ExifData *)
Print the actual focal length of the lens.
Definition: tags_int.cpp:2985
const TagInfo * gpsTagList()
Return read-only list of built-in GPS tags.
Definition: tags_int.cpp:2297
std::pair< uint32_t, const char * > TagDetailsBitmask
Helper structure for lookup tables for translations of bitmask values to human readable labels...
Definition: tags_int.hpp:57
std::ostream & printXmpDate(std::ostream &os, const Value &value, const ExifData *)
Print a date following the format YYYY-MM-DDTHH:MM:SSZ.
Definition: tags_int.cpp:3164
std::ostream & print0xa40c(std::ostream &os, const Value &value, const ExifData *metadata)
Print subject distance range.
Definition: tags_int.cpp:3127
SectionId
Section identifiers to logically group tags. A section consists of nothing more than a name...
Definition: tags.hpp:198
bool isExifIfd(IfdId ifdId)
Return true if ifdId is an Exif IFD id.
Definition: tags_int.cpp:2397
std::ostream & print0x9201(std::ostream &os, const Value &value, const ExifData *)
Print exposure time converted from APEX shutter speed value.
Definition: tags_int.cpp:2905
std::ostream & print0xa405(std::ostream &os, const Value &value, const ExifData *)
Print 35mm equivalent focal length.
Definition: tags_int.cpp:3079
std::pair< uint32_t, const char * > TagDetailsBitlistSorted
Helper structure for lookup tables for translations of lists of individual bit values to human readab...
Definition: tags_int.hpp:66