90 template <
size_t N, const StringTagDetails (&array)[N]>
95 os <<
"(" << value <<
")";
104 template <
size_t N, const StringTagDetails (&array)[N]>
106 return printTagString<N, array>(os, value.
toString(0), data);
110 #define EXV_PRINT_STRING_TAG_1(array) printTagString<std::size(array), array>
116 template <
size_t N, const StringTagDetails (&array)[N]>
118 if (value.
count() < 2)
119 return os <<
"(" << value <<
")";
121 return printTagString<N, array>(os, temp, data);
125 #define EXV_PRINT_STRING_TAG_2(array) printTagString2<std::size(array), array>
131 template <
size_t N, const StringTagDetails (&array)[N]>
133 if (value.
count() < 4)
134 return os <<
"(" << value <<
")";
136 return printTagString<N, array>(os, temp, data);
140 #define EXV_PRINT_STRING_TAG_4(array) printTagString4<std::size(array), array>
146 template <
size_t N, const TagDetails (&array)[N]>
160 template <
size_t N, const TagDetails (&array)[N]>
162 return printTagNoError<N, array>(os, value.
toInt64(), data);
166 #define EXV_PRINT_TAG_NO_ERROR(array) printTagNoError<std::size(array), array>
172 template <
size_t N, const TagDetails (&array)[N]>
177 os <<
"(" << value <<
")";
186 template <
size_t N, const TagDetails (&array)[N]>
188 return printTag<N, array>(os, value.
toInt64(), data);
192 #define EXV_PRINT_TAG(array) printTag<std::size(array), array>
198 template <
size_t N, const TagDetailsBitmask (&array)[N]>
201 if (val == 0 && N > 0) {
202 auto [mask, label] = *array;
207 for (
size_t i = 0; i < N; ++i) {
208 auto [mask, label] = *(array + i);
223 #define EXV_PRINT_TAG_BITMASK(array) printTagBitmask<std::size(array), array>
231 template <
size_t N, const TagDetailsBitlistSorted (&array)[N]>
233 if constexpr (N == 0)
234 throw Error(ErrorCode::kerErrorMessage, std::string(
"Passed zero length TagDetailsBitlistSorted"));
237 uint32_t currentVNBit = 0;
238 size_t lastArrayPos = 0;
239 constexpr
auto maxArrayBit = (array + N - 1)->first;
240 auto allVNZero =
true;
244 for (
size_t i = 0; i < value.
count(); i++) {
252 for (
auto j = 0; j < 8; j++, currentVNBit++) {
253 if ((vN >> j & 0x01) == 0) {
256 if (currentVNBit > maxArrayBit) {
257 os <<
", [" << currentVNBit <<
"]";
262 for (
size_t k = lastArrayPos; k < N; ++k) {
263 auto [bit, label] = *(array + k);
265 if (currentVNBit == bit) {
284 #define EXV_PRINT_TAG_BITLIST_ALL_LE(array) printTagBitlistAllLE<std::size(array), array>
290 template <
size_t N, const TagVocabulary (&array)[N]>
295 os <<
"(" << value <<
")";
301 #define EXV_PRINT_VOCABULARY(array) printTagVocabulary<std::size(array), array>
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 <<
")";
310 for (
size_t i = 0; i < value.
count(); i++) {
317 os <<
"(" << value.
toString(i) <<
")";
325 #define EXV_PRINT_VOCABULARY_MULTI(array) printTagVocabularyMulti<std::size(array), array>
343 const GroupInfo* groupList();
365 const TagInfo*
tagInfo(
const std::string& tagName,
IfdId ifdId);
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*);
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*);
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*);
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