From 5ef2f8bd1e52e01093e8bf9d3a73cb3eb288021f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Wed, 16 Mar 2022 10:03:22 +0100 Subject: [PATCH] clang-format: ColumnLimit to 0 + format whole project I applied some manual changes to canonmn_int.cpp so that the array elements are split in different lines: - Add extra comma after last item in the arrays - If a comment is present in the last item (i.e // To silence warnings), then we also need to add a comment after the first item. --- .clang-format | 2 +- include/exiv2/basicio.hpp | 3 +- include/exiv2/error.hpp | 3 +- include/exiv2/jpgimage.hpp | 6 +- include/exiv2/slice.hpp | 9 +- include/exiv2/value.hpp | 21 +- samples/Jzon.cpp | 22 +- samples/Jzon.h | 30 +- samples/geotag.cpp | 6 +- samples/metacopy.hpp | 3 +- src/basicio.cpp | 24 +- src/bmpimage.cpp | 3 +- src/canonmn_int.cpp | 984 ++++++++++++++++++++++++------------ src/casiomn_int.cpp | 61 +-- src/convert.cpp | 6 +- src/cr2header_int.cpp | 3 +- src/crwimage_int.cpp | 18 +- src/crwimage_int.hpp | 9 +- src/datasets.cpp | 22 +- src/easyaccess.cpp | 114 ++--- src/epsimage.cpp | 3 +- src/error.cpp | 150 +++--- src/exif.cpp | 17 +- src/fujimn_int.cpp | 36 +- src/futils.cpp | 4 +- src/gifimage.cpp | 3 +- src/i18n.h | 10 +- src/image.cpp | 6 +- src/image_int.hpp | 3 +- src/iptc.cpp | 9 +- src/jp2image.cpp | 276 +++++++++- src/makernote_int.cpp | 48 +- src/minoltamn_int.cpp | 91 +--- src/nikonmn_int.cpp | 155 +++--- src/olympusmn_int.cpp | 42 +- src/orfimage_int.cpp | 3 +- src/panasonicmn_int.cpp | 56 +- src/pentaxmn_int.cpp | 185 +++++-- src/pngchunk_int.cpp | 10 +- src/pngimage.cpp | 122 ++++- src/preview.cpp | 30 +- src/private.h | 46 +- src/properties.cpp | 61 ++- src/psdimage.cpp | 51 +- src/rw2image.cpp | 3 +- src/rw2image_int.cpp | 3 +- src/samsungmn_int.cpp | 5 +- src/sonymn_int.cpp | 61 ++- src/tags.cpp | 19 +- src/tags_int.cpp | 19 +- src/tgaimage.cpp | 3 +- src/tiffcomposite_int.cpp | 9 +- src/tiffcomposite_int.hpp | 12 +- src/tiffimage.cpp | 12 +- src/tiffimage_int.cpp | 40 +- src/tiffimage_int.hpp | 18 +- src/tiffvisitor_int.cpp | 9 +- src/tiffvisitor_int.hpp | 6 +- src/types.cpp | 6 +- src/tzfile.h | 143 +++--- src/value.cpp | 63 ++- src/version.cpp | 17 +- src/webpimage.cpp | 7 +- src/xmp.cpp | 15 +- src/xmpsidecar.cpp | 3 +- unitTests/test_bmpimage.cpp | 10 +- unitTests/test_types.cpp | 4 +- 67 files changed, 2121 insertions(+), 1132 deletions(-) diff --git a/.clang-format b/.clang-format index 6dc9fa6bba..1d0d566d4f 100644 --- a/.clang-format +++ b/.clang-format @@ -1,6 +1,6 @@ --- # Indentation for all files -ColumnLimit: 120 +ColumnLimit: 0 IndentWidth: 4 TabWidth: 4 UseTab: Never diff --git a/include/exiv2/basicio.hpp b/include/exiv2/basicio.hpp index 3f459bb2e9..3deaa41342 100644 --- a/include/exiv2/basicio.hpp +++ b/include/exiv2/basicio.hpp @@ -257,7 +257,8 @@ namespace Exiv2 //! @name Creators //@{ //! Constructor, takes a BasicIo reference - explicit IoCloser(BasicIo& bio) : bio_(bio) + explicit IoCloser(BasicIo& bio) + : bio_(bio) { } //! Destructor, closes the BasicIo reference diff --git a/include/exiv2/error.hpp b/include/exiv2/error.hpp index e065c8568b..9956703422 100644 --- a/include/exiv2/error.hpp +++ b/include/exiv2/error.hpp @@ -246,7 +246,8 @@ namespace Exiv2 //! Constructor taking an error code and one argument template - Error(ErrorCode code, const A& arg1) : code_(code), arg1_(toBasicString(arg1)) + Error(ErrorCode code, const A& arg1) + : code_(code), arg1_(toBasicString(arg1)) { setMsg(1); } diff --git a/include/exiv2/jpgimage.hpp b/include/exiv2/jpgimage.hpp index 1142f4c564..e40d3e65b5 100644 --- a/include/exiv2/jpgimage.hpp +++ b/include/exiv2/jpgimage.hpp @@ -28,9 +28,9 @@ namespace Exiv2 // Todo: Public for now static constexpr std::array irbId_{"8BIM", "AgHg", "DCSR", "PHUT"}; //!< %Photoshop IRB markers inline static const char* ps3Id_ = "Photoshop 3.0\0"; //!< %Photoshop marker - inline static const char* bimId_ = "8BIM"; //!< %Photoshop IRB marker (deprecated) - inline static const uint16_t iptc_ = 0x0404; //!< %Photoshop IPTC marker - inline static const uint16_t preview_ = 0x040c; //!< %Photoshop preview marker + inline static const char* bimId_ = "8BIM"; //!< %Photoshop IRB marker (deprecated) + inline static const uint16_t iptc_ = 0x0404; //!< %Photoshop IPTC marker + inline static const uint16_t preview_ = 0x040c; //!< %Photoshop preview marker /*! @brief Checks an IRB diff --git a/include/exiv2/slice.hpp b/include/exiv2/slice.hpp index 4bd3716711..6bb5162395 100644 --- a/include/exiv2/slice.hpp +++ b/include/exiv2/slice.hpp @@ -20,7 +20,8 @@ namespace Exiv2 */ struct SliceBase { - inline SliceBase(size_t begin, size_t end) : begin_(begin), end_(end) + inline SliceBase(size_t begin, size_t end) + : begin_(begin), end_(end) { if (begin >= end) { throw std::out_of_range("Begin must be smaller than end"); @@ -291,7 +292,8 @@ namespace Exiv2 * @throw std::out_of_range when end is larger than the container's * size. */ - ContainerStorage(container& data, size_t /* begin*/, size_t end) : data_(data) + ContainerStorage(container& data, size_t /* begin*/, size_t end) + : data_(data) { if (end > data.size()) { throw std::out_of_range("Invalid input parameters to slice"); @@ -362,7 +364,8 @@ namespace Exiv2 * * @throw std::invalid_argument when ptr is `NULL` */ - PtrSliceStorage(storage_type ptr, size_t /*begin*/, size_t /*end*/) : data_(ptr) + PtrSliceStorage(storage_type ptr, size_t /*begin*/, size_t /*end*/) + : data_(ptr) { if (!ptr) { throw std::invalid_argument("Null pointer passed to slice constructor"); diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp index b06ae36948..d9e168a757 100644 --- a/include/exiv2/value.hpp +++ b/include/exiv2/value.hpp @@ -856,10 +856,12 @@ namespace Exiv2 //! LangAltValueComparator comparison case insensitive function bool operator()(const std::string& str1, const std::string& str2) const { - int result = str1.size() < str2.size() ? 1 : str1.size() > str2.size() ? -1 : 0; + int result = str1.size() < str2.size() ? 1 : str1.size() > str2.size() ? -1 + : 0; if (result == 0) { for (auto c1 = str1.begin(), c2 = str2.begin(); result == 0 && c1 != str1.end(); ++c1, ++c2) { - result = tolower(*c1) < tolower(*c2) ? 1 : tolower(*c1) > tolower(*c2) ? -1 : 0; + result = tolower(*c1) < tolower(*c2) ? 1 : tolower(*c1) > tolower(*c2) ? -1 + : 0; } } return result < 0; @@ -1540,29 +1542,34 @@ namespace Exiv2 } template - ValueType::ValueType() : Value(getType()) + ValueType::ValueType() + : Value(getType()) { } template - ValueType::ValueType(TypeId typeId) : Value(typeId) + ValueType::ValueType(TypeId typeId) + : Value(typeId) { } template - ValueType::ValueType(const byte* buf, size_t len, ByteOrder byteOrder, TypeId typeId) : Value(typeId) + ValueType::ValueType(const byte* buf, size_t len, ByteOrder byteOrder, TypeId typeId) + : Value(typeId) { read(buf, len, byteOrder); } template - ValueType::ValueType(const T& val, TypeId typeId) : Value(typeId) + ValueType::ValueType(const T& val, TypeId typeId) + : Value(typeId) { value_.push_back(val); } template - ValueType::ValueType(const ValueType& rhs) : Value(rhs.typeId()), value_(rhs.value_) + ValueType::ValueType(const ValueType& rhs) + : Value(rhs.typeId()), value_(rhs.value_) { if (rhs.sizeDataArea_ > 0) { diff --git a/samples/Jzon.cpp b/samples/Jzon.cpp index 9e11c1360d..ba5a37925f 100644 --- a/samples/Jzon.cpp +++ b/samples/Jzon.cpp @@ -357,8 +357,14 @@ namespace Jzon const char *second; }; static constexpr std::array chars{ - chrPair{'\\', "\\\\"}, chrPair{'/', "\\/"}, chrPair{'\"', "\\\""}, chrPair{'\n', "\\n"}, - chrPair{'\t', "\\t"}, chrPair{'\b', "\\b"}, chrPair{'\f', "\\f"}, chrPair{'\r', "\\r"}, + chrPair{'\\', "\\\\"}, + chrPair{'/', "\\/"}, + chrPair{'\"', "\\\""}, + chrPair{'\n', "\\n"}, + chrPair{'\t', "\\t"}, + chrPair{'\b', "\\b"}, + chrPair{'\f', "\\f"}, + chrPair{'\r', "\\r"}, }; static constexpr char nullUnescaped = '\0'; static constexpr const char *nullEscaped = "\0\0"; @@ -614,7 +620,8 @@ namespace Jzon return new Array(*this); } - FileWriter::FileWriter(std::string filename) : filename(std::move(filename)) + FileWriter::FileWriter(std::string filename) + : filename(std::move(filename)) { } @@ -688,7 +695,8 @@ namespace Jzon return true; } - Writer::Writer(const Node &root, const Format &format) : fi(new FormatInterpreter), root(root) + Writer::Writer(const Node &root, const Format &format) + : fi(new FormatInterpreter), root(root) { SetFormat(format); } @@ -768,10 +776,12 @@ namespace Jzon } } - Parser::Parser(Node &root) : root(root) + Parser::Parser(Node &root) + : root(root) { } - Parser::Parser(Node &root, const std::string &json) : root(root) + Parser::Parser(Node &root, const std::string &json) + : root(root) { SetJson(json); } diff --git a/samples/Jzon.h b/samples/Jzon.h index 2c89826aad..eb8f4e14be 100644 --- a/samples/Jzon.h +++ b/samples/Jzon.h @@ -50,14 +50,16 @@ namespace Jzon class TypeException : public std::logic_error { public: - TypeException() : std::logic_error("A Node was used as the wrong type") + TypeException() + : std::logic_error("A Node was used as the wrong type") { } }; class NotFoundException : public std::out_of_range { public: - NotFoundException() : std::out_of_range("The node could not be found") + NotFoundException() + : std::out_of_range("The node could not be found") { } }; @@ -261,10 +263,12 @@ namespace Jzon class iterator : public std::iterator { public: - iterator(NamedNodePtr *o) : p(o) + iterator(NamedNodePtr *o) + : p(o) { } - iterator(const iterator &it) : p(it.p) + iterator(const iterator &it) + : p(it.p) { } @@ -300,10 +304,12 @@ namespace Jzon class const_iterator : public std::iterator { public: - const_iterator(const NamedNodePtr *o) : p(o) + const_iterator(const NamedNodePtr *o) + : p(o) { } - const_iterator(const const_iterator &it) : p(it.p) + const_iterator(const const_iterator &it) + : p(it.p) { } @@ -373,10 +379,12 @@ namespace Jzon class iterator : public std::iterator { public: - iterator(Node **o) : p(o) + iterator(Node **o) + : p(o) { } - iterator(const iterator &it) : p(it.p) + iterator(const iterator &it) + : p(it.p) { } @@ -412,10 +420,12 @@ namespace Jzon class const_iterator : public std::iterator { public: - const_iterator(const Node *const *o) : p(o) + const_iterator(const Node *const *o) + : p(o) { } - const_iterator(const const_iterator &it) : p(it.p) + const_iterator(const const_iterator &it) + : p(it.p) { } diff --git a/samples/geotag.cpp b/samples/geotag.cpp index 11c97d61fc..3d220fee76 100644 --- a/samples/geotag.cpp +++ b/samples/geotag.cpp @@ -124,7 +124,8 @@ strings_t gFiles; class Position { public: - Position(time_t time, double lat, double lon, double ele) : time_(time), lon_(lon), lat_(lat), ele_(ele) + Position(time_t time, double lat, double lon, double ele) + : time_(time), lon_(lon), lat_(lat), ele_(ele) { } @@ -275,7 +276,8 @@ time_t Position::deltaMax_ = 60; // UserData - used by XML Parser struct UserData final { - explicit UserData(Options& options) : options_(options) + explicit UserData(Options& options) + : options_(options) { } diff --git a/samples/metacopy.hpp b/samples/metacopy.hpp index 3dd05d3a4c..4ba7236e43 100644 --- a/samples/metacopy.hpp +++ b/samples/metacopy.hpp @@ -27,7 +27,8 @@ class Params : public Util::Getopt /*! @brief Default constructor. Note that optstring_ is initialized here. */ - Params() : optstring_(":iecxaph") + Params() + : optstring_(":iecxaph") { } diff --git a/src/basicio.cpp b/src/basicio.cpp index 5b9aef6155..9ad5fcc688 100644 --- a/src/basicio.cpp +++ b/src/basicio.cpp @@ -128,7 +128,8 @@ namespace Exiv2 Impl& operator=(const Impl& rhs) = delete; //!< Assignment }; // class FileIo::Impl - FileIo::Impl::Impl(std::string path) : path_(std::move(path)) + FileIo::Impl::Impl(std::string path) + : path_(std::move(path)) { } @@ -198,7 +199,8 @@ namespace Exiv2 return ret; } // FileIo::Impl::stat - FileIo::FileIo(const std::string& path) : p_(std::make_unique(path)) + FileIo::FileIo(const std::string& path) + : p_(std::make_unique(path)) { } @@ -624,7 +626,8 @@ namespace Exiv2 Impl& operator=(const Impl& rhs) = delete; //!< Assignment }; // class MemIo::Impl - MemIo::Impl::Impl(const byte* data, size_t size) : data_(const_cast(data)), size_(size) + MemIo::Impl::Impl(const byte* data, size_t size) + : data_(const_cast(data)), size_(size) { } @@ -744,11 +747,13 @@ namespace Exiv2 } } - MemIo::MemIo() : p_(std::make_unique()) + MemIo::MemIo() + : p_(std::make_unique()) { } - MemIo::MemIo(const byte* data, size_t size) : p_(std::make_unique(data, size)) + MemIo::MemIo(const byte* data, size_t size) + : p_(std::make_unique(data, size)) { } @@ -992,7 +997,8 @@ namespace Exiv2 } #else - XPathIo::XPathIo(const std::string& orgPath) : FileIo(XPathIo::writeDataToFile(orgPath)), isTemp_(true) + XPathIo::XPathIo(const std::string& orgPath) + : FileIo(XPathIo::writeDataToFile(orgPath)), isTemp_(true) { tempFilePath_ = path(); } @@ -1547,7 +1553,8 @@ namespace Exiv2 HttpImpl& operator=(const HttpImpl& rhs) = delete; //!< Assignment }; // class HttpIo::HttpImpl - HttpIo::HttpImpl::HttpImpl(const std::string& url, size_t blockSize) : Impl(url, blockSize) + HttpIo::HttpImpl::HttpImpl(const std::string& url, size_t blockSize) + : Impl(url, blockSize) { hostInfo_ = Exiv2::Uri::Parse(url); Exiv2::Uri::Decode(hostInfo_); @@ -1708,7 +1715,8 @@ namespace Exiv2 long timeout_; //!< The number of seconds to wait while trying to connect. }; // class RemoteIo::Impl - CurlIo::CurlImpl::CurlImpl(const std::string& url, size_t blockSize) : Impl(url, blockSize), curl_(curl_easy_init()) + CurlIo::CurlImpl::CurlImpl(const std::string& url, size_t blockSize) + : Impl(url, blockSize), curl_(curl_easy_init()) { if (!curl_) { throw Error(ErrorCode::kerErrorMessage, "Unable to init libcurl."); diff --git a/src/bmpimage.cpp b/src/bmpimage.cpp index c40c21ea92..59f202b92c 100644 --- a/src/bmpimage.cpp +++ b/src/bmpimage.cpp @@ -20,7 +20,8 @@ // class member definitions namespace Exiv2 { - BmpImage::BmpImage(BasicIo::UniquePtr io) : Image(ImageType::bmp, mdNone, std::move(io)) + BmpImage::BmpImage(BasicIo::UniquePtr io) + : Image(ImageType::bmp, mdNone, std::move(io)) { } diff --git a/src/canonmn_int.cpp b/src/canonmn_int.cpp index a7fae9e79f..e91b1842c2 100644 --- a/src/canonmn_int.cpp +++ b/src/canonmn_int.cpp @@ -392,44 +392,88 @@ namespace Exiv2::Internal }; //! SuperMacro, tag 0x001a - constexpr TagDetails canonSuperMacro[] = {{0, N_("Off")}, {1, N_("On (1)")}, {2, N_("On (2)")}}; + constexpr TagDetails canonSuperMacro[] = { + {0, N_("Off")}, + {1, N_("On (1)")}, + {2, N_("On (2)")}, + }; // DateStampMode, tag 0x001c - constexpr TagDetails canonDateStampMode[] = {{0, N_("Off")}, {1, N_("Date")}, {2, N_("Date & Time")}}; + constexpr TagDetails canonDateStampMode[] = { + {0, N_("Off")}, + {1, N_("Date")}, + {2, N_("Date & Time")}, + }; // Categories, tag 0x0023 [[maybe_unused]] constexpr TagDetails canonCategories[] = { - {0x0001, N_("People")}, {0x0002, N_("Scenery")}, {0x0004, N_("Events")}, {0x0008, N_("User 1")}, - {0x0016, N_("User 2")}, {0x0032, N_("User 3")}, {0x0064, N_("To Do")}}; + {0x0001, N_("People")}, + {0x0002, N_("Scenery")}, + {0x0004, N_("Events")}, + {0x0008, N_("User 1")}, + {0x0016, N_("User 2")}, + {0x0032, N_("User 3")}, + {0x0064, N_("To Do")}, + }; //! PictureStyle Values - constexpr TagDetails canonPictureStyle[] = {{0x00, N_("None")}, {0x01, N_("Standard")}, - {0x02, N_("Portrait")}, {0x03, N_("High Saturation")}, - {0x04, N_("Adobe RGB")}, {0x05, N_("Low Saturation")}, - {0x06, N_("CM Set 1")}, {0x07, N_("CM Set 2")}, - {0x21, N_("User Def. 1")}, {0x22, N_("User Def. 2")}, - {0x23, N_("User Def. 3")}, {0x41, N_("PC 1")}, - {0x42, N_("PC 2")}, {0x43, N_("PC 3")}, - {0x81, N_("Standard")}, {0x82, N_("Portrait")}, - {0x83, N_("Landscape")}, {0x84, N_("Neutral")}, - {0x85, N_("Faithful")}, {0x86, N_("Monochrome")}, - {0x87, N_("Auto")}, {0x88, N_("Fine Detail")}}; + constexpr TagDetails canonPictureStyle[] = { + {0x00, N_("None")}, + {0x01, N_("Standard")}, + {0x02, N_("Portrait")}, + {0x03, N_("High Saturation")}, + {0x04, N_("Adobe RGB")}, + {0x05, N_("Low Saturation")}, + {0x06, N_("CM Set 1")}, + {0x07, N_("CM Set 2")}, + {0x21, N_("User Def. 1")}, + {0x22, N_("User Def. 2")}, + {0x23, N_("User Def. 3")}, + {0x41, N_("PC 1")}, + {0x42, N_("PC 2")}, + {0x43, N_("PC 3")}, + {0x81, N_("Standard")}, + {0x82, N_("Portrait")}, + {0x83, N_("Landscape")}, + {0x84, N_("Neutral")}, + {0x85, N_("Faithful")}, + {0x86, N_("Monochrome")}, + {0x87, N_("Auto")}, + {0x88, N_("Fine Detail")}, + }; //! WhiteBalance, multiple tags - constexpr TagDetails canonSiWhiteBalance[] = {{0, N_("Auto")}, {1, N_("Daylight")}, - {2, N_("Cloudy")}, {3, N_("Tungsten")}, - {4, N_("Fluorescent")}, {5, N_("Flash")}, - {6, N_("Custom")}, {7, N_("Black & White")}, - {8, N_("Shade")}, {9, N_("Manual Temperature (Kelvin)")}, - {10, N_("PC Set 1")}, {11, N_("PC Set 2")}, - {12, N_("PC Set 3")}, {14, N_("Daylight Fluorescent")}, - {15, N_("Custom 1")}, {16, N_("Custom 2")}, - {17, N_("Underwater")}, {18, N_("Custom 3")}, - {19, N_("Custom 3")}, {20, N_("PC Set 4")}, - {21, N_("PC Set 5")}, {23, N_("Auto (ambience priority)")}}; + constexpr TagDetails canonSiWhiteBalance[] = { + {0, N_("Auto")}, + {1, N_("Daylight")}, + {2, N_("Cloudy")}, + {3, N_("Tungsten")}, + {4, N_("Fluorescent")}, + {5, N_("Flash")}, + {6, N_("Custom")}, + {7, N_("Black & White")}, + {8, N_("Shade")}, + {9, N_("Manual Temperature (Kelvin)")}, + {10, N_("PC Set 1")}, + {11, N_("PC Set 2")}, + {12, N_("PC Set 3")}, + {14, N_("Daylight Fluorescent")}, + {15, N_("Custom 1")}, + {16, N_("Custom 2")}, + {17, N_("Underwater")}, + {18, N_("Custom 3")}, + {19, N_("Custom 3")}, + {20, N_("PC Set 4")}, + {21, N_("PC Set 5")}, + {23, N_("Auto (ambience priority)")}, + }; //! ColorSpace, tag 0x00b4 - constexpr TagDetails canonColorSpace[] = {{1, N_("sRGB")}, {2, N_("Adobe RGB")}, {65535, N_("n/a")}}; + constexpr TagDetails canonColorSpace[] = { + {1, N_("sRGB")}, + {2, N_("Adobe RGB")}, + {65535, N_("n/a")}, + }; //! Canon AF Area Mode, tag 0x2601 constexpr TagDetails canonAFAreaMode[] = { @@ -657,10 +701,21 @@ namespace Exiv2::Internal // MyColors, tag 0x001d constexpr TagDetails canonMyColors[] = { - {0, N_("Off")}, {1, N_("Positive Film")}, {2, N_("Light Skin Tone")}, {3, N_("Dark Skin Tone")}, - {4, N_("Vivid Blue")}, {5, N_("Vivid Green")}, {6, N_("Vivid Red")}, {7, N_("Color Accent")}, - {8, N_("Color Swap")}, {9, N_("Custom")}, {12, N_("Vivid")}, {13, N_("Neutral")}, - {14, N_("Sepia")}, {15, N_("B&W")}}; + {0, N_("Off")}, + {1, N_("Positive Film")}, + {2, N_("Light Skin Tone")}, + {3, N_("Dark Skin Tone")}, + {4, N_("Vivid Blue")}, + {5, N_("Vivid Green")}, + {6, N_("Vivid Red")}, + {7, N_("Color Accent")}, + {8, N_("Color Swap")}, + {9, N_("Custom")}, + {12, N_("Vivid")}, + {13, N_("Neutral")}, + {14, N_("Sepia")}, + {15, N_("B&W")}, + }; // Canon My Colors Info Tag constexpr TagInfo CanonMakerNote::tagInfoMc_[] = { @@ -718,7 +773,11 @@ namespace Exiv2::Internal } // Canon ContrastInfo, tag 0x001d - constexpr TagDetails canonContrastInfo[] = {{0x0, N_("Off")}, {0x8, N_("On")}, {0xfff, N_("n/a")}}; + constexpr TagDetails canonContrastInfo[] = { + {0x0, N_("Off")}, + {0x8, N_("On")}, + {0xfff, N_("n/a")}, + }; // Canon Contrast Info Tag constexpr TagInfo CanonMakerNote::tagInfoCo_[] = { @@ -844,11 +903,21 @@ namespace Exiv2::Internal } // Canon Modified ToneCurve Info, tag 0x0001 - constexpr TagDetails canonModifiedToneCurve[] = {{0, N_("Standard")}, {1, N_("Manual")}, {2, N_("Custom")}}; + constexpr TagDetails canonModifiedToneCurve[] = { + {0, N_("Standard")}, + {1, N_("Manual")}, + {2, N_("Custom")}, + }; // Canon Modified Sharpness Freq Info, tag 0x0002 - constexpr TagDetails canonModifiedSharpnessFreq[] = {{0, N_("n/a")}, {1, N_("Lowest")}, {2, N_("Low")}, - {3, N_("Standard")}, {4, N_("High")}, {5, N_("Highest")}}; + constexpr TagDetails canonModifiedSharpnessFreq[] = { + {0, N_("n/a")}, + {1, N_("Lowest")}, + {2, N_("Low")}, + {3, N_("Standard")}, + {4, N_("High")}, + {5, N_("Highest")}, + }; // Canon ModifiedInfo Tag constexpr TagInfo CanonMakerNote::tagInfoMo_[] = { @@ -883,8 +952,7 @@ namespace Exiv2::Internal // Canon Preview Quality Info, tag 0x0001 constexpr TagDetails canonPreviewQuality[] = { - {-1, N_("n/a")}, {1, N_("Economy")}, {2, N_("Normal")}, {3, N_("Fine")}, {4, N_("RAW")}, - {5, N_("Superfine")}, {7, N_("CRAW")}, {130, N_("Normal Movie")}, {131, N_("Movie (2)")}}; + {-1, N_("n/a")}, {1, N_("Economy")}, {2, N_("Normal")}, {3, N_("Fine")}, {4, N_("RAW")}, {5, N_("Superfine")}, {7, N_("CRAW")}, {130, N_("Normal Movie")}, {131, N_("Movie (2)")}}; // Canon Preview Image Info Tag constexpr TagInfo CanonMakerNote::tagInfoPreI_[] = { @@ -929,7 +997,8 @@ namespace Exiv2::Internal {0x0002, "AFMicroAdjValue", N_("AF Micro Adj Value"), N_("AF Micro Adj Value"), canonAfMiAdjId, makerTags, signedRational, -1, printValue}, {0xffff, "(UnknownCanonAFMicroAdjTag)", "(UnknownCanonAFMicroAdjTag)", N_("Unknown Canon AFMicroAdj tag"), - canonAfMiAdjId, makerTags, signedShort, 1, printValue}}; + canonAfMiAdjId, makerTags, signedShort, 1, printValue}, + }; const TagInfo* CanonMakerNote::tagListAfMiAdj() { @@ -972,7 +1041,7 @@ namespace Exiv2::Internal {0x0007, "DistortionCorrectionSetting", N_("Distortion Correction Setting"), N_("Distortion Correction Setting"), canonVigCor2Id, makerTags, signedLong, -1, EXV_PRINT_TAG(canonOffOn)}, {0xffff, "(UnknownVignettingCorr2Tag)", "(UnknownVignettingCorr2Tag)", N_("UnknownVignettingCorr2Tag Tag"), - canonVigCor2Id, makerTags, signedLong, 1, printValue} // important to add end of tag + canonVigCor2Id, makerTags, signedLong, 1, printValue}, // important to add end of tag }; const TagInfo* CanonMakerNote::tagListVigCor2() @@ -982,14 +1051,26 @@ namespace Exiv2::Internal // Canon AutoLightingOptimizer, tag 0x0002 constexpr TagDetails canonAutoLightingOptimizer[] = { - {0, N_("Standard")}, {1, N_("Low")}, {2, N_("Strong")}, {3, N_("Off")}}; + {0, N_("Standard")}, + {1, N_("Low")}, + {2, N_("Strong")}, + {3, N_("Off")}, + }; // Canon HighISONoiseReduction, tag 0x0004 - constexpr TagDetails canonLongExposureNoiseReduction[] = {{0, N_("Off")}, {1, N_("Auto")}, {2, N_("On")}}; + constexpr TagDetails canonLongExposureNoiseReduction[] = { + {0, N_("Off")}, + {1, N_("Auto")}, + {2, N_("On")}, + }; // Canon HighISONoiseReduction, tag 0x0005 constexpr TagDetails canonHighISONoiseReduction[] = { - {0, N_("Standard")}, {1, N_("Low")}, {2, N_("Strong")}, {3, N_("off")}}; + {0, N_("Standard")}, + {1, N_("Low")}, + {2, N_("Strong")}, + {3, N_("off")}, + }; // Canon LightingOpt Tag constexpr TagInfo CanonMakerNote::tagInfoLiOp_[] = { @@ -1027,9 +1108,7 @@ namespace Exiv2::Internal } // Canon AmbienceSelection, tag 0x0001 - constexpr TagDetails canonAmbienceSelection[] = {{0, N_("Standard")}, {1, N_("Vivid")}, {2, N_("Warm")}, - {3, N_("Soft")}, {4, N_("Cool")}, {5, N_("Intense")}, - {6, N_("Brighter")}, {7, N_("Darker")}, {8, N_("Monochrome")}}; + constexpr TagDetails canonAmbienceSelection[] = {{0, N_("Standard")}, {1, N_("Vivid")}, {2, N_("Warm")}, {3, N_("Soft")}, {4, N_("Cool")}, {5, N_("Intense")}, {6, N_("Brighter")}, {7, N_("Darker")}, {8, N_("Monochrome")}}; // Canon Ambience Tag constexpr TagInfo CanonMakerNote::tagInfoAm_[] = { @@ -1106,14 +1185,20 @@ namespace Exiv2::Internal } // Canon HDR, tag 0x0001 - constexpr TagDetails canonHdr[] = {{0, N_("Off")}, {1, N_("On")}, {2, N_("On (RAW")}}; + constexpr TagDetails canonHdr[] = { + {0, N_("Off")}, + {1, N_("On")}, + {2, N_("On (RAW")}, + }; // Canon HDREffect, tag 0x0001 - constexpr TagDetails canonHdrEffect[] = {{0, N_("Natural")}, - {1, N_("Art (standard)")}, - {2, N_("Art (vivid)")}, - {3, N_("Art (bold)")}, - {4, N_("Art (embossed)")}}; + constexpr TagDetails canonHdrEffect[] = { + {0, N_("Natural")}, + {1, N_("Art (standard)")}, + {2, N_("Art (vivid)")}, + {3, N_("Art (bold)")}, + {4, N_("Art (embossed)")}, + }; // Canon HDR Info Tag constexpr TagInfo CanonMakerNote::tagInfoHdr_[] = { @@ -1121,7 +1206,8 @@ namespace Exiv2::Internal {0x0002, "HDREffect", N_("HDR Effect"), N_("HDR Effect"), canonHdrId, makerTags, signedLong, -1, EXV_PRINT_TAG(canonHdrEffect)}, {0xffff, "(UnknownHDRTag)", "(UnknownHDRTag)", N_("Unknown Canon HDR Tag"), canonHdrId, makerTags, signedLong, - 1, printValue}}; + 1, printValue}, + }; const TagInfo* CanonMakerNote::tagListHdr() { @@ -1134,51 +1220,82 @@ namespace Exiv2::Internal // Canon AIServoSecondImage, tag 0x0001 constexpr TagDetails canonAIServoSecondImage[] = { - {0, N_("Equal Priority")}, {1, N_("Release Priority")}, {2, N_("Focus Priority")}, - {3, N_("Release High Priority")}, {4, N_("Focus High Priority")}, + {0, N_("Equal Priority")}, + {1, N_("Release Priority")}, + {2, N_("Focus Priority")}, + {3, N_("Release High Priority")}, + {4, N_("Focus High Priority")}, }; // Canon USMLensElectronicMF, tag 0x0001 constexpr TagDetails canonUSMLensElectronicMF[] = { - {0, N_("Enable After AF")}, {1, N_("Disable After AF")}, {2, N_("Disable in AF Mode")}}; + {0, N_("Enable After AF")}, + {1, N_("Disable After AF")}, + {2, N_("Disable in AF Mode")}, + }; // Canon AFAssistBeam, tag 0x0001 constexpr TagDetails canonAFAssistBeam[] = { - {0, N_("Enable")}, {1, N_("Disable")}, {2, N_("IR AF Assist Beam Mode")}}; + {0, N_("Enable")}, + {1, N_("Disable")}, + {2, N_("IR AF Assist Beam Mode")}, + }; // Canon OneShotAFRelease, tag 0x0001 - constexpr TagDetails canonOneShotAFRelease[] = {{0, N_("Focus Priority")}, {1, N_("Release Priority")}}; + constexpr TagDetails canonOneShotAFRelease[] = { + {0, N_("Focus Priority")}, + {1, N_("Release Priority")}, + }; // Canon AutoAFPointSelEOSiTRAF, tag 0x0001 - constexpr TagDetails canonAutoAFPointSelEOSiTRAF[] = {{0, N_("Enable")}, {1, N_("Disable")}}; + constexpr TagDetails canonAutoAFPointSelEOSiTRAF[] = { + {0, N_("Enable")}, + {1, N_("Disable")}, + }; // Canon LensDriveWhenAFImpossible, tag 0x0001 - constexpr TagDetails canonLensDriveWhenAFImpossible[] = {{0, N_("Continue Focus Search")}, - {1, N_("Stop Focus Search")}}; + constexpr TagDetails canonLensDriveWhenAFImpossible[] = { + {0, N_("Continue Focus Search")}, + {1, N_("Stop Focus Search")}, + }; // Canon SelectAFAreaSelectionMode, tag 0x0001 constexpr TagDetails canonSelectAFAreaSelectionMode[] = { - {0, N_("Single-Point-AF")}, {1, N_("Auto")}, - {2, N_("Zone AF")}, {3, N_("AF Point Expansion (4 point)")}, - {4, N_("Spot AF")}, {5, N_("AF Point Expansion (8 point)")}}; + {0, N_("Single-Point-AF")}, + {1, N_("Auto")}, + {2, N_("Zone AF")}, + {3, N_("AF Point Expansion (4 point)")}, + {4, N_("Spot AF")}, + {5, N_("AF Point Expansion (8 point)")}, + }; // Canon AFAreaSelectionMethod, tag 0x0001 - constexpr TagDetails canonAFAreaSelectionMethod[] = {{0, N_("M-Fn Button")}, {1, N_("Main Dial")}}; + constexpr TagDetails canonAFAreaSelectionMethod[] = { + {0, N_("M-Fn Button")}, + {1, N_("Main Dial")}, + }; // Canon OrientationLinkedAF, tag 0x0001 - constexpr TagDetails canonOrientationLinkedAF[] = {{0, N_("Same for Vert/Horiz Points")}, - {1, N_("Separate for Vert/Horiz Points")}, - {2, N_("Separate Area+Points")}}; + constexpr TagDetails canonOrientationLinkedAF[] = { + {0, N_("Same for Vert/Horiz Points")}, + {1, N_("Separate for Vert/Horiz Points")}, + {2, N_("Separate Area+Points")}, + }; // Canon ManualAFPointSelPattern, tag 0x0001 - constexpr TagDetails canonManualAFPointSelPattern[] = {{0, N_("Stops at AF Area Edges")}, {1, N_("Continuous")}}; + constexpr TagDetails canonManualAFPointSelPattern[] = { + {0, N_("Stops at AF Area Edges")}, + {1, N_("Continuous")}, + }; // Canon AFPointDisplayDuringFocus, tag 0x0001 - constexpr TagDetails canonAFPointDisplayDuringFocus[] = {{0, N_("Selected (constant)")}, - {1, N_("All (constant)")}, - {1, N_("Selected (pre-AF, focused)")}, - {1, N_("Selected (focused)")}, - {1, N_("Disabled")}}; + constexpr TagDetails canonAFPointDisplayDuringFocus[] = { + {0, N_("Selected (constant)")}, + {1, N_("All (constant)")}, + {1, N_("Selected (pre-AF, focused)")}, + {1, N_("Selected (focused)")}, + {1, N_("Disabled")}, + }; // Canon VFDisplayIllumination, tag 0x0001 constexpr TagDetails canonAVFDisplayIllumination[] = { @@ -1266,190 +1383,289 @@ namespace Exiv2::Internal } //! Macro, tag 0x0001 - constexpr TagDetails canonCsMacro[] = {{1, N_("On")}, {2, N_("Off")}}; + constexpr TagDetails canonCsMacro[] = { + {1, N_("On")}, + {2, N_("Off")}, + }; //! Quality, tag 0x0003 constexpr TagDetails canonCsQuality[] = { - {-1, N_("n/a")}, {0, N_("unkown")}, {1, N_("Economy")}, {2, N_("Normal")}, {3, N_("Fine")}, - {4, N_("RAW")}, {5, N_("Superfine")}, {7, N_("CRAW")}, {130, N_("Normal Movie")}, {131, N_("Movie (2)")}}; + {-1, N_("n/a")}, + {0, N_("unkown")}, + {1, N_("Economy")}, + {2, N_("Normal")}, + {3, N_("Fine")}, + {4, N_("RAW")}, + {5, N_("Superfine")}, + {7, N_("CRAW")}, + {130, N_("Normal Movie")}, + {131, N_("Movie (2)")}, + }; //! FlashMode, tag 0x0004 constexpr TagDetails canonCsFlashMode[] = { - {0, N_("Off")}, {1, N_("Auto")}, {2, N_("On")}, - {3, N_("Red-eye")}, {4, N_("Slow sync")}, {5, N_("Auto + red-eye")}, - {6, N_("On + red-eye")}, {16, N_("External")}, {16, N_("External")} // To silence compiler warning + {0, N_("Off")}, // + {1, N_("Auto")}, + {2, N_("On")}, + {3, N_("Red-eye")}, + {4, N_("Slow sync")}, + {5, N_("Auto + red-eye")}, + {6, N_("On + red-eye")}, + {16, N_("External")}, + {16, N_("External")}, // To silence compiler warning }; //! DriveMode, tag 0x0005 - constexpr TagDetails canonCsDriveMode[] = {{0, N_("Single / timer")}, - {1, N_("Continuous")}, - {2, N_("Movie")}, - {3, N_("Continuous, speed priority")}, - {3, N_("Continuous, tracking priority")}, - {4, N_("Continuous, low")}, - {5, N_("Continuous, high")}, - {6, N_("Silent Single")}, - {9, N_("Single, Silent")}, - {10, N_("Continuous, Silent")}}; + constexpr TagDetails canonCsDriveMode[] = { + {0, N_("Single / timer")}, + {1, N_("Continuous")}, + {2, N_("Movie")}, + {3, N_("Continuous, speed priority")}, + {3, N_("Continuous, tracking priority")}, + {4, N_("Continuous, low")}, + {5, N_("Continuous, high")}, + {6, N_("Silent Single")}, + {9, N_("Single, Silent")}, + {10, N_("Continuous, Silent")}, + }; //! FocusMode, tag 0x0007 constexpr TagDetails canonCsFocusMode[] = { - {0, N_("One shot AF")}, {1, N_("AI servo AF")}, - {2, N_("AI focus AF")}, {3, N_("Manual focus (3)")}, - {4, N_("Single")}, {5, N_("Continuous")}, - {6, N_("Manual focus (6)")}, {16, N_("Pan focus")}, - {256, N_("AF + MF")}, {512, N_("Movie Snap Focus")}, - {519, N_("Movie Servo AF")}, {519, N_("Movie Servo AF")} // To silence compiler warning + {0, N_("One shot AF")}, // + {1, N_("AI servo AF")}, + {2, N_("AI focus AF")}, + {3, N_("Manual focus (3)")}, + {4, N_("Single")}, + {5, N_("Continuous")}, + {6, N_("Manual focus (6)")}, + {16, N_("Pan focus")}, + {256, N_("AF + MF")}, + {512, N_("Movie Snap Focus")}, + {519, N_("Movie Servo AF")}, + {519, N_("Movie Servo AF")}, // To silence compiler warning }; //! RecordMode, tag 0x0009 constexpr TagDetails canonCsRecordMode[] = { - {1, N_("JPEG")}, {2, N_("CRW+THM")}, {3, N_("AVI+THM")}, {4, N_("TIF")}, {5, N_("TIF+JPEG")}, - {6, N_("CR2")}, {7, N_("CR2+JPEG")}, {9, N_("MOV")}, {10, N_("MP4")}, {11, N_("CRM")}, - {12, N_("CR3")}, {13, N_("CR3+JPEG")}, {14, N_("HIF")}, {15, N_("CR3+HIF")}}; + {1, N_("JPEG")}, + {2, N_("CRW+THM")}, + {3, N_("AVI+THM")}, + {4, N_("TIF")}, + {5, N_("TIF+JPEG")}, + {6, N_("CR2")}, + {7, N_("CR2+JPEG")}, + {9, N_("MOV")}, + {10, N_("MP4")}, + {11, N_("CRM")}, + {12, N_("CR3")}, + {13, N_("CR3+JPEG")}, + {14, N_("HIF")}, + {15, N_("CR3+HIF")}, + }; //! ImageSize, tag 0x000a - constexpr TagDetails canonCsImageSize[] = {{0, N_("Large")}, - {1, N_("Medium")}, - {2, N_("Small")}, - {5, N_("Medium 1")}, - {6, N_("Medium 2")}, - {7, N_("Medium 3")}, - {8, N_("Postcard")}, - {9, N_("Widescreen")}, - {10, N_("Medium Widescreen")}, - {14, N_("Small 1")}, - {15, N_("Small 2")}, - {16, N_("Small 3")}, - {128, N_("640x480 Movie")}, - {129, N_("Medium Movie")}, - {130, N_("Small Movie")}, - {137, N_("1280x720 Movie")}, - {142, N_("1920x1080 Movie")}, - {143, N_("4096x2160 Movie")}}; + constexpr TagDetails canonCsImageSize[] = { + {0, N_("Large")}, + {1, N_("Medium")}, + {2, N_("Small")}, + {5, N_("Medium 1")}, + {6, N_("Medium 2")}, + {7, N_("Medium 3")}, + {8, N_("Postcard")}, + {9, N_("Widescreen")}, + {10, N_("Medium Widescreen")}, + {14, N_("Small 1")}, + {15, N_("Small 2")}, + {16, N_("Small 3")}, + {128, N_("640x480 Movie")}, + {129, N_("Medium Movie")}, + {130, N_("Small Movie")}, + {137, N_("1280x720 Movie")}, + {142, N_("1920x1080 Movie")}, + {143, N_("4096x2160 Movie")}, + }; //! EasyMode, tag 0x000b - constexpr TagDetails canonCsEasyMode[] = {{0, N_("Full auto")}, - {1, N_("Manual")}, - {2, N_("Landscape")}, - {3, N_("Fast shutter")}, - {4, N_("Slow shutter")}, - {5, N_("Night")}, - {6, N_("Gray Scale")}, - {7, N_("Sepia")}, - {8, N_("Portrait")}, - {9, N_("Sports")}, - {10, N_("Macro")}, - {11, N_("Black & White")}, - {12, N_("Pan focus")}, - {13, N_("Vivid")}, - {14, N_("Neutral")}, - {15, N_("Flash Off")}, - {16, N_("Long Shutter")}, - {17, N_("Super Macro")}, - {18, N_("Foliage")}, - {19, N_("Indoor")}, - {20, N_("Fireworks")}, - {21, N_("Beach")}, - {22, N_("Underwater")}, - {23, N_("Snow")}, - {24, N_("Kids & Pets")}, - {25, N_("Night Snapshot")}, - {26, N_("Digital Macro")}, - {27, N_("My Colors")}, - {28, N_("Movie Snap")}, - {29, N_("Super Macro 2")}, - {30, N_("Color Accent")}, - {31, N_("Color Swap")}, - {32, N_("Aquarium")}, - {33, N_("ISO 3200")}, - {34, N_("ISO 6400")}, - {35, N_("Creative Light Effect")}, - {36, N_("Easy")}, - {37, N_("Quick Shot")}, - {38, N_("Creative Auto")}, - {39, N_("Zoom Blur")}, - {40, N_("Low Light")}, - {41, N_("Nostalgic")}, - {42, N_("Super Vivid")}, - {43, N_("Poster Effect")}, - {44, N_("Face Self-timer")}, - {45, N_("Smile")}, - {46, N_("Wink Self-timer")}, - {47, N_("Fisheye Effect")}, - {48, N_("Miniature Effect")}, - {49, N_("High-speed Burst")}, - {50, N_("Best Image Selection")}, - {51, N_("High Dynamic Range")}, - {52, N_("Handheld Night Scene")}, - {53, N_("Movie Digest")}, - {54, N_("Live View Control")}, - {55, N_("Discreet")}, - {56, N_("Blur Reduction")}, - {57, N_("Monochrome")}, - {58, N_("Toy Camera Effect")}, - {59, N_("Scene Intelligent Auto")}, - {60, N_("High-speed Burst HQ")}, - {61, N_("Smooth Skin")}, - {62, N_("Soft Focus")}, - {257, N_("Spotlight")}, - {258, N_("Night 2")}, - {259, N_("Night+")}, - {260, N_("Super Night")}, - {261, N_("Sunset")}, - {263, N_("Night Scene")}, - {264, N_("Surface")}, - {265, N_("Low Light 2")}}; + constexpr TagDetails canonCsEasyMode[] = { + {0, N_("Full auto")}, + {1, N_("Manual")}, + {2, N_("Landscape")}, + {3, N_("Fast shutter")}, + {4, N_("Slow shutter")}, + {5, N_("Night")}, + {6, N_("Gray Scale")}, + {7, N_("Sepia")}, + {8, N_("Portrait")}, + {9, N_("Sports")}, + {10, N_("Macro")}, + {11, N_("Black & White")}, + {12, N_("Pan focus")}, + {13, N_("Vivid")}, + {14, N_("Neutral")}, + {15, N_("Flash Off")}, + {16, N_("Long Shutter")}, + {17, N_("Super Macro")}, + {18, N_("Foliage")}, + {19, N_("Indoor")}, + {20, N_("Fireworks")}, + {21, N_("Beach")}, + {22, N_("Underwater")}, + {23, N_("Snow")}, + {24, N_("Kids & Pets")}, + {25, N_("Night Snapshot")}, + {26, N_("Digital Macro")}, + {27, N_("My Colors")}, + {28, N_("Movie Snap")}, + {29, N_("Super Macro 2")}, + {30, N_("Color Accent")}, + {31, N_("Color Swap")}, + {32, N_("Aquarium")}, + {33, N_("ISO 3200")}, + {34, N_("ISO 6400")}, + {35, N_("Creative Light Effect")}, + {36, N_("Easy")}, + {37, N_("Quick Shot")}, + {38, N_("Creative Auto")}, + {39, N_("Zoom Blur")}, + {40, N_("Low Light")}, + {41, N_("Nostalgic")}, + {42, N_("Super Vivid")}, + {43, N_("Poster Effect")}, + {44, N_("Face Self-timer")}, + {45, N_("Smile")}, + {46, N_("Wink Self-timer")}, + {47, N_("Fisheye Effect")}, + {48, N_("Miniature Effect")}, + {49, N_("High-speed Burst")}, + {50, N_("Best Image Selection")}, + {51, N_("High Dynamic Range")}, + {52, N_("Handheld Night Scene")}, + {53, N_("Movie Digest")}, + {54, N_("Live View Control")}, + {55, N_("Discreet")}, + {56, N_("Blur Reduction")}, + {57, N_("Monochrome")}, + {58, N_("Toy Camera Effect")}, + {59, N_("Scene Intelligent Auto")}, + {60, N_("High-speed Burst HQ")}, + {61, N_("Smooth Skin")}, + {62, N_("Soft Focus")}, + {257, N_("Spotlight")}, + {258, N_("Night 2")}, + {259, N_("Night+")}, + {260, N_("Super Night")}, + {261, N_("Sunset")}, + {263, N_("Night Scene")}, + {264, N_("Surface")}, + {265, N_("Low Light 2")}, + }; //! DigitalZoom, tag 0x000c constexpr TagDetails canonCsDigitalZoom[] = { - {0, N_("None")}, {1, "2x"}, {2, "4x"}, {3, N_("Other")}, {3, N_("Other")} // To silence compiler warning + {0, N_("None")}, // + {1, "2x"}, + {2, "4x"}, + {3, N_("Other")}, + {3, N_("Other")}, // To silence compiler warning }; //! Contrast, Saturation Sharpness, tags 0x000d, 0x000e, 0x000f - constexpr TagDetails canonCsLnh[] = {{0xffff, N_("Low")}, {0x0000, N_("Normal")}, {0x0001, N_("High")}}; + constexpr TagDetails canonCsLnh[] = { + {0xffff, N_("Low")}, + {0x0000, N_("Normal")}, + {0x0001, N_("High")}, + }; //! ISOSpeeds, tag 0x0010 constexpr TagDetails canonCsISOSpeed[] = { - {0, N_("n/a")}, {14, N_("Auto High")}, {15, N_("Auto")}, {16, "50"}, {17, "100"}, - {18, "200"}, {19, "400"}, {20, "800"}, {16464, "80"}, {16484, "100"}, - {16509, "125"}, {16544, "160"}, {16584, "200"}, {16634, "250"}, {16704, "320"}, - {16784, "400"}, {16884, "500"}, {17024, "640"}, {17184, "800"}, {17384, "1000"}, - {17634, "1250"}, {17984, "1600"}, {18384, "2000"}, {18884, "2500"}, {19584, "3200"}, - {20384, "4000"}, {21384, "5000"}, {22784, "6400"}, {24384, "8000"}, {26384, "10000"}, - {29184, "12800"}, {29184, "16000"}, {29184, "20000"}, {29184, "25600"}, {29184, "32000"}, - {29184, "40000"}, {29184, "H1(51200)"}, {29184, "H2(102400)"}}; + {0, N_("n/a")}, + {14, N_("Auto High")}, + {15, N_("Auto")}, + {16, "50"}, + {17, "100"}, + {18, "200"}, + {19, "400"}, + {20, "800"}, + {16464, "80"}, + {16484, "100"}, + {16509, "125"}, + {16544, "160"}, + {16584, "200"}, + {16634, "250"}, + {16704, "320"}, + {16784, "400"}, + {16884, "500"}, + {17024, "640"}, + {17184, "800"}, + {17384, "1000"}, + {17634, "1250"}, + {17984, "1600"}, + {18384, "2000"}, + {18884, "2500"}, + {19584, "3200"}, + {20384, "4000"}, + {21384, "5000"}, + {22784, "6400"}, + {24384, "8000"}, + {26384, "10000"}, + {29184, "12800"}, + {29184, "16000"}, + {29184, "20000"}, + {29184, "25600"}, + {29184, "32000"}, + {29184, "40000"}, + {29184, "H1(51200)"}, + {29184, "H2(102400)"}, + }; //! MeteringMode, tag 0x0011 - constexpr TagDetails canonCsMeteringMode[] = {{0, N_("Default")}, {1, N_("Spot")}, - {2, N_("Average")}, {3, N_("Evaluative")}, - {4, N_("Partial")}, {5, N_("Center-weighted average")}}; + constexpr TagDetails canonCsMeteringMode[] = { + {0, N_("Default")}, + {1, N_("Spot")}, + {2, N_("Average")}, + {3, N_("Evaluative")}, + {4, N_("Partial")}, + {5, N_("Center-weighted average")}, + }; //! FocusType, tag 0x0012 - constexpr TagDetails canonCsFocusType[] = {{0, N_("Manual")}, {1, N_("Auto")}, {2, N_("Not known")}, - {3, N_("Macro")}, {4, N_("Very close")}, {5, N_("Close")}, - {6, N_("Middle range")}, {7, N_("Far range")}, {8, N_("Pan focus")}, - {9, N_("Super macro")}, {10, N_("Infinity")}}; + constexpr TagDetails canonCsFocusType[] = { + {0, N_("Manual")}, + {1, N_("Auto")}, + {2, N_("Not known")}, + {3, N_("Macro")}, + {4, N_("Very close")}, + {5, N_("Close")}, + {6, N_("Middle range")}, + {7, N_("Far range")}, + {8, N_("Pan focus")}, + {9, N_("Super macro")}, + {10, N_("Infinity")}, + }; //! AFPoint, tag 0x0013 - constexpr TagDetails canonCsAfPoint[] = {{0x2005, N_("Manual AF point selection")}, - {0x3000, N_("None (MF)")}, - {0x3001, N_("Auto-selected")}, - {0x3002, N_("Right")}, - {0x3003, N_("Center")}, - {0x3004, N_("Left")}, - {0x4001, N_("Auto AF point selection")}, - {0x4006, N_("Face Detect")}}; + constexpr TagDetails canonCsAfPoint[] = { + {0x2005, N_("Manual AF point selection")}, + {0x3000, N_("None (MF)")}, + {0x3001, N_("Auto-selected")}, + {0x3002, N_("Right")}, + {0x3003, N_("Center")}, + {0x3004, N_("Left")}, + {0x4001, N_("Auto AF point selection")}, + {0x4006, N_("Face Detect")}, + }; //! ExposureProgram, tag 0x0014 - constexpr TagDetails canonCsExposureProgram[] = {{0, N_("Easy shooting (Auto)")}, - {1, N_("Program (P)")}, - {2, N_("Shutter priority (Tv)")}, - {3, N_("Aperture priority (Av)")}, - {4, N_("Manual (M)")}, - {5, N_("A-DEP")}, - {6, N_("M-DEP")}, - {7, N_("Bulb")}}; + constexpr TagDetails canonCsExposureProgram[] = { + {0, N_("Easy shooting (Auto)")}, + {1, N_("Program (P)")}, + {2, N_("Shutter priority (Tv)")}, + {3, N_("Aperture priority (Av)")}, + {4, N_("Manual (M)")}, + {5, N_("A-DEP")}, + {6, N_("M-DEP")}, + {7, N_("Bulb")}, + }; //! LensType, tag 0x0016 constexpr TagDetails canonCsLensType[] = { @@ -1935,44 +2151,90 @@ namespace Exiv2::Internal {65535, "n/a"}}; //! FlashActivity, tag 0x001c - constexpr TagDetails canonCsFlashActivity[] = {{0, N_("Did not fire")}, {1, N_("Fired")}}; + constexpr TagDetails canonCsFlashActivity[] = { + {0, N_("Did not fire")}, + {1, N_("Fired")}, + }; //! FlashDetails, tag 0x001d constexpr TagDetailsBitmask canonCsFlashDetails[] = { - {0x4000, N_("External flash")}, {0x2000, N_("Internal flash")}, - {0x0001, N_("Manual")}, {0x0002, N_("TTL")}, - {0x0004, N_("A-TTL")}, {0x0008, N_("E-TTL")}, - {0x0010, N_("FP sync enabled")}, {0x0080, N_("2nd-curtain sync used")}, - {0x0800, N_("FP sync used")}}; + {0x4000, N_("External flash")}, + {0x2000, N_("Internal flash")}, + {0x0001, N_("Manual")}, + {0x0002, N_("TTL")}, + {0x0004, N_("A-TTL")}, + {0x0008, N_("E-TTL")}, + {0x0010, N_("FP sync enabled")}, + {0x0080, N_("2nd-curtain sync used")}, + {0x0800, N_("FP sync used")}, + }; //! FocusContinuous, tag 0x0020 - constexpr TagDetails canonCsFocusContinuous[] = {{0, N_("Single")}, {1, N_("Continuous")}, {8, N_("Manual")}}; + constexpr TagDetails canonCsFocusContinuous[] = { + {0, N_("Single")}, + {1, N_("Continuous")}, + {8, N_("Manual")}, + }; //! AESetting, tag 0x0021 - constexpr TagDetails canonCsAESetting[] = {{0, N_("Normal AE")}, {1, N_("Exposure compensation")}, - {2, N_("AE lock")}, {3, N_("AE lock + exposure compensation")}, - {4, N_("No AE")}, {65535, N_("n/a")}}; + constexpr TagDetails canonCsAESetting[] = { + {0, N_("Normal AE")}, + {1, N_("Exposure compensation")}, + {2, N_("AE lock")}, + {3, N_("AE lock + exposure compensation")}, + {4, N_("No AE")}, + {65535, N_("n/a")}, + }; //! ImageStabilization, tag 0x0022 constexpr TagDetails canonCsImageStabilization[] = { - {0, N_("Off")}, {1, N_("On")}, {2, N_("Shoot Only")}, {3, N_("Panning")}, - {4, N_("Dynamic")}, {256, N_("Off (2)")}, {257, N_("On (2)")}, {258, N_("Shoot Only (2)")}, - {259, N_("Panning (2)")}, {260, N_("Dynamic (2)")}}; + {0, N_("Off")}, + {1, N_("On")}, + {2, N_("Shoot Only")}, + {3, N_("Panning")}, + {4, N_("Dynamic")}, + {256, N_("Off (2)")}, + {257, N_("On (2)")}, + {258, N_("Shoot Only (2)")}, + {259, N_("Panning (2)")}, + {260, N_("Dynamic (2)")}, + }; //! SpotMeteringMode, tag 0x0027 - constexpr TagDetails canonCsSpotMeteringMode[] = {{0, N_("Center")}, {1, N_("AF Point")}, {65535, N_("n/a")}}; + constexpr TagDetails canonCsSpotMeteringMode[] = { + {0, N_("Center")}, + {1, N_("AF Point")}, + {65535, N_("n/a")}, + }; //! PhotoEffect, tag 0x0028 - constexpr TagDetails canonCsPhotoEffect[] = {{0, N_("Off")}, {1, N_("Vivid")}, {2, N_("Neutral")}, - {3, N_("Smooth")}, {4, N_("Sepia")}, {5, N_("B&W")}, - {6, N_("Custom")}, {100, N_("My color data")}, {65535, N_("n/a")}}; + constexpr TagDetails canonCsPhotoEffect[] = { + {0, N_("Off")}, + {1, N_("Vivid")}, + {2, N_("Neutral")}, + {3, N_("Smooth")}, + {4, N_("Sepia")}, + {5, N_("B&W")}, + {6, N_("Custom")}, + {100, N_("My color data")}, + {65535, N_("n/a")}, + }; //! ManualFlashOutput, tag 0x0029 [[maybe_unused]] constexpr TagDetails canonCsManualFlashOutput[] = { - {0x0000, N_("n/a")}, {0x0500, N_("Full")}, {0x0502, N_("Medium")}, {0x0504, N_("Low")}, {0x7fff, N_("n/a")}}; + {0x0000, N_("n/a")}, + {0x0500, N_("Full")}, + {0x0502, N_("Medium")}, + {0x0504, N_("Low")}, + {0x7fff, N_("n/a")}, + }; //! SRAWQuality, tag 0x002e - constexpr TagDetails canonCsSRAWQuality[] = {{0, N_("n/a")}, {1, N_("sRAW1 (mRAW)")}, {2, N_("sRAW2 (sRAW)")}}; + constexpr TagDetails canonCsSRAWQuality[] = { + {0, N_("n/a")}, + {1, N_("sRAW1 (mRAW)")}, + {2, N_("sRAW2 (sRAW)")}, + }; // Canon Camera Settings Tag Info constexpr TagInfo CanonMakerNote::tagInfoCs_[] = { @@ -2065,31 +2327,75 @@ namespace Exiv2::Internal //! AFPointUsed, tag 0x000e constexpr TagDetailsBitmask canonSiAFPointUsed[] = { - {0x0004, N_("left")}, {0x0002, N_("center")}, {0x0001, N_("right")}}; + {0x0004, N_("left")}, + {0x0002, N_("center")}, + {0x0001, N_("right")}, + }; //! FlashBias, tag 0x000f constexpr TagDetails canonSiFlashBias[] = { - {0xffc0, "-2 EV"}, {0xffcc, "-1.67 EV"}, {0xffd0, "-1.50 EV"}, {0xffd4, "-1.33 EV"}, {0xffe0, "-1 EV"}, - {0xffec, "-0.67 EV"}, {0xfff0, "-0.50 EV"}, {0xfff4, "-0.33 EV"}, {0x0000, "0 EV"}, {0x000c, "0.33 EV"}, - {0x0010, "0.50 EV"}, {0x0014, "0.67 EV"}, {0x0020, "1 EV"}, {0x002c, "1.33 EV"}, {0x0030, "1.50 EV"}, - {0x0034, "1.67 EV"}, {0x0040, "2 EV"}}; + {0xffc0, "-2 EV"}, + {0xffcc, "-1.67 EV"}, + {0xffd0, "-1.50 EV"}, + {0xffd4, "-1.33 EV"}, + {0xffe0, "-1 EV"}, + {0xffec, "-0.67 EV"}, + {0xfff0, "-0.50 EV"}, + {0xfff4, "-0.33 EV"}, + {0x0000, "0 EV"}, + {0x000c, "0.33 EV"}, + {0x0010, "0.50 EV"}, + {0x0014, "0.67 EV"}, + {0x0020, "1 EV"}, + {0x002c, "1.33 EV"}, + {0x0030, "1.50 EV"}, + {0x0034, "1.67 EV"}, + {0x0040, "2 EV"}, + }; constexpr TagDetails cameraType[] = { - {0, "n/a"}, {248, "EOS High-end"}, {250, "Compact"}, {252, "EOS Mid-range"}, {255, "DV Camera"}, + {0, "n/a"}, + {248, "EOS High-end"}, + {250, "Compact"}, + {252, "EOS Mid-range"}, + {255, "DV Camera"}, }; constexpr TagDetails autoExposureBracketing[] = { - {65535, "On"}, {0, "Off"}, {1, "On (shot 1)"}, {2, "On (shot 2)"}, {3, "On (shot 3)"}, + {65535, "On"}, + {0, "Off"}, + {1, "On (shot 1)"}, + {2, "On (shot 2)"}, + {3, "On (shot 3)"}, }; - constexpr TagDetails slowShutter[] = {{65535, "n/a"}, {0, "Off"}, {1, "Night Scene"}, {2, "On"}, {3, "None"}}; + constexpr TagDetails slowShutter[] = { + {65535, "n/a"}, + {0, "Off"}, + {1, "Night Scene"}, + {2, "On"}, + {3, "None"}, + }; constexpr TagDetails autoRotate[] = { - {-1, "n/a"}, {0, "None"}, {1, "Rotate 90 CW"}, {2, "Rotate 180"}, {3, "Rotate 270 CW"}}; + {-1, "n/a"}, + {0, "None"}, + {1, "Rotate 90 CW"}, + {2, "Rotate 180"}, + {3, "Rotate 270 CW"}, + }; - constexpr TagDetails ndRotate[] = {{65535, "n/a"}, {0, "Off"}, {1, "On"}}; + constexpr TagDetails ndRotate[] = { + {65535, "n/a"}, + {0, "Off"}, + {1, "On"}, + }; - constexpr TagDetails selfTimer2[] = {{65535, "n/a"}, {0, "Selftimer 2s"}, {1, "Selftimer 10s"}}; + constexpr TagDetails selfTimer2[] = { + {65535, "n/a"}, + {0, "Selftimer 2s"}, + {1, "Selftimer 10s"}, + }; // Canon Shot Info Tag constexpr TagInfo CanonMakerNote::tagInfoSi_[] = { @@ -2159,11 +2465,13 @@ namespace Exiv2::Internal } //! PanoramaDirection, tag 0x0005 - constexpr TagDetails canonPaDirection[] = {{0, N_("Left to right")}, - {1, N_("Right to left")}, - {2, N_("Bottom to top")}, - {3, N_("Top to bottom")}, - {4, N_("2x2 matrix (Clockwise)")}}; + constexpr TagDetails canonPaDirection[] = { + {0, N_("Left to right")}, + {1, N_("Right to left")}, + {2, N_("Bottom to top")}, + {3, N_("Top to bottom")}, + {4, N_("2x2 matrix (Clockwise)")}, + }; // Canon Panorama Info constexpr TagInfo CanonMakerNote::tagInfoPa_[] = { @@ -2225,14 +2533,27 @@ namespace Exiv2::Internal //! AFPointsUsed, tag 0x0016 constexpr TagDetailsBitmask canonPiAFPointsUsed[] = { - {0x01, N_("right")}, {0x02, N_("mid-right")}, {0x04, N_("bottom")}, {0x08, N_("center")}, - {0x10, N_("top")}, {0x20, N_("mid-left")}, {0x40, N_("left")}}; + {0x01, N_("right")}, + {0x02, N_("mid-right")}, + {0x04, N_("bottom")}, + {0x08, N_("center")}, + {0x10, N_("top")}, + {0x20, N_("mid-left")}, + {0x40, N_("left")}, + }; //! AFPointsUsed20D, tag 0x001a constexpr TagDetailsBitmask canonPiAFPointsUsed20D[] = { - {0x001, N_("top")}, {0x002, N_("upper-left")}, {0x004, N_("upper-right")}, - {0x008, N_("left")}, {0x010, N_("center")}, {0x020, N_("right")}, - {0x040, N_("lower-left")}, {0x080, N_("lower-right")}, {0x100, N_("bottom")}}; + {0x001, N_("top")}, + {0x002, N_("upper-left")}, + {0x004, N_("upper-right")}, + {0x008, N_("left")}, + {0x010, N_("center")}, + {0x020, N_("right")}, + {0x040, N_("lower-left")}, + {0x080, N_("lower-right")}, + {0x100, N_("bottom")}, + }; // Canon Picture Info Tag constexpr TagInfo CanonMakerNote::tagInfoPi_[] = { @@ -2260,69 +2581,97 @@ namespace Exiv2::Internal //! BracketMode, tag 0x0003 constexpr TagDetails canonBracketMode[] = { - {0, N_("Off")}, {1, N_("AEB")}, {2, N_("FEB")}, {3, N_("ISO")}, {4, N_("WB")}}; + {0, N_("Off")}, + {1, N_("AEB")}, + {2, N_("FEB")}, + {3, N_("ISO")}, + {4, N_("WB")}, + }; //! RawJpgSize, tag 0x0007 - constexpr TagDetails canonRawJpgSize[] = {{-1, N_("n/a")}, - {0, N_("Large")}, - {1, N_("Medium")}, - {2, N_("Small")}, - {5, N_("Medium 1")}, - {6, N_("Medium 2")}, - {7, N_("Medium 3")}, - {8, N_("Postcard")}, - {9, N_("Widescreen")}, - {10, N_("Medium Widescreen")}, - {14, N_("Small 1")}, - {15, N_("Small 2")}, - {16, N_("Small 3")}, - {128, N_("640x480 Movie")}, - {129, N_("Medium Movie")}, - {130, N_("Small Movie")}, - {137, N_("1280x720 Movie")}, - {142, N_("1920x1080 Movie")}, - {143, N_("4096x2160 Movie")}}; + constexpr TagDetails canonRawJpgSize[] = { + {-1, N_("n/a")}, + {0, N_("Large")}, + {1, N_("Medium")}, + {2, N_("Small")}, + {5, N_("Medium 1")}, + {6, N_("Medium 2")}, + {7, N_("Medium 3")}, + {8, N_("Postcard")}, + {9, N_("Widescreen")}, + {10, N_("Medium Widescreen")}, + {14, N_("Small 1")}, + {15, N_("Small 2")}, + {16, N_("Small 3")}, + {128, N_("640x480 Movie")}, + {129, N_("Medium Movie")}, + {130, N_("Small Movie")}, + {137, N_("1280x720 Movie")}, + {142, N_("1920x1080 Movie")}, + {143, N_("4096x2160 Movie")}, + }; //! NoiseReduction, tag 0x0008 constexpr TagDetails canonNoiseReduction[] = { - {0, N_("Off")}, {1, N_("On 1")}, {2, N_("On 2")}, {3, N_("On")}, {4, N_("Auto")}}; + {0, N_("Off")}, + {1, N_("On 1")}, + {2, N_("On 2")}, + {3, N_("On")}, + {4, N_("Auto")}, + }; //! WBBracketMode, tag 0x0009 - constexpr TagDetails canonWBBracketMode[] = {{0, N_("Off")}, {1, N_("On (shift AB)")}, {2, N_("On (shift GM)")}}; + constexpr TagDetails canonWBBracketMode[] = { + {0, N_("Off")}, + {1, N_("On (shift AB)")}, + {2, N_("On (shift GM)")}, + }; //! FilterEffect, tag 0x000e constexpr TagDetails canonFilterEffect[] = { - {0, N_("None")}, {1, N_("Yellow")}, {2, N_("Orange")}, {3, N_("Red")}, {4, N_("Green")}}; + {0, N_("None")}, + {1, N_("Yellow")}, + {2, N_("Orange")}, + {3, N_("Red")}, + {4, N_("Green")}, + }; //! ToningEffect, tag 0x000e constexpr TagDetails canonToningEffect[] = { - {0, N_("None")}, {1, N_("Sepia")}, {2, N_("Blue")}, {3, N_("Purple")}, {4, N_("Green")}}; + {0, N_("None")}, + {1, N_("Sepia")}, + {2, N_("Blue")}, + {3, N_("Purple")}, + {4, N_("Green")}, + }; //! RFLensType, tag 0x003D - constexpr TagDetails canonRFLensType[] = {{0, N_("n/a")}, - {257, N_("Canon RF 50mm F1.2L USM")}, - {258, N_("Canon RF 24-105mm F4L IS USM")}, - {259, N_("Canon RF 28-70mm F2L USM")}, - {260, N_("Canon RF 35mm F1.8 MACRO IS STM")}, - {261, N_("Canon RF 85mm F1.2L USM")}, - {262, N_("Canon RF 85mm F1.2L USM DS")}, - {263, N_("Canon RF 24-70mm F2.8L IS USM")}, - {264, N_("Canon RF 15-35mm F2.8L IS USM")}, - {265, N_("Canon RF 24-240mm F4-6.3 IS USM")}, - {266, N_("Canon RF 70-200mm F2.8L IS USM")}, - {267, N_("Canon RF 85mm F2 MACRO IS STM")}, - {268, N_("Canon RF 600mm F11 IS STM")}, - {269, N_("Canon RF 600mm F11 IS STM + RF1.4x")}, - {270, N_("Canon RF 600mm F11 IS STM + RF2x")}, - {271, N_("Canon RF 800mm F11 IS STM")}, - {272, N_("Canon RF 800mm F11 IS STM + RF1.4x")}, - {273, N_("Canon RF 800mm F11 IS STM + RF2x")}, - {274, N_("Canon RF 24-105mm F4-7.1 IS STM")}, - {275, N_("Canon RF 100-500mm F4.5-7.1L IS USM")}, - {276, N_("Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x")}, - {277, N_("Canon RF 100-500mm F4.5-7.1L IS USM + RF2x")}, - {278, N_("Canon RF 70-200mm F4L IS USM")}, - {280, N_("Canon RF 50mm F1.8 STM")}}; + constexpr TagDetails canonRFLensType[] = { + {0, N_("n/a")}, + {257, N_("Canon RF 50mm F1.2L USM")}, + {258, N_("Canon RF 24-105mm F4L IS USM")}, + {259, N_("Canon RF 28-70mm F2L USM")}, + {260, N_("Canon RF 35mm F1.8 MACRO IS STM")}, + {261, N_("Canon RF 85mm F1.2L USM")}, + {262, N_("Canon RF 85mm F1.2L USM DS")}, + {263, N_("Canon RF 24-70mm F2.8L IS USM")}, + {264, N_("Canon RF 15-35mm F2.8L IS USM")}, + {265, N_("Canon RF 24-240mm F4-6.3 IS USM")}, + {266, N_("Canon RF 70-200mm F2.8L IS USM")}, + {267, N_("Canon RF 85mm F2 MACRO IS STM")}, + {268, N_("Canon RF 600mm F11 IS STM")}, + {269, N_("Canon RF 600mm F11 IS STM + RF1.4x")}, + {270, N_("Canon RF 600mm F11 IS STM + RF2x")}, + {271, N_("Canon RF 800mm F11 IS STM")}, + {272, N_("Canon RF 800mm F11 IS STM + RF1.4x")}, + {273, N_("Canon RF 800mm F11 IS STM + RF2x")}, + {274, N_("Canon RF 24-105mm F4-7.1 IS STM")}, + {275, N_("Canon RF 100-500mm F4.5-7.1L IS USM")}, + {276, N_("Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x")}, + {277, N_("Canon RF 100-500mm F4.5-7.1L IS USM + RF2x")}, + {278, N_("Canon RF 70-200mm F4L IS USM")}, + {280, N_("Canon RF 50mm F1.8 STM")}, + }; // Canon File Info Tag constexpr TagInfo CanonMakerNote::tagInfoFi_[] = { @@ -2373,11 +2722,21 @@ namespace Exiv2::Internal } //! Tone Curve Values - constexpr TagDetails canonToneCurve[] = {{0, N_("Standard")}, {1, N_("Manual")}, {2, N_("Custom")}}; + constexpr TagDetails canonToneCurve[] = { + {0, N_("Standard")}, + {1, N_("Manual")}, + {2, N_("Custom")}, + }; //! Sharpness Frequency Values - constexpr TagDetails canonSharpnessFrequency[] = {{0, N_("n/a")}, {1, N_("Lowest")}, {2, N_("Low")}, - {3, N_("Standard")}, {4, N_("High")}, {5, N_("Highest")}}; + constexpr TagDetails canonSharpnessFrequency[] = { + {0, N_("n/a")}, + {1, N_("Lowest")}, + {2, N_("Low")}, + {3, N_("Standard")}, + {4, N_("High")}, + {5, N_("Highest")}, + }; // Canon Processing Info Tag constexpr TagInfo CanonMakerNote::tagInfoPr_[] = { @@ -2806,7 +3165,8 @@ namespace Exiv2::Internal if (used == 0) { os << "none"; } else { - EXV_PRINT_TAG_BITMASK(canonSiAFPointUsed)(os, value, pExifData); + EXV_PRINT_TAG_BITMASK(canonSiAFPointUsed) + (os, value, pExifData); } os << " used"; return os; diff --git a/src/casiomn_int.cpp b/src/casiomn_int.cpp index 03f5728c75..02c0031c55 100644 --- a/src/casiomn_int.cpp +++ b/src/casiomn_int.cpp @@ -23,9 +23,7 @@ namespace Exiv2::Internal { //! RecordingMode, tag 0x0001 constexpr TagDetails casioRecordingMode[] = { - {1, N_("Single Shutter")}, {2, N_("Panorama")}, {3, N_("Night Scene")}, - {4, N_("Portrait")}, {5, N_("Landscape")}, {7, N_("Panorama")}, - {10, N_("Night Scene")}, {15, N_("Portrait")}, {16, N_("Landscape")}}; + {1, N_("Single Shutter")}, {2, N_("Panorama")}, {3, N_("Night Scene")}, {4, N_("Portrait")}, {5, N_("Landscape")}, {7, N_("Panorama")}, {10, N_("Night Scene")}, {15, N_("Portrait")}, {16, N_("Landscape")}}; //! Quality, tag 0x0002 constexpr TagDetails casioQuality[] = {{1, N_("Economy")}, {2, N_("Normal")}, {3, N_("Fine")}}; @@ -43,34 +41,26 @@ namespace Exiv2::Internal {11, N_("Weak")}, {12, N_("Low")}, {13, N_("Normal")}, {14, N_("High")}, {15, N_("Strong")}}; //! white balance, tag 0x0007 - constexpr TagDetails casioWhiteBalance[] = {{1, N_("Auto")}, {2, N_("Tungsten")}, {3, N_("Daylight")}, - {4, N_("Fluorescent")}, {5, N_("Shade")}, {129, N_("Manual")}}; + constexpr TagDetails casioWhiteBalance[] = {{1, N_("Auto")}, {2, N_("Tungsten")}, {3, N_("Daylight")}, {4, N_("Fluorescent")}, {5, N_("Shade")}, {129, N_("Manual")}}; //! Flash intensity, tag 0x0005 - constexpr TagDetails casioDigitalZoom[] = {{0x10000, N_("Off")}, {0x10001, N_("2x")}, {0x13333, N_("1.2x")}, - {0x13ae1, N_("1.23x")}, {0x19999, N_("1.6x")}, {0x20000, N_("2x")}, - {0x33333, N_("3.2x")}, {0x40000, N_("4x")}}; + constexpr TagDetails casioDigitalZoom[] = {{0x10000, N_("Off")}, {0x10001, N_("2x")}, {0x13333, N_("1.2x")}, {0x13ae1, N_("1.23x")}, {0x19999, N_("1.6x")}, {0x20000, N_("2x")}, {0x33333, N_("3.2x")}, {0x40000, N_("4x")}}; //! Sharpness, tag 0x000b - constexpr TagDetails casioSharpness[] = {{0, N_("Normal")}, {1, N_("Soft")}, {2, N_("Hard")}, - {16, N_("Normal")}, {17, N_("+1")}, {18, N_("-1")}}; + constexpr TagDetails casioSharpness[] = {{0, N_("Normal")}, {1, N_("Soft")}, {2, N_("Hard")}, {16, N_("Normal")}, {17, N_("+1")}, {18, N_("-1")}}; //! Contrast, tag 0x000c - constexpr TagDetails casioContrast[] = {{0, N_("Normal")}, {1, N_("Low")}, {2, N_("High")}, - {16, N_("Normal")}, {17, N_("+1")}, {18, N_("-1")}}; + constexpr TagDetails casioContrast[] = {{0, N_("Normal")}, {1, N_("Low")}, {2, N_("High")}, {16, N_("Normal")}, {17, N_("+1")}, {18, N_("-1")}}; //! Saturation, tag 0x000d - constexpr TagDetails casioSaturation[] = {{0, N_("Normal")}, {1, N_("Low")}, {2, N_("High")}, - {16, N_("Normal")}, {17, N_("+1")}, {18, N_("-1")}}; + constexpr TagDetails casioSaturation[] = {{0, N_("Normal")}, {1, N_("Low")}, {2, N_("High")}, {16, N_("Normal")}, {17, N_("+1")}, {18, N_("-1")}}; //! Enhancement, tag 0x0016 constexpr TagDetails casioEnhancement[] = { {1, N_("Off")}, {2, N_("Red")}, {3, N_("Green")}, {4, N_("Blue")}, {5, N_("Flesh Tones")}}; //! Color filter, tag 0x0017 - constexpr TagDetails casioColorFilter[] = {{1, N_("Off")}, {2, N_("Black & White")}, {3, N_("Sepia")}, - {4, N_("Red")}, {5, N_("Green")}, {6, N_("Blue")}, - {7, N_("Yellow")}, {8, N_("Pink")}, {9, N_("Purple")}}; + constexpr TagDetails casioColorFilter[] = {{1, N_("Off")}, {2, N_("Black & White")}, {3, N_("Sepia")}, {4, N_("Red")}, {5, N_("Green")}, {6, N_("Blue")}, {7, N_("Yellow")}, {8, N_("Pink")}, {9, N_("Purple")}}; //! flash intensity 2, tag 0x0019 constexpr TagDetails casioFlashIntensity2[] = {{1, N_("Normal")}, {2, N_("Weak")}, {3, N_("Strong")}}; @@ -178,8 +168,7 @@ namespace Exiv2::Internal constexpr TagDetails casio2QualityMode[] = {{0, N_("Economy")}, {1, N_("Normal")}, {2, N_("Fine")}}; //! Image Size, tag 0x0009 - constexpr TagDetails casio2ImageSize[] = {{0, "640x480"}, {4, "1600x1200"}, {5, "2048x1536"}, {20, "2288x1712"}, - {21, "2592x1944"}, {22, "2304x1728"}, {36, "3008x2008"}}; + constexpr TagDetails casio2ImageSize[] = {{0, "640x480"}, {4, "1600x1200"}, {5, "2048x1536"}, {20, "2288x1712"}, {21, "2592x1944"}, {22, "2304x1728"}, {36, "3008x2008"}}; //! Focus Mode, tag 0x000d constexpr TagDetails casio2FocusMode[] = {{0, N_("Normal")}, {1, N_("Macro")}}; @@ -188,8 +177,7 @@ namespace Exiv2::Internal constexpr TagDetails casio2IsoSpeed[] = {{3, "50"}, {4, "64"}, {6, "100"}, {9, "200"}}; //! White Balance, tag 0x0019 - constexpr TagDetails casio2WhiteBalance[] = {{0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Shade")}, - {3, N_("Tungsten")}, {4, N_("Fluorescent")}, {5, N_("Manual")}}; + constexpr TagDetails casio2WhiteBalance[] = {{0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Shade")}, {3, N_("Tungsten")}, {4, N_("Fluorescent")}, {5, N_("Manual")}}; //! Saturation, tag 0x001f constexpr TagDetails casio2Saturation[] = {{0, N_("Low")}, {1, N_("Normal")}, {2, N_("High")}}; @@ -201,9 +189,7 @@ namespace Exiv2::Internal constexpr TagDetails casio2Sharpness[] = {{0, N_("Soft")}, {1, N_("Normal")}, {2, N_("Hard")}}; //! White Balance2, tag 0x2012 - constexpr TagDetails casio2WhiteBalance2[] = {{0, N_("Manual")}, {1, N_("Daylight")}, {2, N_("Cloudy")}, - {3, N_("Shade")}, {4, N_("Flash")}, {6, N_("Fluorescent")}, - {9, N_("Tungsten")}, {10, N_("Tungsten")}, {12, N_("Flash")}}; + constexpr TagDetails casio2WhiteBalance2[] = {{0, N_("Manual")}, {1, N_("Daylight")}, {2, N_("Cloudy")}, {3, N_("Shade")}, {4, N_("Flash")}, {6, N_("Fluorescent")}, {9, N_("Tungsten")}, {10, N_("Tungsten")}, {12, N_("Flash")}}; //! Release Mode, tag 0x3001 constexpr TagDetails casio2ReleaseMode[] = {{1, N_("Normal")}, @@ -216,10 +202,7 @@ namespace Exiv2::Internal constexpr TagDetails casio2Quality[] = {{1, N_("Economy")}, {2, N_("Normal")}, {3, N_("Fine")}}; //! Focus Mode 2, tag 0x3003 - constexpr TagDetails casio2FocusMode2[] = {{0, N_("Manual")}, {1, N_("Focus Lock")}, - {2, N_("Macro")}, {3, N_("Single-Area Auto Focus")}, - {5, N_("Infinity")}, {6, N_("Multi-Area Auto Focus")}, - {8, N_("Super Macro")}}; + constexpr TagDetails casio2FocusMode2[] = {{0, N_("Manual")}, {1, N_("Focus Lock")}, {2, N_("Macro")}, {3, N_("Single-Area Auto Focus")}, {5, N_("Infinity")}, {6, N_("Multi-Area Auto Focus")}, {8, N_("Super Macro")}}; //! AutoISO, tag 0x3008 constexpr TagDetails casio2AutoISO[] = {{1, N_("On")}, @@ -229,9 +212,7 @@ namespace Exiv2::Internal {10, N_("High Speed")}}; //! AFMode, tag 0x3009 - constexpr TagDetails casio2AFMode[] = {{0, N_("Off")}, {1, N_("Spot")}, - {2, N_("Multi")}, {3, N_("Face Detection")}, - {4, N_("Tracking")}, {5, N_("Intelligent")}}; + constexpr TagDetails casio2AFMode[] = {{0, N_("Off")}, {1, N_("Spot")}, {2, N_("Multi")}, {3, N_("Face Detection")}, {4, N_("Tracking")}, {5, N_("Intelligent")}}; //! ColorMode, tag 0x3015 constexpr TagDetails casio2ColorMode[] = {{0, N_("Off")}, {2, N_("Black & White")}, {3, N_("Sepia")}}; @@ -243,16 +224,11 @@ namespace Exiv2::Internal }; //! Color Filter, tag 0x3017 - constexpr TagDetails casio2ColorFilter[] = {{0, N_("Off")}, {1, N_("Blue")}, {3, N_("Green")}, {4, N_("Yellow")}, - {5, N_("Red")}, {6, N_("Purple")}, {7, N_("Pink")}}; + constexpr TagDetails casio2ColorFilter[] = {{0, N_("Off")}, {1, N_("Blue")}, {3, N_("Green")}, {4, N_("Yellow")}, {5, N_("Red")}, {6, N_("Purple")}, {7, N_("Pink")}}; //! Art Mode, tag 0x301b constexpr TagDetails casio2ArtMode[] = { - {0, N_("Normal")}, {8, N_("Silent Movie")}, {39, N_("HDR")}, - {45, N_("Premium Auto")}, {47, N_("Painting")}, {49, N_("Crayon Drawing")}, - {51, N_("Panorama")}, {52, N_("Art HDR")}, {62, N_("High Speed Night Shot")}, - {64, N_("Monochrome")}, {67, N_("Toy Camera")}, {68, N_("Pop Art")}, - {69, N_("Light Tone")}}; + {0, N_("Normal")}, {8, N_("Silent Movie")}, {39, N_("HDR")}, {45, N_("Premium Auto")}, {47, N_("Painting")}, {49, N_("Crayon Drawing")}, {51, N_("Panorama")}, {52, N_("Art HDR")}, {62, N_("High Speed Night Shot")}, {64, N_("Monochrome")}, {67, N_("Toy Camera")}, {68, N_("Pop Art")}, {69, N_("Light Tone")}}; //! Lighting Mode, tag 0x302a constexpr TagDetails casio2LightingMode[] = { @@ -266,14 +242,7 @@ namespace Exiv2::Internal {0, N_("Off")}, {1, N_("Makeup")}, {2, N_("Mist Removal")}, {3, N_("Vivid Landscape")}, {16, N_("Art Shot")}}; //! Drive Mode, tag 0x3103 - constexpr TagDetails casio2DriveMode[] = {{0, N_("Single Shot")}, {1, N_("Continuous Shooting")}, - {2, N_("Continuous (2 fps)")}, {3, N_("Continuous (3 fps)")}, - {4, N_("Continuous (4 fps)")}, {5, N_("Continuous (5 fps)")}, - {6, N_("Continuous (6 fps)")}, {7, N_("Continuous (7 fps)")}, - {10, N_("Continuous (10 fps)")}, {12, N_("Continuous (12 fps)")}, - {15, N_("Continuous (15 fps)")}, {20, N_("Continuous (20 fps)")}, - {30, N_("Continuous (30 fps)")}, {40, N_("Continuous (40 fps)")}, - {60, N_("Continuous (60 fps)")}, {240, N_("Auto-N")}}; + constexpr TagDetails casio2DriveMode[] = {{0, N_("Single Shot")}, {1, N_("Continuous Shooting")}, {2, N_("Continuous (2 fps)")}, {3, N_("Continuous (3 fps)")}, {4, N_("Continuous (4 fps)")}, {5, N_("Continuous (5 fps)")}, {6, N_("Continuous (6 fps)")}, {7, N_("Continuous (7 fps)")}, {10, N_("Continuous (10 fps)")}, {12, N_("Continuous (12 fps)")}, {15, N_("Continuous (15 fps)")}, {20, N_("Continuous (20 fps)")}, {30, N_("Continuous (30 fps)")}, {40, N_("Continuous (40 fps)")}, {60, N_("Continuous (60 fps)")}, {240, N_("Auto-N")}}; //! Video Quality, tag 0x4003 constexpr TagDetails casio2VideoQuality[] = { diff --git a/src/convert.cpp b/src/convert.cpp index 39f486324f..33d2d94eb7 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -535,7 +535,8 @@ namespace Exiv2 { for (auto&& c : conversion_) { if ((c.metadataId_ == mdExif && exifData_) || (c.metadataId_ == mdIptc && iptcData_)) { - EXV_CALL_MEMBER_FN(*this, c.key1ToKey2_)(c.key1_, c.key2_); + EXV_CALL_MEMBER_FN(*this, c.key1ToKey2_) + (c.key1_, c.key2_); } } } @@ -544,7 +545,8 @@ namespace Exiv2 { for (auto&& c : conversion_) { if ((c.metadataId_ == mdExif && exifData_) || (c.metadataId_ == mdIptc && iptcData_)) { - EXV_CALL_MEMBER_FN(*this, c.key2ToKey1_)(c.key2_, c.key1_); + EXV_CALL_MEMBER_FN(*this, c.key2ToKey1_) + (c.key2_, c.key1_); } } } diff --git a/src/cr2header_int.cpp b/src/cr2header_int.cpp index c35091fd15..c6429c139f 100644 --- a/src/cr2header_int.cpp +++ b/src/cr2header_int.cpp @@ -4,7 +4,8 @@ namespace Exiv2::Internal { - Cr2Header::Cr2Header(ByteOrder byteOrder) : TiffHeaderBase(42, 16, byteOrder, 0x00000010), offset2_(0x00000000) + Cr2Header::Cr2Header(ByteOrder byteOrder) + : TiffHeaderBase(42, 16, byteOrder, 0x00000010), offset2_(0x00000000) { } diff --git a/src/crwimage_int.cpp b/src/crwimage_int.cpp index f784204c3a..72d4d58309 100644 --- a/src/crwimage_int.cpp +++ b/src/crwimage_int.cpp @@ -40,7 +40,13 @@ namespace namespace { constexpr RotationMap::OmList RotationMap::omList_[] = { - {1, 0}, {3, 180}, {3, -180}, {6, 90}, {6, -270}, {8, 270}, {8, -90}, + {1, 0}, + {3, 180}, + {3, -180}, + {6, 90}, + {6, -270}, + {8, 270}, + {8, -90}, }; uint16_t RotationMap::orientation(int32_t degrees) @@ -134,8 +140,14 @@ namespace Exiv2::Internal */ const CrwSubDir CrwMap::crwSubDir_[] = { // dir, parent - {0x3004, 0x2807}, {0x300b, 0x300a}, {0x3003, 0x300a}, {0x3002, 0x300a}, - {0x2807, 0x300a}, {0x2804, 0x300a}, {0x300a, 0x0000}, {0x0000, 0xffff}, + {0x3004, 0x2807}, + {0x300b, 0x300a}, + {0x3003, 0x300a}, + {0x3002, 0x300a}, + {0x2807, 0x300a}, + {0x2804, 0x300a}, + {0x300a, 0x0000}, + {0x0000, 0xffff}, }; const char CiffHeader::signature_[] = "HEAPCCDR"; diff --git a/src/crwimage_int.hpp b/src/crwimage_int.hpp index 12ba9ad171..1f327a1832 100644 --- a/src/crwimage_int.hpp +++ b/src/crwimage_int.hpp @@ -65,7 +65,8 @@ namespace Exiv2::Internal //! Default constructor CiffComponent() = default; //! Constructor taking a tag and directory - CiffComponent(uint16_t tag, uint16_t dir) : dir_(dir), tag_(tag) + CiffComponent(uint16_t tag, uint16_t dir) + : dir_(dir), tag_(tag) { } //! Virtual destructor. @@ -308,7 +309,8 @@ namespace Exiv2::Internal //! Default constructor CiffEntry() = default; //! Constructor taking a tag and directory - CiffEntry(uint16_t tag, uint16_t dir) : CiffComponent(tag, dir) + CiffEntry(uint16_t tag, uint16_t dir) + : CiffComponent(tag, dir) { } //@} @@ -345,7 +347,8 @@ namespace Exiv2::Internal //! Default constructor CiffDirectory() = default; //! Constructor taking a tag and directory - CiffDirectory(uint16_t tag, uint16_t dir) : CiffComponent(tag, dir) + CiffDirectory(uint16_t tag, uint16_t dir) + : CiffComponent(tag, dir) { } diff --git a/src/datasets.cpp b/src/datasets.cpp index 7d28e69f09..dd9baf6e2e 100644 --- a/src/datasets.cpp +++ b/src/datasets.cpp @@ -355,8 +355,17 @@ namespace Exiv2 }; constexpr DataSet unknownDataSet{ - 0xffff, "Unknown dataset", N_("Unknown dataset"), N_("Unknown dataset"), false, true, 0, - 0xffffffff, Exiv2::string, IptcDataSets::invalidRecord, N_("Unknown dataset"), + 0xffff, + "Unknown dataset", + N_("Unknown dataset"), + N_("Unknown dataset"), + false, + true, + 0, + 0xffffffff, + Exiv2::string, + IptcDataSets::invalidRecord, + N_("Unknown dataset"), }; const DataSet* IptcDataSets::envelopeRecordList() @@ -515,17 +524,20 @@ namespace Exiv2 } } - IptcKey::IptcKey(std::string key) : key_(std::move(key)) + IptcKey::IptcKey(std::string key) + : key_(std::move(key)) { decomposeKey(); } - IptcKey::IptcKey(uint16_t tag, uint16_t record) : tag_(tag), record_(record) + IptcKey::IptcKey(uint16_t tag, uint16_t record) + : tag_(tag), record_(record) { makeKey(); } - IptcKey::IptcKey(const IptcKey& rhs) : tag_(rhs.tag_), record_(rhs.record_), key_(rhs.key_) + IptcKey::IptcKey(const IptcKey& rhs) + : tag_(rhs.tag_), record_(rhs.record_), key_(rhs.key_) { } diff --git a/src/easyaccess.cpp b/src/easyaccess.cpp index 5ca6c4431c..66bb84baaa 100644 --- a/src/easyaccess.cpp +++ b/src/easyaccess.cpp @@ -35,10 +35,10 @@ namespace Exiv2 ExifData::const_iterator orientation(const ExifData& ed) { static const char* keys[] = { - "Exif.Image.Orientation", "Exif.Panasonic.Rotation", "Exif.MinoltaCs5D.Rotation", - "Exif.MinoltaCs5D.Rotation2", "Exif.MinoltaCs7D.Rotation", "Exif.Sony1MltCsA100.Rotation", - "Exif.Sony1Cs.Rotation", "Exif.Sony2Cs.Rotation", "Exif.Sony1Cs2.Rotation", - "Exif.Sony2Cs2.Rotation", "Exif.Sony1MltCsA100.Rotation"}; + "Exif.Image.Orientation", "Exif.Panasonic.Rotation", "Exif.MinoltaCs5D.Rotation", + "Exif.MinoltaCs5D.Rotation2", "Exif.MinoltaCs7D.Rotation", "Exif.Sony1MltCsA100.Rotation", + "Exif.Sony1Cs.Rotation", "Exif.Sony2Cs.Rotation", "Exif.Sony1Cs2.Rotation", + "Exif.Sony2Cs2.Rotation", "Exif.Sony1MltCsA100.Rotation"}; return findMetadatum(ed, keys, std::size(keys)); } @@ -163,20 +163,20 @@ namespace Exiv2 ExifData::const_iterator flashBias(const ExifData& ed) { - static const char* keys[] = {"Exif.CanonSi.FlashBias", "Exif.Panasonic.FlashBias", - "Exif.Olympus.FlashBias", "Exif.OlympusCs.FlashExposureComp", + static const char* keys[] = {"Exif.CanonSi.FlashBias", "Exif.Panasonic.FlashBias", + "Exif.Olympus.FlashBias", "Exif.OlympusCs.FlashExposureComp", "Exif.Minolta.FlashExposureComp", "Exif.SonyMinolta.FlashExposureComp", - "Exif.Sony1.FlashExposureComp", "Exif.Sony2.FlashExposureComp"}; + "Exif.Sony1.FlashExposureComp", "Exif.Sony2.FlashExposureComp"}; return findMetadatum(ed, keys, std::size(keys)); } ExifData::const_iterator exposureMode(const ExifData& ed) { static const char* keys[] = { - "Exif.Photo.ExposureProgram", "Exif.Image.ExposureProgram", "Exif.CanonCs.ExposureProgram", - "Exif.MinoltaCs7D.ExposureMode", "Exif.MinoltaCs5D.ExposureMode", "Exif.MinoltaCsNew.ExposureMode", + "Exif.Photo.ExposureProgram", "Exif.Image.ExposureProgram", "Exif.CanonCs.ExposureProgram", + "Exif.MinoltaCs7D.ExposureMode", "Exif.MinoltaCs5D.ExposureMode", "Exif.MinoltaCsNew.ExposureMode", "Exif.MinoltaCsOld.ExposureMode", "Exif.Sony1MltCsA100.ExposureMode", "Exif.Sony1Cs.ExposureProgram", - "Exif.Sony2Cs.ExposureProgram", "Exif.Sigma.ExposureMode"}; + "Exif.Sony2Cs.ExposureProgram", "Exif.Sigma.ExposureMode"}; return findMetadatum(ed, keys, std::size(keys)); } @@ -202,37 +202,37 @@ namespace Exiv2 ExifData::const_iterator macroMode(const ExifData& ed) { static const char* keys[] = { - "Exif.CanonCs.Macro", "Exif.Fujifilm.Macro", "Exif.Olympus.Macro", - "Exif.OlympusCs.MacroMode", "Exif.Panasonic.Macro", "Exif.MinoltaCsNew.MacroMode", - "Exif.MinoltaCsOld.MacroMode", "Exif.Sony1.Macro", "Exif.Sony2.Macro"}; + "Exif.CanonCs.Macro", "Exif.Fujifilm.Macro", "Exif.Olympus.Macro", + "Exif.OlympusCs.MacroMode", "Exif.Panasonic.Macro", "Exif.MinoltaCsNew.MacroMode", + "Exif.MinoltaCsOld.MacroMode", "Exif.Sony1.Macro", "Exif.Sony2.Macro"}; return findMetadatum(ed, keys, std::size(keys)); } ExifData::const_iterator imageQuality(const ExifData& ed) { static const char* keys[] = { - "Exif.CanonCs.Quality", "Exif.Fujifilm.Quality", "Exif.Sigma.Quality", - "Exif.Nikon1.Quality", "Exif.Nikon2.Quality", "Exif.Nikon3.Quality", - "Exif.Olympus.Quality", "Exif.OlympusCs.Quality", "Exif.Panasonic.Quality", - "Exif.Minolta.Quality", "Exif.MinoltaCsNew.Quality", "Exif.MinoltaCsOld.Quality", - "Exif.MinoltaCs5D.Quality", "Exif.MinoltaCs7D.Quality", "Exif.Sony1MltCsA100.Quality", - "Exif.Sony1.JPEGQuality", "Exif.Sony1.Quality", "Exif.Sony1Cs.Quality", - "Exif.Sony2.JPEGQuality", "Exif.Sony2.Quality", "Exif.Sony2Cs.Quality", - "Exif.Casio.Quality", "Exif.Casio2.QualityMode", "Exif.Casio2.Quality"}; + "Exif.CanonCs.Quality", "Exif.Fujifilm.Quality", "Exif.Sigma.Quality", + "Exif.Nikon1.Quality", "Exif.Nikon2.Quality", "Exif.Nikon3.Quality", + "Exif.Olympus.Quality", "Exif.OlympusCs.Quality", "Exif.Panasonic.Quality", + "Exif.Minolta.Quality", "Exif.MinoltaCsNew.Quality", "Exif.MinoltaCsOld.Quality", + "Exif.MinoltaCs5D.Quality", "Exif.MinoltaCs7D.Quality", "Exif.Sony1MltCsA100.Quality", + "Exif.Sony1.JPEGQuality", "Exif.Sony1.Quality", "Exif.Sony1Cs.Quality", + "Exif.Sony2.JPEGQuality", "Exif.Sony2.Quality", "Exif.Sony2Cs.Quality", + "Exif.Casio.Quality", "Exif.Casio2.QualityMode", "Exif.Casio2.Quality"}; return findMetadatum(ed, keys, std::size(keys)); } ExifData::const_iterator whiteBalance(const ExifData& ed) { static const char* keys[] = { - "Exif.CanonSi.WhiteBalance", "Exif.Fujifilm.WhiteBalance", "Exif.Sigma.WhiteBalance", - "Exif.Nikon1.WhiteBalance", "Exif.Nikon2.WhiteBalance", "Exif.Nikon3.WhiteBalance", - "Exif.Olympus.WhiteBalance", "Exif.OlympusCs.WhiteBalance", "Exif.Panasonic.WhiteBalance", - "Exif.MinoltaCs5D.WhiteBalance", "Exif.MinoltaCs7D.WhiteBalance", "Exif.MinoltaCsNew.WhiteBalance", - "Exif.MinoltaCsOld.WhiteBalance", "Exif.Minolta.WhiteBalance", "Exif.Sony1MltCsA100.WhiteBalance", - "Exif.SonyMinolta.WhiteBalance", "Exif.Sony1.WhiteBalance", "Exif.Sony2.WhiteBalance", - "Exif.Sony1.WhiteBalance2", "Exif.Sony2.WhiteBalance2", "Exif.Casio.WhiteBalance", - "Exif.Casio2.WhiteBalance", "Exif.Casio2.WhiteBalance2", "Exif.Photo.WhiteBalance"}; + "Exif.CanonSi.WhiteBalance", "Exif.Fujifilm.WhiteBalance", "Exif.Sigma.WhiteBalance", + "Exif.Nikon1.WhiteBalance", "Exif.Nikon2.WhiteBalance", "Exif.Nikon3.WhiteBalance", + "Exif.Olympus.WhiteBalance", "Exif.OlympusCs.WhiteBalance", "Exif.Panasonic.WhiteBalance", + "Exif.MinoltaCs5D.WhiteBalance", "Exif.MinoltaCs7D.WhiteBalance", "Exif.MinoltaCsNew.WhiteBalance", + "Exif.MinoltaCsOld.WhiteBalance", "Exif.Minolta.WhiteBalance", "Exif.Sony1MltCsA100.WhiteBalance", + "Exif.SonyMinolta.WhiteBalance", "Exif.Sony1.WhiteBalance", "Exif.Sony2.WhiteBalance", + "Exif.Sony1.WhiteBalance2", "Exif.Sony2.WhiteBalance2", "Exif.Casio.WhiteBalance", + "Exif.Casio2.WhiteBalance", "Exif.Casio2.WhiteBalance2", "Exif.Photo.WhiteBalance"}; return findMetadatum(ed, keys, std::size(keys)); } @@ -241,45 +241,45 @@ namespace Exiv2 static const char* keys[] = { // Exif.Canon.LensModel only reports focal length. // Try Exif.CanonCs.LensType first. - "Exif.CanonCs.LensType", "Exif.Photo.LensModel", "Exif.NikonLd1.LensIDNumber", + "Exif.CanonCs.LensType", "Exif.Photo.LensModel", "Exif.NikonLd1.LensIDNumber", "Exif.NikonLd2.LensIDNumber", "Exif.NikonLd3.LensIDNumber", "Exif.Pentax.LensType", - "Exif.PentaxDng.LensType", "Exif.Minolta.LensID", "Exif.SonyMinolta.LensID", - "Exif.Sony1.LensID", "Exif.Sony2.LensID", "Exif.OlympusEq.LensType", - "Exif.Panasonic.LensType", "Exif.Samsung2.LensType"}; + "Exif.PentaxDng.LensType", "Exif.Minolta.LensID", "Exif.SonyMinolta.LensID", + "Exif.Sony1.LensID", "Exif.Sony2.LensID", "Exif.OlympusEq.LensType", + "Exif.Panasonic.LensType", "Exif.Samsung2.LensType"}; return findMetadatum(ed, keys, std::size(keys)); } ExifData::const_iterator saturation(const ExifData& ed) { static const char* keys[] = { - "Exif.Photo.Saturation", "Exif.CanonCs.Saturation", "Exif.MinoltaCsNew.Saturation", + "Exif.Photo.Saturation", "Exif.CanonCs.Saturation", "Exif.MinoltaCsNew.Saturation", "Exif.MinoltaCsOld.Saturation", "Exif.MinoltaCs7D.Saturation", "Exif.MinoltaCs5D.Saturation", - "Exif.Fujifilm.Color", "Exif.Nikon3.Saturation", "Exif.Panasonic.Saturation", - "Exif.Pentax.Saturation", "Exif.PentaxDng.Saturation", "Exif.Sigma.Saturation", - "Exif.Casio.Saturation", "Exif.Casio2.Saturation", "Exif.Casio2.Saturation2"}; + "Exif.Fujifilm.Color", "Exif.Nikon3.Saturation", "Exif.Panasonic.Saturation", + "Exif.Pentax.Saturation", "Exif.PentaxDng.Saturation", "Exif.Sigma.Saturation", + "Exif.Casio.Saturation", "Exif.Casio2.Saturation", "Exif.Casio2.Saturation2"}; return findMetadatum(ed, keys, std::size(keys)); } ExifData::const_iterator sharpness(const ExifData& ed) { static const char* keys[] = { - "Exif.Photo.Sharpness", "Exif.CanonCs.Sharpness", "Exif.Fujifilm.Sharpness", - "Exif.MinoltaCsNew.Sharpness", "Exif.MinoltaCsOld.Sharpness", "Exif.MinoltaCs7D.Sharpness", - "Exif.MinoltaCs5D.Sharpness", "Exif.Olympus.SharpnessFactor", "Exif.Panasonic.Sharpness", - "Exif.Pentax.Sharpness", "Exif.PentaxDng.Sharpness", "Exif.Sigma.Sharpness", - "Exif.Casio.Sharpness", "Exif.Casio2.Sharpness", "Exif.Casio2.Sharpness2"}; + "Exif.Photo.Sharpness", "Exif.CanonCs.Sharpness", "Exif.Fujifilm.Sharpness", + "Exif.MinoltaCsNew.Sharpness", "Exif.MinoltaCsOld.Sharpness", "Exif.MinoltaCs7D.Sharpness", + "Exif.MinoltaCs5D.Sharpness", "Exif.Olympus.SharpnessFactor", "Exif.Panasonic.Sharpness", + "Exif.Pentax.Sharpness", "Exif.PentaxDng.Sharpness", "Exif.Sigma.Sharpness", + "Exif.Casio.Sharpness", "Exif.Casio2.Sharpness", "Exif.Casio2.Sharpness2"}; return findMetadatum(ed, keys, std::size(keys)); } ExifData::const_iterator contrast(const ExifData& ed) { - static const char* keys[] = {"Exif.Photo.Contrast", "Exif.CanonCs.Contrast", - "Exif.Fujifilm.Tone", "Exif.MinoltaCsNew.Contrast", + static const char* keys[] = {"Exif.Photo.Contrast", "Exif.CanonCs.Contrast", + "Exif.Fujifilm.Tone", "Exif.MinoltaCsNew.Contrast", "Exif.MinoltaCsOld.Contrast", "Exif.MinoltaCs7D.Contrast", - "Exif.MinoltaCs5D.Contrast", "Exif.Olympus.Contrast", - "Exif.Panasonic.Contrast", "Exif.Pentax.Contrast", - "Exif.PentaxDng.Contrast", "Exif.Sigma.Contrast", - "Exif.Casio.Contrast", "Exif.Casio2.Contrast", + "Exif.MinoltaCs5D.Contrast", "Exif.Olympus.Contrast", + "Exif.Panasonic.Contrast", "Exif.Pentax.Contrast", + "Exif.PentaxDng.Contrast", "Exif.Sigma.Contrast", + "Exif.Casio.Contrast", "Exif.Casio2.Contrast", "Exif.Casio2.Contrast2" }; @@ -357,11 +357,11 @@ namespace Exiv2 ExifData::const_iterator subjectDistance(const ExifData& ed) { static const char* keys[] = { - "Exif.Photo.SubjectDistance", "Exif.Image.SubjectDistance", "Exif.CanonSi.SubjectDistance", + "Exif.Photo.SubjectDistance", "Exif.Image.SubjectDistance", "Exif.CanonSi.SubjectDistance", "Exif.CanonFi.FocusDistanceUpper", "Exif.CanonFi.FocusDistanceLower", "Exif.MinoltaCsNew.FocusDistance", - "Exif.Nikon1.FocusDistance", "Exif.Nikon3.FocusDistance", "Exif.NikonLd2.FocusDistance", - "Exif.NikonLd3.FocusDistance", "Exif.Olympus.FocusDistance", "Exif.OlympusFi.FocusDistance", - "Exif.Casio.ObjectDistance", "Exif.Casio2.ObjectDistance"}; + "Exif.Nikon1.FocusDistance", "Exif.Nikon3.FocusDistance", "Exif.NikonLd2.FocusDistance", + "Exif.NikonLd3.FocusDistance", "Exif.Olympus.FocusDistance", "Exif.OlympusFi.FocusDistance", + "Exif.Casio.ObjectDistance", "Exif.Casio2.ObjectDistance"}; return findMetadatum(ed, keys, std::size(keys)); } @@ -380,8 +380,8 @@ namespace Exiv2 ExifData::const_iterator serialNumber(const ExifData& ed) { static const char* keys[] = {"Exif.Image.CameraSerialNumber", "Exif.Canon.SerialNumber", - "Exif.Nikon3.SerialNumber", "Exif.Nikon3.SerialNO", - "Exif.Fujifilm.SerialNumber", "Exif.Olympus.SerialNumber2", + "Exif.Nikon3.SerialNumber", "Exif.Nikon3.SerialNO", + "Exif.Fujifilm.SerialNumber", "Exif.Olympus.SerialNumber2", "Exif.Sigma.SerialNumber"}; return findMetadatum(ed, keys, std::size(keys)); } @@ -389,9 +389,9 @@ namespace Exiv2 ExifData::const_iterator focalLength(const ExifData& ed) { static const char* keys[] = { - "Exif.Photo.FocalLength", "Exif.Image.FocalLength", "Exif.Canon.FocalLength", - "Exif.NikonLd2.FocalLength", "Exif.NikonLd3.FocalLength", "Exif.MinoltaCsNew.FocalLength", - "Exif.Pentax.FocalLength", "Exif.PentaxDng.FocalLength", "Exif.Casio2.FocalLength"}; + "Exif.Photo.FocalLength", "Exif.Image.FocalLength", "Exif.Canon.FocalLength", + "Exif.NikonLd2.FocalLength", "Exif.NikonLd3.FocalLength", "Exif.MinoltaCsNew.FocalLength", + "Exif.Pentax.FocalLength", "Exif.PentaxDng.FocalLength", "Exif.Casio2.FocalLength"}; return findMetadatum(ed, keys, std::size(keys)); } diff --git a/src/epsimage.cpp b/src/epsimage.cpp index 59f07f65cb..ece22bb8d6 100644 --- a/src/epsimage.cpp +++ b/src/epsimage.cpp @@ -1120,7 +1120,8 @@ namespace // class member definitions namespace Exiv2 { - EpsImage::EpsImage(BasicIo::UniquePtr io, bool create) : Image(ImageType::eps, mdXmp, std::move(io)) + EpsImage::EpsImage(BasicIo::UniquePtr io, bool create) + : Image(ImageType::eps, mdXmp, std::move(io)) { // LogMsg::setLevel(LogMsg::debug); if (create) { diff --git a/src/error.cpp b/src/error.cpp index 77f9eaa767..c4a32baa7e 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -14,83 +14,83 @@ namespace { //! Complete list of Exiv2 exception error messages constexpr std::array errList{ - N_("Success"), // kerSuccess - N_("Error %0: arg2=%2, arg3=%3, arg1=%1."), // KerGeneralError - "%1", // kerErrorMessage, - "%1: Call to `%3' failed: %2", // KerCallFailed, %1=path, %2=strerror, %3=function that failed - N_("This does not look like a %1 image"), // kerNotAnImage, %1=Image type - N_("Invalid dataset name '%1'"), // kerInvalidDataset %1=dataset name - N_("Invalid record name '%1'"), // kerInvalidRecord %1=record name - N_("Invalid key '%1'"), // kerInvalidKey %1=key - N_("Invalid tag name or ifdId `%1', ifdId %2"), // kerInvalidTag %1=tag name, %2=ifdId - N_("%1 value not set"), // kerValueNotSet %1=key name - N_("%1: Failed to open the data source: %2"), // kerDataSourceOpenFailed %1=path, %2=strerror - N_("%1: Failed to open file (%2): %3"), // kerFileOpenFailed %1=path, %2=mode, %3=strerror - N_("%1: The file contains data of an unknown image type"), // kerFileContainsUnknownImageType %1=path - N_("The memory contains data of an unknown image type"), // kerMemoryContainsUnknownImageType - N_("Image type %1 is not supported"), // kerUnsupportedImageType %1=image type - N_("Failed to read image data"), // kerFailedToReadImageData - N_("This does not look like a JPEG image"), // kerNotAJpeg - N_("%1: Failed to map file for reading and writing: %2"), // kerFailedToMapFileForReadWrite %1=path, - // %2=strerror - N_("%1: Failed to rename file to %2: %3"), // kerFileRenameFailed %1=old path, %2=new path, %3=strerror - N_("%1: Transfer failed: %2"), // kerTransferFailed %1=path, %2=strerror - N_("Memory transfer failed: %1"), // kerMemoryTransferFailed %1=strerror - N_("Failed to read input data"), // kerInputDataReadFailed - N_("Failed to write image"), // kerImageWriteFailed - N_("Input data does not contain a valid image"), // kerNoImageInInputData - N_("Invalid ifdId %1"), // kerInvalidIfdId %1=ifdId - N_("Entry::setValue: Value too large (tag=%1, size=%2, requested=%3)"), // kerValueTooLarge %1=tag, - // %2=dataSize, %3=required size - N_("Entry::setDataArea: Value too large (tag=%1, size=%2, requested=%3)"), // kerDataAreaValueTooLarge %1=tag, - // %2=dataAreaSize, %3=required size - N_("Offset out of range"), // kerOffsetOutOfRange - N_("Unsupported data area offset type"), // kerUnsupportedDataAreaOffsetType - N_("Invalid charset: `%1'"), // kerInvalidCharset %1=charset name - N_("Unsupported date format"), // kerUnsupportedDateFormat - N_("Unsupported time format"), // kerUnsupportedTimeFormat - N_("Writing to %1 images is not supported"), // kerWritingImageFormatUnsupported %1=image format - N_("Setting %1 in %2 images is not supported"), // kerInvalidSettingForImage %1=metadata type, %2=image format - N_("This does not look like a CRW image"), // kerNotACrwImage - N_("%1: Not supported"), // kerFunctionNotSupported %1=function - N_("No namespace info available for XMP prefix `%1'"), // kerNoNamespaceInfoForXmpPrefix %1=prefix - N_("No prefix registered for namespace `%2', needed for property path `%1'"), // kerNoPrefixForNamespace - // %1=namespace - N_("Size of %1 JPEG segment is larger than 65535 bytes"), // kerTooLargeJpegSegment %1=type of metadata (Exif, - // IPTC, JPEG comment) - N_("Unhandled Xmpdatum %1 of type %2"), // kerUnhandledXmpdatum %1=key, %2=value type - N_("Unhandled XMP node %1 with opt=%2"), // kerUnhandledXmpNode %1=key, %2=XMP Toolkit option flags - N_("XMP Toolkit error %1: %2"), // kerXMPToolkitError %1=XMP_Error::GetID(), %2=XMP_Error::GetErrMsg() - N_("Failed to decode Lang Alt property %1 with opt=%2"), // kerDecodeLangAltPropertyFailed %1=property path, - // %3=XMP Toolkit option flags - N_("Failed to decode Lang Alt qualifier %1 with opt=%2"), // kerDecodeLangAltQualifierFailed %1=qualifier path, - // %3=XMP Toolkit option flags - N_("Failed to encode Lang Alt property %1"), // kerEncodeLangAltPropertyFailed %1=key - N_("Failed to determine property name from path %1, namespace %2"), // kerPropertyNameIdentificationFailed - // %1=property path, %2=namespace - N_("Schema namespace %1 is not registered with the XMP Toolkit"), // kerSchemaNamespaceNotRegistered - // %1=namespace - N_("No namespace registered for prefix `%1'"), // kerNoNamespaceForPrefix %1=prefix + N_("Success"), // kerSuccess + N_("Error %0: arg2=%2, arg3=%3, arg1=%1."), // KerGeneralError + "%1", // kerErrorMessage, + "%1: Call to `%3' failed: %2", // KerCallFailed, %1=path, %2=strerror, %3=function that failed + N_("This does not look like a %1 image"), // kerNotAnImage, %1=Image type + N_("Invalid dataset name '%1'"), // kerInvalidDataset %1=dataset name + N_("Invalid record name '%1'"), // kerInvalidRecord %1=record name + N_("Invalid key '%1'"), // kerInvalidKey %1=key + N_("Invalid tag name or ifdId `%1', ifdId %2"), // kerInvalidTag %1=tag name, %2=ifdId + N_("%1 value not set"), // kerValueNotSet %1=key name + N_("%1: Failed to open the data source: %2"), // kerDataSourceOpenFailed %1=path, %2=strerror + N_("%1: Failed to open file (%2): %3"), // kerFileOpenFailed %1=path, %2=mode, %3=strerror + N_("%1: The file contains data of an unknown image type"), // kerFileContainsUnknownImageType %1=path + N_("The memory contains data of an unknown image type"), // kerMemoryContainsUnknownImageType + N_("Image type %1 is not supported"), // kerUnsupportedImageType %1=image type + N_("Failed to read image data"), // kerFailedToReadImageData + N_("This does not look like a JPEG image"), // kerNotAJpeg + N_("%1: Failed to map file for reading and writing: %2"), // kerFailedToMapFileForReadWrite %1=path, + // %2=strerror + N_("%1: Failed to rename file to %2: %3"), // kerFileRenameFailed %1=old path, %2=new path, %3=strerror + N_("%1: Transfer failed: %2"), // kerTransferFailed %1=path, %2=strerror + N_("Memory transfer failed: %1"), // kerMemoryTransferFailed %1=strerror + N_("Failed to read input data"), // kerInputDataReadFailed + N_("Failed to write image"), // kerImageWriteFailed + N_("Input data does not contain a valid image"), // kerNoImageInInputData + N_("Invalid ifdId %1"), // kerInvalidIfdId %1=ifdId + N_("Entry::setValue: Value too large (tag=%1, size=%2, requested=%3)"), // kerValueTooLarge %1=tag, + // %2=dataSize, %3=required size + N_("Entry::setDataArea: Value too large (tag=%1, size=%2, requested=%3)"), // kerDataAreaValueTooLarge %1=tag, + // %2=dataAreaSize, %3=required size + N_("Offset out of range"), // kerOffsetOutOfRange + N_("Unsupported data area offset type"), // kerUnsupportedDataAreaOffsetType + N_("Invalid charset: `%1'"), // kerInvalidCharset %1=charset name + N_("Unsupported date format"), // kerUnsupportedDateFormat + N_("Unsupported time format"), // kerUnsupportedTimeFormat + N_("Writing to %1 images is not supported"), // kerWritingImageFormatUnsupported %1=image format + N_("Setting %1 in %2 images is not supported"), // kerInvalidSettingForImage %1=metadata type, %2=image format + N_("This does not look like a CRW image"), // kerNotACrwImage + N_("%1: Not supported"), // kerFunctionNotSupported %1=function + N_("No namespace info available for XMP prefix `%1'"), // kerNoNamespaceInfoForXmpPrefix %1=prefix + N_("No prefix registered for namespace `%2', needed for property path `%1'"), // kerNoPrefixForNamespace + // %1=namespace + N_("Size of %1 JPEG segment is larger than 65535 bytes"), // kerTooLargeJpegSegment %1=type of metadata (Exif, + // IPTC, JPEG comment) + N_("Unhandled Xmpdatum %1 of type %2"), // kerUnhandledXmpdatum %1=key, %2=value type + N_("Unhandled XMP node %1 with opt=%2"), // kerUnhandledXmpNode %1=key, %2=XMP Toolkit option flags + N_("XMP Toolkit error %1: %2"), // kerXMPToolkitError %1=XMP_Error::GetID(), %2=XMP_Error::GetErrMsg() + N_("Failed to decode Lang Alt property %1 with opt=%2"), // kerDecodeLangAltPropertyFailed %1=property path, + // %3=XMP Toolkit option flags + N_("Failed to decode Lang Alt qualifier %1 with opt=%2"), // kerDecodeLangAltQualifierFailed %1=qualifier path, + // %3=XMP Toolkit option flags + N_("Failed to encode Lang Alt property %1"), // kerEncodeLangAltPropertyFailed %1=key + N_("Failed to determine property name from path %1, namespace %2"), // kerPropertyNameIdentificationFailed + // %1=property path, %2=namespace + N_("Schema namespace %1 is not registered with the XMP Toolkit"), // kerSchemaNamespaceNotRegistered + // %1=namespace + N_("No namespace registered for prefix `%1'"), // kerNoNamespaceForPrefix %1=prefix N_("Aliases are not supported. Please send this XMP packet to ahuggel@gmx.net `%1', `%2', `%3'"), // kerAliasesNotSupported // %1=namespace, // %2=property // path, // %3=value - N_("Invalid XmpText type `%1'"), // kerInvalidXmpText %1=type - N_("TIFF directory %1 has too many entries"), // kerTooManyTiffDirectoryEntries %1=TIFF directory name - N_("Multiple TIFF array element tags %1 in one directory"), // kerMultipleTiffArrayElementTagsInDirectory - // %1=tag number - N_("TIFF array element tag %1 has wrong type"), // kerWrongTiffArrayElementTagType %1=tag number - N_("%1 has invalid XMP value type `%2'"), // kerInvalidKeyXmpValue %1=key, %2=value type - N_("Not a valid ICC Profile"), // kerInvalidIccProfile - N_("Not valid XMP"), // kerInvalidXMP - N_("tiff directory length is too large"), // kerTiffDirectoryTooLarge - N_("invalid type in tiff structure"), // kerInvalidTypeValue - N_("Invalid LangAlt value `%1'"), // kerInvalidLangAltValue %1=value - N_("invalid memory allocation request"), // kerInvalidMalloc - N_("corrupted image metadata"), // kerCorruptedMetadata - N_("Arithmetic operation overflow"), // kerArithmeticOverflow - N_("Memory allocation failed"), // kerMallocFailed + N_("Invalid XmpText type `%1'"), // kerInvalidXmpText %1=type + N_("TIFF directory %1 has too many entries"), // kerTooManyTiffDirectoryEntries %1=TIFF directory name + N_("Multiple TIFF array element tags %1 in one directory"), // kerMultipleTiffArrayElementTagsInDirectory + // %1=tag number + N_("TIFF array element tag %1 has wrong type"), // kerWrongTiffArrayElementTagType %1=tag number + N_("%1 has invalid XMP value type `%2'"), // kerInvalidKeyXmpValue %1=key, %2=value type + N_("Not a valid ICC Profile"), // kerInvalidIccProfile + N_("Not valid XMP"), // kerInvalidXMP + N_("tiff directory length is too large"), // kerTiffDirectoryTooLarge + N_("invalid type in tiff structure"), // kerInvalidTypeValue + N_("Invalid LangAlt value `%1'"), // kerInvalidLangAltValue %1=value + N_("invalid memory allocation request"), // kerInvalidMalloc + N_("corrupted image metadata"), // kerCorruptedMetadata + N_("Arithmetic operation overflow"), // kerArithmeticOverflow + N_("Memory allocation failed"), // kerMallocFailed }; static_assert(errList.size() == static_cast(Exiv2::ErrorCode::kerErrorCount), "errList needs to contain a error msg for every ErrorCode defined in error.hpp"); @@ -104,7 +104,8 @@ namespace Exiv2 LogMsg::Level LogMsg::level_ = LogMsg::warn; // Default output level LogMsg::Handler LogMsg::handler_ = LogMsg::defaultHandler; - LogMsg::LogMsg(LogMsg::Level msgType) : msgType_(msgType) + LogMsg::LogMsg(LogMsg::Level msgType) + : msgType_(msgType) { } @@ -160,7 +161,8 @@ namespace Exiv2 std::cerr << s; } - Error::Error(ErrorCode code) : code_(code) + Error::Error(ErrorCode code) + : code_(code) { setMsg(0); } diff --git a/src/exif.cpp b/src/exif.cpp index 993b34fea1..a2919d36a7 100644 --- a/src/exif.cpp +++ b/src/exif.cpp @@ -37,7 +37,8 @@ namespace { public: //! Constructor, initializes the object with the key to look for - explicit FindExifdatumByKey(std::string key) : key_(std::move(key)) + explicit FindExifdatumByKey(std::string key) + : key_(std::move(key)) { } /*! @@ -161,13 +162,15 @@ namespace Exiv2 return exifDatum; } - Exifdatum::Exifdatum(const ExifKey& key, const Value* pValue) : key_(key.clone()) + Exifdatum::Exifdatum(const ExifKey& key, const Value* pValue) + : key_(key.clone()) { if (pValue) value_ = pValue->clone(); } - Exifdatum::Exifdatum(const Exifdatum& rhs) : Metadatum(rhs) + Exifdatum::Exifdatum(const Exifdatum& rhs) + : Metadatum(rhs) { if (rhs.key_) key_ = rhs.key_->clone(); // deep copy @@ -411,7 +414,8 @@ namespace Exiv2 return value_ ? value_->dataArea() : DataBuf(nullptr, 0); } - ExifThumbC::ExifThumbC(const ExifData& exifData) : exifData_(exifData) + ExifThumbC::ExifThumbC(const ExifData& exifData) + : exifData_(exifData) { } @@ -453,7 +457,8 @@ namespace Exiv2 return thumbnail->extension(); } - ExifThumb::ExifThumb(ExifData& exifData) : ExifThumbC(exifData), exifData_(exifData) + ExifThumb::ExifThumb(ExifData& exifData) + : ExifThumbC(exifData), exifData_(exifData) { } @@ -624,7 +629,7 @@ namespace Exiv2 // Delete IFDs which do not occur in JPEGs static const IfdId filteredIfds[] = {subImage1Id, subImage2Id, subImage3Id, subImage4Id, subImage5Id, subImage6Id, subImage7Id, subImage8Id, subImage9Id, subThumb1Id, - panaRawId, ifd2Id, ifd3Id}; + panaRawId, ifd2Id, ifd3Id}; for (auto&& filteredIfd : filteredIfds) { #ifdef EXIV2_DEBUG_MESSAGES std::cerr << "Warning: Exif IFD " << filteredIfds << " not encoded\n"; diff --git a/src/fujimn_int.cpp b/src/fujimn_int.cpp index 5da6e4d5fa..c4ef27e70b 100644 --- a/src/fujimn_int.cpp +++ b/src/fujimn_int.cpp @@ -27,13 +27,16 @@ namespace Exiv2::Internal //! Sharpness, tag 0x1001 constexpr TagDetails fujiSharpness[] = { - {1, N_("Soft mode 1")}, {2, N_("Soft mode 2")}, {3, N_("Normal")}, - {4, N_("Hard mode 1")}, {5, N_("Hard mode 2")}, + {1, N_("Soft mode 1")}, + {2, N_("Soft mode 2")}, + {3, N_("Normal")}, + {4, N_("Hard mode 1")}, + {5, N_("Hard mode 2")}, }; //! WhiteBalance, tag 0x1002 constexpr TagDetails fujiWhiteBalance[] = { - {0, N_("Auto")}, + {0, N_("Auto")}, // {256, N_("Daylight")}, {512, N_("Cloudy")}, {768, N_("Fluorescent (daylight)")}, @@ -66,8 +69,13 @@ namespace Exiv2::Internal //! FlashMode, tag 0x1010 constexpr TagDetails fujiFlashMode[] = { - {0, N_("Auto")}, {1, N_("On")}, {2, N_("Off")}, {3, N_("Red-eye reduction")}, - {4, N_("External")}, {16, N_("Commander")}, {16, N_("Commander")}, // To silence compiler warning + {0, N_("Auto")}, // + {1, N_("On")}, + {2, N_("Off")}, + {3, N_("Red-eye reduction")}, + {4, N_("External")}, + {16, N_("Commander")}, + {16, N_("Commander")}, // To silence compiler warning }; //! FocusMode, tag 0x1021 @@ -104,8 +112,13 @@ namespace Exiv2::Internal //! ShadowTone, tag 0x1040 //! HighlightTone, tag 0x041 constexpr TagDetails fujiSHTone[] = { - {-64, N_("+4")}, {-48, N_("+3")}, {-32, N_("+2")}, {-16, N_("+1")}, - {0, N_("0")}, {16, N_("-1")}, {32, N_("-2")}, + {-64, N_("+4")}, + {-48, N_("+3")}, + {-32, N_("+2")}, + {-16, N_("+1")}, + {0, N_("0")}, + {16, N_("-1")}, + {32, N_("-2")}, }; //! Continuous, tag 0x1100 @@ -145,9 +158,12 @@ namespace Exiv2::Internal //! DynamicRange, tag 0x1402 constexpr TagDetails fujiDynamicRangeSetting[] = { - {0, N_("Auto (100-400%)")}, {1, N_("Raw")}, - {256, N_("Standard (100%)")}, {512, N_("Wide mode 1 (230%)")}, - {513, N_("Wide mode 2 (400%)")}, {32768, N_("Film simulation mode")}, + {0, N_("Auto (100-400%)")}, + {1, N_("Raw")}, + {256, N_("Standard (100%)")}, + {512, N_("Wide mode 1 (230%)")}, + {513, N_("Wide mode 2 (400%)")}, + {32768, N_("Film simulation mode")}, }; //! CropMode, tag 0x104d diff --git a/src/futils.cpp b/src/futils.cpp index 3b834d532b..9236eef4d2 100644 --- a/src/futils.cpp +++ b/src/futils.cpp @@ -208,9 +208,7 @@ namespace Exiv2 std::string name; Protocol prot; bool isUrl; // path.size() > name.size() - } prots[] = {{"http://", pHttp, true}, {"https://", pHttps, true}, {"ftp://", pFtp, true}, - {"sftp://", pSftp, true}, {"file://", pFileUri, true}, {"data://", pDataUri, true}, - {"-", pStdin, false}}; + } prots[] = {{"http://", pHttp, true}, {"https://", pHttps, true}, {"ftp://", pFtp, true}, {"sftp://", pSftp, true}, {"file://", pFileUri, true}, {"data://", pDataUri, true}, {"-", pStdin, false}}; for (auto&& prot : prots) { if (result != pFile) break; diff --git a/src/gifimage.cpp b/src/gifimage.cpp index 393592f6c0..98e3d31be7 100644 --- a/src/gifimage.cpp +++ b/src/gifimage.cpp @@ -13,7 +13,8 @@ // class member definitions namespace Exiv2 { - GifImage::GifImage(BasicIo::UniquePtr io) : Image(ImageType::gif, mdNone, std::move(io)) + GifImage::GifImage(BasicIo::UniquePtr io) + : Image(ImageType::gif, mdNone, std::move(io)) { } diff --git a/src/i18n.h b/src/i18n.h index acb30259cb..854bd5bf4a 100644 --- a/src/i18n.h +++ b/src/i18n.h @@ -30,18 +30,18 @@ /* NLS can be disabled through the configure --disable-nls option. */ #ifdef EXV_ENABLE_NLS -# include +#include // Definition is in types.cpp EXIV2API const char* _exvGettext(const char* str); -# define _(String) _exvGettext(String) -# define N_(String) String +#define _(String) _exvGettext(String) +#define N_(String) String #else /* NLS is disabled */ -# define _(String) (String) -# define N_(String) String +#define _(String) (String) +#define N_(String) String #endif /* EXV_ENABLE_NLS */ diff --git a/src/image.cpp b/src/image.cpp index 980890ea8f..d91b899264 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -101,8 +101,8 @@ namespace {ImageType::jp2, newJp2Instance, isJp2Type, amReadWrite, amReadWrite, amReadWrite, amNone}, #ifdef EXV_ENABLE_BMFF {ImageType::bmff, newBmffInstance, isBmffType, amRead, amRead, amRead, amNone}, -#endif // EXV_ENABLE_BMFF - // End of list marker +#endif // EXV_ENABLE_BMFF \ + // End of list marker {ImageType::none, nullptr, nullptr, amNone, amNone, amNone, amNone}, }; @@ -482,7 +482,7 @@ namespace Exiv2 if (bNikon) { // tag is an embedded tiff const long byteslen = count - jump; - DataBuf bytes(byteslen); // allocate a buffer + DataBuf bytes(byteslen); // allocate a buffer io.readOrThrow(bytes.data(), byteslen, ErrorCode::kerCorruptedMetadata); // read MemIo memIo(bytes.c_data(), byteslen); // create a file printTiffStructure(memIo, out, option, depth); diff --git a/src/image_int.hpp b/src/image_int.hpp index 4ddabe30ee..7a72ee78d1 100644 --- a/src/image_int.hpp +++ b/src/image_int.hpp @@ -65,7 +65,8 @@ namespace Exiv2::Internal template struct binaryToStringHelper { - explicit binaryToStringHelper(const Slice myBuf) throw() : buf_(myBuf) + explicit binaryToStringHelper(const Slice myBuf) throw() + : buf_(myBuf) { } diff --git a/src/iptc.cpp b/src/iptc.cpp index 150bf2190b..146f51db44 100644 --- a/src/iptc.cpp +++ b/src/iptc.cpp @@ -35,7 +35,8 @@ namespace { public: //! Constructor, initializes the object with the record and dataset id - FindIptcdatum(uint16_t dataset, uint16_t record) : dataset_(dataset), record_(record) + FindIptcdatum(uint16_t dataset, uint16_t record) + : dataset_(dataset), record_(record) { } /*! @@ -59,13 +60,15 @@ namespace // class member definitions namespace Exiv2 { - Iptcdatum::Iptcdatum(const IptcKey& key, const Value* pValue) : key_(key.clone()) + Iptcdatum::Iptcdatum(const IptcKey& key, const Value* pValue) + : key_(key.clone()) { if (pValue) value_ = pValue->clone(); } - Iptcdatum::Iptcdatum(const Iptcdatum& rhs) : Metadatum(rhs) + Iptcdatum::Iptcdatum(const Iptcdatum& rhs) + : Metadatum(rhs) { if (rhs.key_) key_ = rhs.key_->clone(); // deep copy diff --git a/src/jp2image.cpp b/src/jp2image.cpp index 68128fa652..65945d0927 100644 --- a/src/jp2image.cpp +++ b/src/jp2image.cpp @@ -60,24 +60,270 @@ static constexpr unsigned char kJp2UuidXmp[] = "\xbe\x7a\xcf\xcb\x97\xa9\x42\xe8 // See section B.1.1 (JPEG 2000 Signature box) of JPEG-2000 specification static constexpr unsigned char Jp2Signature[] = { - 0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20, 0x0d, 0x0a, 0x87, 0x0a, + 0x00, + 0x00, + 0x00, + 0x0c, + 0x6a, + 0x50, + 0x20, + 0x20, + 0x0d, + 0x0a, + 0x87, + 0x0a, }; static constexpr unsigned char Jp2Blank[] = { - 0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20, 0x0d, 0x0a, 0x87, 0x0a, 0x00, 0x00, 0x00, 0x14, 0x66, 0x74, - 0x79, 0x70, 0x6a, 0x70, 0x32, 0x20, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x70, 0x32, 0x20, 0x00, 0x00, 0x00, 0x2d, - 0x6a, 0x70, 0x32, 0x68, 0x00, 0x00, 0x00, 0x16, 0x69, 0x68, 0x64, 0x72, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x63, 0x6f, 0x6c, 0x72, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x70, 0x32, 0x63, 0xff, 0x4f, 0xff, 0x51, 0x00, - 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x07, 0x01, 0x01, 0xff, 0x64, 0x00, 0x23, 0x00, 0x01, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, - 0x20, 0x4a, 0x61, 0x73, 0x50, 0x65, 0x72, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, - 0x39, 0x30, 0x30, 0x2e, 0x31, 0xff, 0x52, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x04, 0x04, 0x00, - 0x01, 0xff, 0x5c, 0x00, 0x13, 0x40, 0x40, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, 0x50, 0x48, 0x48, - 0x50, 0x48, 0x48, 0x50, 0xff, 0x90, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x01, 0xff, 0x5d, - 0x00, 0x14, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x93, 0xcf, 0xb4, 0x04, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0xd9, + 0x00, + 0x00, + 0x00, + 0x0c, + 0x6a, + 0x50, + 0x20, + 0x20, + 0x0d, + 0x0a, + 0x87, + 0x0a, + 0x00, + 0x00, + 0x00, + 0x14, + 0x66, + 0x74, + 0x79, + 0x70, + 0x6a, + 0x70, + 0x32, + 0x20, + 0x00, + 0x00, + 0x00, + 0x00, + 0x6a, + 0x70, + 0x32, + 0x20, + 0x00, + 0x00, + 0x00, + 0x2d, + 0x6a, + 0x70, + 0x32, + 0x68, + 0x00, + 0x00, + 0x00, + 0x16, + 0x69, + 0x68, + 0x64, + 0x72, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x01, + 0x07, + 0x07, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x0f, + 0x63, + 0x6f, + 0x6c, + 0x72, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x11, + 0x00, + 0x00, + 0x00, + 0x00, + 0x6a, + 0x70, + 0x32, + 0x63, + 0xff, + 0x4f, + 0xff, + 0x51, + 0x00, + 0x29, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x01, + 0x07, + 0x01, + 0x01, + 0xff, + 0x64, + 0x00, + 0x23, + 0x00, + 0x01, + 0x43, + 0x72, + 0x65, + 0x61, + 0x74, + 0x6f, + 0x72, + 0x3a, + 0x20, + 0x4a, + 0x61, + 0x73, + 0x50, + 0x65, + 0x72, + 0x20, + 0x56, + 0x65, + 0x72, + 0x73, + 0x69, + 0x6f, + 0x6e, + 0x20, + 0x31, + 0x2e, + 0x39, + 0x30, + 0x30, + 0x2e, + 0x31, + 0xff, + 0x52, + 0x00, + 0x0c, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x05, + 0x04, + 0x04, + 0x00, + 0x01, + 0xff, + 0x5c, + 0x00, + 0x13, + 0x40, + 0x40, + 0x48, + 0x48, + 0x50, + 0x48, + 0x48, + 0x50, + 0x48, + 0x48, + 0x50, + 0x48, + 0x48, + 0x50, + 0x48, + 0x48, + 0x50, + 0xff, + 0x90, + 0x00, + 0x0a, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x2d, + 0x00, + 0x01, + 0xff, + 0x5d, + 0x00, + 0x14, + 0x00, + 0x40, + 0x40, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0xff, + 0x93, + 0xcf, + 0xb4, + 0x04, + 0x00, + 0x80, + 0x80, + 0x80, + 0x80, + 0x80, + 0xff, + 0xd9, }; //! @cond IGNORE diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index 40f38452fc..5a45f98850 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -267,7 +267,8 @@ namespace Exiv2::Internal return sizeof(signature_); } - FujiMnHeader::FujiMnHeader() : start_(0) + FujiMnHeader::FujiMnHeader() + : start_(0) { read(signature_, sizeOfSignature(), byteOrder_); } @@ -317,7 +318,8 @@ namespace Exiv2::Internal return sizeof(signature_); } - Nikon2MnHeader::Nikon2MnHeader() : start_(0) + Nikon2MnHeader::Nikon2MnHeader() + : start_(0) { read(signature_, sizeOfSignature(), invalidByteOrder); } @@ -350,7 +352,7 @@ namespace Exiv2::Internal return sizeOfSignature(); } // Nikon2MnHeader::write - const byte Nikon3MnHeader::signature_[] = {'N', 'i', 'k', 'o', 'n', '\0', 0x02, 0x10, 0x00, + const byte Nikon3MnHeader::signature_[] = {'N', 'i', 'k', 'o', 'n', '\0', 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; size_t Nikon3MnHeader::sizeOfSignature() @@ -358,7 +360,8 @@ namespace Exiv2::Internal return sizeof(signature_); } - Nikon3MnHeader::Nikon3MnHeader() : byteOrder_(invalidByteOrder), start_(sizeOfSignature()) + Nikon3MnHeader::Nikon3MnHeader() + : byteOrder_(invalidByteOrder), start_(sizeOfSignature()) { buf_.alloc(sizeOfSignature()); buf_.copyBytes(0, signature_, buf_.size()); @@ -424,7 +427,8 @@ namespace Exiv2::Internal return sizeof(signature_); } - PanasonicMnHeader::PanasonicMnHeader() : start_(0) + PanasonicMnHeader::PanasonicMnHeader() + : start_(0) { read(signature_, sizeOfSignature(), invalidByteOrder); } @@ -570,7 +574,8 @@ namespace Exiv2::Internal return sizeof(signature1_); } - SigmaMnHeader::SigmaMnHeader() : start_(0) + SigmaMnHeader::SigmaMnHeader() + : start_(0) { read(signature1_, sizeOfSignature(), invalidByteOrder); } @@ -610,7 +615,8 @@ namespace Exiv2::Internal return sizeof(signature_); } - SonyMnHeader::SonyMnHeader() : start_(0) + SonyMnHeader::SonyMnHeader() + : start_(0) { read(signature_, sizeOfSignature(), invalidByteOrder); } @@ -651,7 +657,8 @@ namespace Exiv2::Internal return sizeof(signature_); } - Casio2MnHeader::Casio2MnHeader() : start_(0) + Casio2MnHeader::Casio2MnHeader() + : start_(0) { read(signature_, sizeOfSignature(), invalidByteOrder); } @@ -909,7 +916,8 @@ namespace Exiv2::Internal struct Key { //! Constructor - Key(uint16_t tag, const char* ver, size_t size) : tag_(tag), ver_(ver), size_(size) + Key(uint16_t tag, const char* ver, size_t size) + : tag_(tag), ver_(ver), size_(size) { } uint16_t tag_; //!< Tag number @@ -1038,9 +1046,25 @@ namespace Exiv2::Internal int sony2010eSelector(uint16_t /*tag*/, const byte* /*pData*/, size_t /*size*/, TiffComponent* const pRoot) { static constexpr auto models = std::array{ - "SLT-A58", "SLT-A99", "ILCE-3000", "ILCE-3500", "NEX-3N", "NEX-5R", "NEX-5T", - "NEX-6", "VG30E", "VG900", "DSC-RX100", "DSC-RX1", "DSC-RX1R", "DSC-HX300", - "DSC-HX50V", "DSC-TX30", "DSC-WX60", "DSC-WX200", "DSC-WX300", + "SLT-A58", + "SLT-A99", + "ILCE-3000", + "ILCE-3500", + "NEX-3N", + "NEX-5R", + "NEX-5T", + "NEX-6", + "VG30E", + "VG900", + "DSC-RX100", + "DSC-RX1", + "DSC-RX1R", + "DSC-HX300", + "DSC-HX50V", + "DSC-TX30", + "DSC-WX60", + "DSC-WX200", + "DSC-WX300", }; return std::find(models.begin(), models.end(), getExifModel(pRoot)) != std::end(models) ? 0 : -1; } diff --git a/src/minoltamn_int.cpp b/src/minoltamn_int.cpp index 3d71776f34..ee674332ad 100644 --- a/src/minoltamn_int.cpp +++ b/src/minoltamn_int.cpp @@ -21,15 +21,10 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta color mode values to readable labels constexpr TagDetails minoltaColorMode[] = { - {0, N_("Natural Color")}, {1, N_("Black & White")}, {2, N_("Vivid Color")}, {3, N_("Solarization")}, - {4, N_("AdobeRGB")}, {5, N_("Sepia")}, {9, N_("Natural")}, {12, N_("Portrait")}, - {13, N_("Natural sRGB")}, {14, N_("Natural+ sRGB")}, {15, N_("Landscape")}, {16, N_("Evening")}, - {17, N_("Night Scene")}, {18, N_("Night Portrait")}}; + {0, N_("Natural Color")}, {1, N_("Black & White")}, {2, N_("Vivid Color")}, {3, N_("Solarization")}, {4, N_("AdobeRGB")}, {5, N_("Sepia")}, {9, N_("Natural")}, {12, N_("Portrait")}, {13, N_("Natural sRGB")}, {14, N_("Natural+ sRGB")}, {15, N_("Landscape")}, {16, N_("Evening")}, {17, N_("Night Scene")}, {18, N_("Night Portrait")}}; //! Lookup table to translate Minolta image quality values to readable labels - [[maybe_unused]] constexpr TagDetails minoltaImageQuality[] = {{0, N_("Raw")}, {1, N_("Super Fine")}, - {2, N_("Fine")}, {3, N_("Standard")}, - {4, N_("Economy")}, {5, N_("Extra Fine")}}; + [[maybe_unused]] constexpr TagDetails minoltaImageQuality[] = {{0, N_("Raw")}, {1, N_("Super Fine")}, {2, N_("Fine")}, {3, N_("Standard")}, {4, N_("Economy")}, {5, N_("Extra Fine")}}; //! Lookup table to translate Minolta image stabilization values constexpr TagDetails minoltaImageStabilization[] = {{1, N_("Off")}, {5, N_("On")}}; @@ -131,22 +126,17 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta Std camera settings white balance values to readable labels constexpr TagDetails minoltaWhiteBalanceStd[] = { - {0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Cloudy")}, {3, N_("Tungsten")}, {5, N_("Custom")}, - {7, N_("Fluorescent")}, {8, N_("Fluorescent 2")}, {11, N_("Custom 2")}, {12, N_("Custom 3")}}; + {0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Cloudy")}, {3, N_("Tungsten")}, {5, N_("Custom")}, {7, N_("Fluorescent")}, {8, N_("Fluorescent 2")}, {11, N_("Custom 2")}, {12, N_("Custom 3")}}; //! Lookup table to translate Minolta Std camera settings image size values to readable labels - constexpr TagDetails minoltaImageSizeStd[] = {{0, N_("Full size")}, {1, "1600x1200"}, {2, "1280x960"}, - {3, "640x480"}, {6, "2080x1560"}, {7, "2560x1920"}, - {8, "3264x2176"}}; + constexpr TagDetails minoltaImageSizeStd[] = {{0, N_("Full size")}, {1, "1600x1200"}, {2, "1280x960"}, {3, "640x480"}, {6, "2080x1560"}, {7, "2560x1920"}, {8, "3264x2176"}}; //! Lookup table to translate Minolta Std camera settings image quality values to readable labels - constexpr TagDetails minoltaImageQualityStd[] = {{0, N_("Raw")}, {1, N_("Super fine")}, {2, N_("Fine")}, - {3, N_("Standard")}, {4, N_("Economy")}, {5, N_("Extra fine")}}; + constexpr TagDetails minoltaImageQualityStd[] = {{0, N_("Raw")}, {1, N_("Super fine")}, {2, N_("Fine")}, {3, N_("Standard")}, {4, N_("Economy")}, {5, N_("Extra fine")}}; //! Lookup table to translate Minolta Std camera settings drive mode values to readable labels constexpr TagDetails minoltaDriveModeStd[] = { - {0, N_("Single Frame")}, {1, N_("Continuous")}, {2, N_("Self-timer")}, {4, N_("Bracketing")}, - {5, N_("Interval")}, {6, N_("UHS continuous")}, {7, N_("HS continuous")}}; + {0, N_("Single Frame")}, {1, N_("Continuous")}, {2, N_("Self-timer")}, {4, N_("Bracketing")}, {5, N_("Interval")}, {6, N_("UHS continuous")}, {7, N_("HS continuous")}}; //! Lookup table to translate Minolta Std camera settings metering mode values to readable labels constexpr TagDetails minoltaMeteringModeStd[] = { @@ -160,8 +150,7 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta Std camera settings AF points values to readable labels [[maybe_unused]] constexpr TagDetails minoltaAFPointsStd[] = { - {0, N_("Center")}, {1, N_("Top")}, {2, N_("Top-right")}, {3, N_("Right")}, {4, N_("Bottom-right")}, - {5, N_("Bottom")}, {6, N_("Bottom-left")}, {7, N_("Left")}, {8, N_("Top-left")}}; + {0, N_("Center")}, {1, N_("Top")}, {2, N_("Top-right")}, {3, N_("Right")}, {4, N_("Bottom-right")}, {5, N_("Bottom")}, {6, N_("Bottom-left")}, {7, N_("Left")}, {8, N_("Top-left")}}; //! Lookup table to translate Minolta Std camera settings flash fired values to readable labels constexpr TagDetails minoltaFlashFired[] = {{0, N_("Did not fire")}, {1, N_("Fired")}}; @@ -170,13 +159,10 @@ namespace Exiv2::Internal constexpr TagDetails minoltaSharpnessStd[] = {{0, N_("Hard")}, {1, N_("Normal")}, {2, N_("Soft")}}; //! Lookup table to translate Minolta Std camera settings subject program values to readable labels - constexpr TagDetails minoltaSubjectProgramStd[] = {{0, N_("None")}, {1, N_("Portrait")}, - {2, N_("Text")}, {3, N_("Night portrait")}, - {4, N_("Sunset")}, {5, N_("Sports action")}}; + constexpr TagDetails minoltaSubjectProgramStd[] = {{0, N_("None")}, {1, N_("Portrait")}, {2, N_("Text")}, {3, N_("Night portrait")}, {4, N_("Sunset")}, {5, N_("Sports action")}}; //! Lookup table to translate Minolta Std camera settings ISO settings values to readable labels - constexpr TagDetails minoltaISOSettingStd[] = {{0, "100"}, {1, "200"}, {2, "400"}, - {3, "800"}, {4, N_("Auto")}, {5, "64"}}; + constexpr TagDetails minoltaISOSettingStd[] = {{0, "100"}, {1, "200"}, {2, "400"}, {3, "800"}, {4, N_("Auto")}, {5, "64"}}; //! Lookup table to translate Minolta Std camera settings model values to readable labels constexpr TagDetails minoltaModelStd[] = { @@ -423,8 +409,7 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta Dynax 7D camera settings exposure mode values to readable labels constexpr TagDetails minoltaExposureMode7D[] = { - {0, N_("Program")}, {1, N_("Aperture priority")}, {2, N_("Shutter priority")}, {3, N_("Manual")}, - {4, N_("Auto")}, {5, N_("Program-shift A")}, {6, N_("Program-shift S")}}; + {0, N_("Program")}, {1, N_("Aperture priority")}, {2, N_("Shutter priority")}, {3, N_("Manual")}, {4, N_("Auto")}, {5, N_("Program-shift A")}, {6, N_("Program-shift S")}}; //! Lookup table to translate Minolta Dynax 7D camera settings image size values to readable labels constexpr TagDetails minoltaImageSize7D[] = {{0, N_("Large")}, {1, N_("Medium")}, {2, N_("Small")}}; @@ -435,9 +420,8 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta Dynax 7D camera settings white balance values to readable labels constexpr TagDetails minoltaWhiteBalance7D[] = { - {0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Shade")}, {3, N_("Cloudy")}, {4, N_("Tungsten")}, - {5, N_("Fluorescent")}, {256, N_("Kelvin")}, {512, N_("Manual")}, {512, N_("Manual")} // To silence compiler - // warning + {0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Shade")}, {3, N_("Cloudy")}, {4, N_("Tungsten")}, {5, N_("Fluorescent")}, {256, N_("Kelvin")}, {512, N_("Manual")}, {512, N_("Manual")} // To silence compiler + // warning }; //! Lookup table to translate Minolta Dynax 7D camera settings focus mode values to readable labels @@ -446,13 +430,10 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta Dynax 7D camera settings AF points values to readable labels constexpr TagDetails minoltaAFPoints7D[] = { - {1, N_("Center")}, {2, N_("Top")}, {4, N_("Top-right")}, - {8, N_("Right")}, {16, N_("Bottom-right")}, {32, N_("Bottom")}, - {64, N_("Bottom-left")}, {128, N_("Left")}, {256, N_("Top-left")}}; + {1, N_("Center")}, {2, N_("Top")}, {4, N_("Top-right")}, {8, N_("Right")}, {16, N_("Bottom-right")}, {32, N_("Bottom")}, {64, N_("Bottom-left")}, {128, N_("Left")}, {256, N_("Top-left")}}; //! Lookup table to translate Minolta Dynax 7D camera settings ISO settings values to readable labels - constexpr TagDetails minoltaISOSetting7D[] = {{0, N_("Auto")}, {1, "100"}, {3, "200"}, {4, "400"}, - {5, "800"}, {6, "1600"}, {7, "3200"}}; + constexpr TagDetails minoltaISOSetting7D[] = {{0, N_("Auto")}, {1, "100"}, {3, "200"}, {4, "400"}, {5, "800"}, {6, "1600"}, {7, "3200"}}; //! Lookup table to translate Minolta Dynax 7D camera settings color space values to readable labels constexpr TagDetails minoltaColorSpace7D[] = { @@ -549,9 +530,7 @@ namespace Exiv2::Internal {0, N_("Raw")}, {16, N_("Fine")}, {32, N_("Normal")}, {34, N_("Raw+Jpeg")}, {48, N_("Economy")}}; //! Lookup table to translate Minolta Dynax 5D camera settings white balance values to readable labels - constexpr TagDetails minoltaWhiteBalance5D[] = {{0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Cloudy")}, - {3, N_("Shade")}, {4, N_("Tungsten")}, {5, N_("Fluorescent")}, - {6, N_("Flash")}, {256, N_("Kelvin")}, {512, N_("Manual")}}; + constexpr TagDetails minoltaWhiteBalance5D[] = {{0, N_("Auto")}, {1, N_("Daylight")}, {2, N_("Cloudy")}, {3, N_("Shade")}, {4, N_("Tungsten")}, {5, N_("Fluorescent")}, {6, N_("Flash")}, {256, N_("Kelvin")}, {512, N_("Manual")}}; //! Lookup table to translate Minolta Dynax 5D camera settings metering mode values to readable labels constexpr TagDetails minoltaMeteringMode5D[] = { @@ -581,8 +560,7 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta Dynax 5D camera settings focus position values to readable labels constexpr TagDetails minoltaFocusPosition5D[] = { - {0, N_("Wide")}, {1, N_("Central")}, {2, N_("Up")}, {3, N_("Up right")}, {4, N_("Right")}, - {5, N_("Down right")}, {6, N_("Down")}, {7, N_("Down left")}, {8, N_("Left")}, {9, N_("Up left")}}; + {0, N_("Wide")}, {1, N_("Central")}, {2, N_("Up")}, {3, N_("Up right")}, {4, N_("Right")}, {5, N_("Down right")}, {6, N_("Down")}, {7, N_("Down left")}, {8, N_("Left")}, {9, N_("Up left")}}; //! Lookup table to translate Minolta Dynax 5D camera settings focus area values to readable labels constexpr TagDetails minoltaFocusArea5D[] = {{0, N_("Wide")}, {1, N_("Selection")}, {2, N_("Spot")}}; @@ -592,9 +570,7 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta Dynax 5D camera settings picture finish values to readable labels constexpr TagDetails minoltaPictureFinish5D[] = { - {0, N_("Natural")}, {1, N_("Natural+")}, {2, N_("Portrait")}, {3, N_("Wind Scene")}, - {4, N_("Evening Scene")}, {5, N_("Night Scene")}, {6, N_("Night Portrait")}, {7, N_("Monochrome")}, - {8, N_("Adobe RGB")}, {9, N_("Adobe RGB (ICC)")}}; + {0, N_("Natural")}, {1, N_("Natural+")}, {2, N_("Portrait")}, {3, N_("Wind Scene")}, {4, N_("Evening Scene")}, {5, N_("Night Scene")}, {6, N_("Night Portrait")}, {7, N_("Monochrome")}, {8, N_("Adobe RGB")}, {9, N_("Adobe RGB (ICC)")}}; //! Method to convert Minolta Dynax 5D exposure manual bias values. std::ostream& MinoltaMakerNote::printMinoltaExposureManualBias5D(std::ostream& os, const Value& value, @@ -763,8 +739,7 @@ namespace Exiv2::Internal {0x8003, N_("Color Temperature/Color Filter")}}; //! Lookup table to translate Sony A100 camera settings preset white balance values to readable labels - constexpr TagDetails sonyPresetWhiteBalanceA100[] = {{1, N_("Daylight")}, {2, N_("Cloudy")}, {3, N_("Shade")}, - {4, N_("Tungsten")}, {5, N_("Fluorescent")}, {6, N_("Flash")}}; + constexpr TagDetails sonyPresetWhiteBalanceA100[] = {{1, N_("Daylight")}, {2, N_("Cloudy")}, {3, N_("Shade")}, {4, N_("Tungsten")}, {5, N_("Fluorescent")}, {6, N_("Flash")}}; //! Lookup table to translate Sony A100 camera settings color temperature setting values to readable labels constexpr TagDetails sonyColorTemperatureSettingA100[] = {{0, N_("Temperature")}, {2, N_("Color Filter")}}; @@ -1683,8 +1658,7 @@ namespace Exiv2::Internal //! List of lens ids which require special treatment from printMinoltaSonyLensID const LensIdFct lensIdFct[] = { - {0x001c, resolveLens0x1c}, {0x0029, resolveLens0x29}, {0x0034, resolveLens0x34}, - {0x0080, resolveLens0x80}, {0x00ff, resolveLens0xff}, {0xffff, resolveLens0xffff}, + {0x001c, resolveLens0x1c}, {0x0029, resolveLens0x29}, {0x0034, resolveLens0x34}, {0x0080, resolveLens0x80}, {0x00ff, resolveLens0xff}, {0xffff, resolveLens0xffff}, // { 0x00ff, resolveLensTypeUsingExiftool }, // was used for debugging }; // #1145 end - respect lenses with shared LensID @@ -1718,10 +1692,7 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta A100 and all other Sony Alpha camera color mode values to readable labels constexpr TagDetails minoltaSonyColorMode[] = { - {0, N_("Standard")}, {1, N_("Vivid Color")}, {2, N_("Portrait")}, {3, N_("Landscape")}, - {4, N_("Sunset")}, {5, N_("Night View/Portrait")}, {6, N_("Black & White")}, {7, N_("AdobeRGB")}, - {12, N_("Neutral")}, {100, N_("Neutral")}, {101, N_("Clear")}, {102, N_("Deep")}, - {103, N_("Light")}, {104, N_("Night View")}, {105, N_("Autumn Leaves")}}; + {0, N_("Standard")}, {1, N_("Vivid Color")}, {2, N_("Portrait")}, {3, N_("Landscape")}, {4, N_("Sunset")}, {5, N_("Night View/Portrait")}, {6, N_("Black & White")}, {7, N_("AdobeRGB")}, {12, N_("Neutral")}, {100, N_("Neutral")}, {101, N_("Clear")}, {102, N_("Deep")}, {103, N_("Light")}, {104, N_("Night View")}, {105, N_("Autumn Leaves")}}; std::ostream& printMinoltaSonyColorMode(std::ostream& os, const Value& value, const ExifData* metadata) { @@ -1762,9 +1733,7 @@ namespace Exiv2::Internal //! Lookup table to translate Sony camera settings Local AF Area Point values to readable labels constexpr TagDetails minoltaSonyLocalAFAreaPoint[] = { - {1, N_("Center")}, {2, N_("Top")}, {3, N_("Top-Right")}, {4, N_("Right")}, - {5, N_("Bottom-Right")}, {6, N_("Bottom")}, {7, N_("Bottom-Left")}, {8, N_("Left")}, - {9, N_("Top-Left")}, {10, N_("Far-Right")}, {11, N_("Far-Left")}}; + {1, N_("Center")}, {2, N_("Top")}, {3, N_("Top-Right")}, {4, N_("Right")}, {5, N_("Bottom-Right")}, {6, N_("Bottom")}, {7, N_("Bottom-Left")}, {8, N_("Left")}, {9, N_("Top-Left")}, {10, N_("Far-Right")}, {11, N_("Far-Left")}}; std::ostream& printMinoltaSonyLocalAFAreaPoint(std::ostream& os, const Value& value, const ExifData* metadata) { @@ -1797,9 +1766,7 @@ namespace Exiv2::Internal // ---------------------------------------------------------------------------------------------------- //! Lookup table to translate Sony camera settings quality values to readable labels - constexpr TagDetails minoltaSonyQualityCs[] = {{0, N_("RAW")}, {2, N_("CRAW")}, {16, N_("Extra Fine")}, - {32, N_("Fine")}, {34, N_("RAW+JPEG")}, {35, N_("CRAW+JPEG")}, - {48, N_("Standard")}}; + constexpr TagDetails minoltaSonyQualityCs[] = {{0, N_("RAW")}, {2, N_("CRAW")}, {16, N_("Extra Fine")}, {32, N_("Fine")}, {34, N_("RAW+JPEG")}, {35, N_("CRAW+JPEG")}, {48, N_("Standard")}}; std::ostream& printMinoltaSonyQualityCs(std::ostream& os, const Value& value, const ExifData* metadata) { @@ -1821,9 +1788,7 @@ namespace Exiv2::Internal //! Lookup table to translate Minolta/Sony scene mode values to readable labels constexpr TagDetails minoltaSonySceneMode[] = { - {0, N_("Standard")}, {1, N_("Portrait")}, {2, N_("Text")}, {3, N_("Night Scene")}, - {4, N_("Sunset")}, {5, N_("Sports")}, {6, N_("Landscape")}, {7, N_("Night Portrait")}, - {8, N_("Macro")}, {9, N_("Super Macro")}, {16, N_("Auto")}, {17, N_("Night View/Portrait")}}; + {0, N_("Standard")}, {1, N_("Portrait")}, {2, N_("Text")}, {3, N_("Night Scene")}, {4, N_("Sunset")}, {5, N_("Sports")}, {6, N_("Landscape")}, {7, N_("Night Portrait")}, {8, N_("Macro")}, {9, N_("Super Macro")}, {16, N_("Auto")}, {17, N_("Night View/Portrait")}}; std::ostream& printMinoltaSonySceneMode(std::ostream& os, const Value& value, const ExifData* metadata) { @@ -1834,9 +1799,7 @@ namespace Exiv2::Internal //! Lookup table to translate Sony/Minolta image quality values to readable labels constexpr TagDetails minoltaSonyImageQuality[] = { - {0, N_("Raw")}, {1, N_("Super Fine")}, {2, N_("Fine")}, - {3, N_("Standard")}, {4, N_("Economy")}, {5, N_("Extra Fine")}, - {6, N_("Raw + JPEG")}, {7, N_("Compressed Raw")}, {8, N_("Compressed Raw + JPEG")}}; + {0, N_("Raw")}, {1, N_("Super Fine")}, {2, N_("Fine")}, {3, N_("Standard")}, {4, N_("Economy")}, {5, N_("Extra Fine")}, {6, N_("Raw + JPEG")}, {7, N_("Compressed Raw")}, {8, N_("Compressed Raw + JPEG")}}; std::ostream& printMinoltaSonyImageQuality(std::ostream& os, const Value& value, const ExifData* metadata) { @@ -1865,11 +1828,7 @@ namespace Exiv2::Internal //! Lookup table to translate Sony/Minolta Std camera settings white balance values to readable labels constexpr TagDetails minoltaSonyWhiteBalanceStd[] = { - {0x00, N_("Auto")}, {0x01, N_("Color Temperature/Color Filter")}, - {0x10, N_("Daylight")}, {0x20, N_("Cloudy")}, - {0x30, N_("Shade")}, {0x40, N_("Tungsten")}, - {0x50, N_("Flash")}, {0x60, N_("Fluorescent")}, - {0x70, N_("Custom")}}; + {0x00, N_("Auto")}, {0x01, N_("Color Temperature/Color Filter")}, {0x10, N_("Daylight")}, {0x20, N_("Cloudy")}, {0x30, N_("Shade")}, {0x40, N_("Tungsten")}, {0x50, N_("Flash")}, {0x60, N_("Fluorescent")}, {0x70, N_("Custom")}}; std::ostream& printMinoltaSonyWhiteBalanceStd(std::ostream& os, const Value& value, const ExifData* metadata) { diff --git a/src/nikonmn_int.cpp b/src/nikonmn_int.cpp index 5c1916dcee..af2dc6b74b 100644 --- a/src/nikonmn_int.cpp +++ b/src/nikonmn_int.cpp @@ -33,13 +33,22 @@ namespace Exiv2::Internal //! Off, Low, Normal, High, multiple tags constexpr TagDetails nikonActiveDLighting[] = { - {0, N_("Off")}, {1, N_("Low")}, {3, N_("Normal")}, {5, N_("High")}, {7, N_("Extra High")}, {65535, N_("Auto")}, + {0, N_("Off")}, + {1, N_("Low")}, + {3, N_("Normal")}, + {5, N_("High")}, + {7, N_("Extra High")}, + {65535, N_("Auto")}, }; //! Focus area for Nikon cameras. constexpr const char* nikonFocusarea[] = { - N_("Single area"), N_("Dynamic area"), N_("Dynamic area, closest subject"), - N_("Group dynamic"), N_("Single area (wide)"), N_("Dynamic area (wide)"), + N_("Single area"), + N_("Dynamic area"), + N_("Dynamic area, closest subject"), + N_("Group dynamic"), + N_("Single area (wide)"), + N_("Dynamic area (wide)"), }; // Roger Larsson: My guess is that focuspoints will follow autofocus sensor @@ -47,22 +56,43 @@ namespace Exiv2::Internal // "wide" or not //! Focus points for Nikon cameras, used for Nikon 1 and Nikon 3 makernotes. constexpr const char* nikonFocuspoints[] = { - N_("Center"), N_("Top"), N_("Bottom"), N_("Left"), N_("Right"), N_("Upper-left"), - N_("Upper-right"), N_("Lower-left"), N_("Lower-right"), N_("Left-most"), N_("Right-most"), + N_("Center"), + N_("Top"), + N_("Bottom"), + N_("Left"), + N_("Right"), + N_("Upper-left"), + N_("Upper-right"), + N_("Lower-left"), + N_("Lower-right"), + N_("Left-most"), + N_("Right-most"), }; //! Shutter Modes (credits to exiftool) constexpr TagDetails nikonShutterModes[] = { - {0, "Mechanical"}, {16, "Electronic"}, {48, "Electronic Front Curtain"}, - {64, "Electronic (Movie)"}, {80, "Auto (Mechanical)"}, {81, "Auto (Electronic Front Curtain)"}}; + {0, "Mechanical"}, {16, "Electronic"}, {48, "Electronic Front Curtain"}, {64, "Electronic (Movie)"}, {80, "Auto (Mechanical)"}, {81, "Auto (Electronic Front Curtain)"}}; //! FlashComp, tag 0x0012 constexpr TagDetails nikonFlashComp[] = { // From the PHP JPEG Metadata Toolkit - {0x06, "+1.0 EV"}, {0x04, "+0.7 EV"}, {0x03, "+0.5 EV"}, {0x02, "+0.3 EV"}, {0x00, "0.0 EV"}, - {0xfe, "-0.3 EV"}, {0xfd, "-0.5 EV"}, {0xfc, "-0.7 EV"}, {0xfa, "-1.0 EV"}, {0xf8, "-1.3 EV"}, - {0xf7, "-1.5 EV"}, {0xf6, "-1.7 EV"}, {0xf4, "-2.0 EV"}, {0xf2, "-2.3 EV"}, {0xf1, "-2.5 EV"}, - {0xf0, "-2.7 EV"}, {0xee, "-3.0 EV"}}; + {0x06, "+1.0 EV"}, + {0x04, "+0.7 EV"}, + {0x03, "+0.5 EV"}, + {0x02, "+0.3 EV"}, + {0x00, "0.0 EV"}, + {0xfe, "-0.3 EV"}, + {0xfd, "-0.5 EV"}, + {0xfc, "-0.7 EV"}, + {0xfa, "-1.0 EV"}, + {0xf8, "-1.3 EV"}, + {0xf7, "-1.5 EV"}, + {0xf6, "-1.7 EV"}, + {0xf4, "-2.0 EV"}, + {0xf2, "-2.3 EV"}, + {0xf1, "-2.5 EV"}, + {0xf0, "-2.7 EV"}, + {0xee, "-3.0 EV"}}; //! ColorSpace, tag 0x001e constexpr TagDetails nikonColorSpace[] = {{1, N_("sRGB")}, {2, N_("Adobe RGB")}}; @@ -104,9 +134,7 @@ namespace Exiv2::Internal //! RetouchHistory, tag 0x009e constexpr TagDetails nikonRetouchHistory[] = { - {0, N_("None")}, {3, N_("B & W")}, {4, N_("Sepia")}, {5, N_("Trim")}, - {6, N_("Small picture")}, {7, N_("D-Lighting")}, {8, N_("Red eye")}, {9, N_("Cyanotype")}, - {10, N_("Sky light")}, {11, N_("Warm tone")}, {12, N_("Color custom")}, {13, N_("Image overlay")}}; + {0, N_("None")}, {3, N_("B & W")}, {4, N_("Sepia")}, {5, N_("Trim")}, {6, N_("Small picture")}, {7, N_("D-Lighting")}, {8, N_("Red eye")}, {9, N_("Cyanotype")}, {10, N_("Sky light")}, {11, N_("Warm tone")}, {12, N_("Color custom")}, {13, N_("Image overlay")}}; //! HighISONoiseReduction, tag 0x00b1 constexpr TagDetails nikonHighISONoiseReduction[] = { @@ -307,8 +335,7 @@ namespace Exiv2::Internal } //! Quality, tag 0x0003 - constexpr TagDetails nikon2Quality[] = {{1, N_("VGA Basic")}, {2, N_("VGA Normal")}, {3, N_("VGA Fine")}, - {4, N_("SXGA Basic")}, {5, N_("SXGA Normal")}, {6, N_("SXGA Fine")}}; + constexpr TagDetails nikon2Quality[] = {{1, N_("VGA Basic")}, {2, N_("VGA Normal")}, {3, N_("VGA Fine")}, {4, N_("SXGA Basic")}, {5, N_("SXGA Normal")}, {6, N_("SXGA Fine")}}; //! ColorMode, tag 0x0004 constexpr TagDetails nikon2ColorMode[] = {{1, N_("Color")}, {2, N_("Monochrome")}}; @@ -321,9 +348,7 @@ namespace Exiv2::Internal constexpr TagDetails nikon2IsoSpeed[] = {{0, "80"}, {2, "160"}, {4, "320"}, {5, "100"}}; //! WhiteBalance, tag 0x0007 - constexpr TagDetails nikon2WhiteBalance[] = {{0, N_("Auto")}, {1, N_("Preset")}, {2, N_("Daylight")}, - {3, N_("Incandescent")}, {4, N_("Fluorescent")}, {5, N_("Cloudy")}, - {6, N_("Speedlight")}}; + constexpr TagDetails nikon2WhiteBalance[] = {{0, N_("Auto")}, {1, N_("Preset")}, {2, N_("Daylight")}, {3, N_("Incandescent")}, {4, N_("Fluorescent")}, {5, N_("Cloudy")}, {6, N_("Speedlight")}}; // Nikon2 MakerNote Tag Info constexpr TagInfo Nikon2MakerNote::tagInfo_[] = { @@ -572,14 +597,11 @@ namespace Exiv2::Internal {0, N_("Default Settings")}, {1, N_("Quick Adjust")}, {2, N_("Full Control")}}; //! FilterEffect - constexpr TagDetails nikonFilterEffect[] = {{0x80, N_("Off")}, {0x81, N_("Yellow")}, {0x82, N_("Orange")}, - {0x83, N_("Red")}, {0x84, N_("Green")}, {0xff, N_("n/a")}}; + constexpr TagDetails nikonFilterEffect[] = {{0x80, N_("Off")}, {0x81, N_("Yellow")}, {0x82, N_("Orange")}, {0x83, N_("Red")}, {0x84, N_("Green")}, {0xff, N_("n/a")}}; //! ToningEffect constexpr TagDetails nikonToningEffect[] = { - {0x80, N_("B&W")}, {0x81, N_("Sepia")}, {0x82, N_("Cyanotype")}, {0x83, N_("Red")}, - {0x84, N_("Yellow")}, {0x85, N_("Green")}, {0x86, N_("Blue-green")}, {0x87, N_("Blue")}, - {0x88, N_("Purple-blue")}, {0x89, N_("Red-purple")}, {0xff, N_("n/a")}}; + {0x80, N_("B&W")}, {0x81, N_("Sepia")}, {0x82, N_("Cyanotype")}, {0x83, N_("Red")}, {0x84, N_("Yellow")}, {0x85, N_("Green")}, {0x86, N_("Blue-green")}, {0x87, N_("Blue")}, {0x88, N_("Purple-blue")}, {0x89, N_("Red-purple")}, {0xff, N_("n/a")}}; // Nikon3 Picture Control Tag Info constexpr TagInfo Nikon3MakerNote::tagInfoPc_[] = { @@ -653,13 +675,7 @@ namespace Exiv2::Internal //! ISOExpansion, tag index 4 and 10 constexpr TagDetails nikonIsoExpansion[] = { - {0x000, N_("Off")}, {0x101, N_("Hi 0.3")}, {0x102, N_("Hi 0.5")}, {0x103, N_("Hi 0.7")}, - {0x104, N_("Hi 1.0")}, {0x105, N_("Hi 1.3")}, {0x106, N_("Hi 1.5")}, {0x107, N_("Hi 1.7")}, - {0x108, N_("Hi 2.0")}, {0x109, N_("Hi 2.3")}, {0x10a, N_("Hi 2.5")}, {0x10b, N_("Hi 2.7")}, - {0x10c, N_("Hi 3.0")}, {0x10d, N_("Hi 3.3")}, {0x10e, N_("Hi 3.5")}, {0x10f, N_("Hi 3.7")}, - {0x110, N_("Hi 4.0")}, {0x111, N_("Hi 4.3")}, {0x112, N_("Hi 4.5")}, {0x113, N_("Hi 4.7")}, - {0x114, N_("Hi 5.0")}, {0x201, N_("Lo 0.3")}, {0x202, N_("Lo 0.5")}, {0x203, N_("Lo 0.7")}, - {0x204, N_("Lo 1.0")}}; + {0x000, N_("Off")}, {0x101, N_("Hi 0.3")}, {0x102, N_("Hi 0.5")}, {0x103, N_("Hi 0.7")}, {0x104, N_("Hi 1.0")}, {0x105, N_("Hi 1.3")}, {0x106, N_("Hi 1.5")}, {0x107, N_("Hi 1.7")}, {0x108, N_("Hi 2.0")}, {0x109, N_("Hi 2.3")}, {0x10a, N_("Hi 2.5")}, {0x10b, N_("Hi 2.7")}, {0x10c, N_("Hi 3.0")}, {0x10d, N_("Hi 3.3")}, {0x10e, N_("Hi 3.5")}, {0x10f, N_("Hi 3.7")}, {0x110, N_("Hi 4.0")}, {0x111, N_("Hi 4.3")}, {0x112, N_("Hi 4.5")}, {0x113, N_("Hi 4.7")}, {0x114, N_("Hi 5.0")}, {0x201, N_("Lo 0.3")}, {0x202, N_("Lo 0.5")}, {0x203, N_("Lo 0.7")}, {0x204, N_("Lo 1.0")}}; // Nikon3 ISO Info Tag Info constexpr TagInfo Nikon3MakerNote::tagInfoIi_[] = { @@ -681,21 +697,14 @@ namespace Exiv2::Internal //! AfAreaMode constexpr TagDetails nikonAfAreaMode[] = { - {0, N_("Single Area")}, {1, N_("Dynamic Area")}, {2, N_("Dynamic Area, Closest Subject")}, - {3, N_("Group Dynamic")}, {4, N_("Single Area (wide)")}, {5, N_("Dynamic Area (wide)")}}; + {0, N_("Single Area")}, {1, N_("Dynamic Area")}, {2, N_("Dynamic Area, Closest Subject")}, {3, N_("Group Dynamic")}, {4, N_("Single Area (wide)")}, {5, N_("Dynamic Area (wide)")}}; //! AfPoint - constexpr TagDetails nikonAfPoint[] = {{0, N_("Center")}, {1, N_("Top")}, {2, N_("Bottom")}, - {3, N_("Mid-left")}, {4, N_("Mid-right")}, {5, N_("Upper-left")}, - {6, N_("Upper-right")}, {7, N_("Lower-left")}, {8, N_("Lower-right")}, - {9, N_("Far Left")}, {10, N_("Far Right")}}; + constexpr TagDetails nikonAfPoint[] = {{0, N_("Center")}, {1, N_("Top")}, {2, N_("Bottom")}, {3, N_("Mid-left")}, {4, N_("Mid-right")}, {5, N_("Upper-left")}, {6, N_("Upper-right")}, {7, N_("Lower-left")}, {8, N_("Lower-right")}, {9, N_("Far Left")}, {10, N_("Far Right")}}; //! AfPointsInFocus constexpr TagDetailsBitmask nikonAfPointsInFocus[] = { - {0x0001, N_("Center")}, {0x0002, N_("Top")}, {0x0004, N_("Bottom")}, - {0x0008, N_("Mid-left")}, {0x0010, N_("Mid-right")}, {0x0020, N_("Upper-left")}, - {0x0040, N_("Upper-right")}, {0x0080, N_("Lower-left")}, {0x0100, N_("Lower-right")}, - {0x0200, N_("Far Left")}, {0x0400, N_("Far Right")}}; + {0x0001, N_("Center")}, {0x0002, N_("Top")}, {0x0004, N_("Bottom")}, {0x0008, N_("Mid-left")}, {0x0010, N_("Mid-right")}, {0x0020, N_("Upper-left")}, {0x0040, N_("Upper-right")}, {0x0080, N_("Lower-left")}, {0x0100, N_("Lower-right")}, {0x0200, N_("Far Left")}, {0x0400, N_("Far Right")}}; // Nikon3 Auto Focus Tag Info constexpr TagInfo Nikon3MakerNote::tagInfoAf_[] = { @@ -717,8 +726,14 @@ namespace Exiv2::Internal //! PhaseDetectAF constexpr TagDetails nikonPhaseDetectAF[] = { - {0, N_("Off")}, {1, N_("On (51-point)")}, {2, N_("On (11-point)")}, {3, N_("On (39-point)")}, - {4, N_("On (73-point)")}, {5, N_("On (73-point, new)")}, {6, N_("On (105-point)")}, {7, N_("On (153-point)")}, + {0, N_("Off")}, + {1, N_("On (51-point)")}, + {2, N_("On (11-point)")}, + {3, N_("On (39-point)")}, + {4, N_("On (73-point)")}, + {5, N_("On (73-point, new)")}, + {6, N_("On (105-point)")}, + {7, N_("On (153-point)")}, }; // Nikon3 Auto Focus Tag Info @@ -853,19 +868,18 @@ namespace Exiv2::Internal //! FlashGNDistance constexpr TagDetails nikonFlashGNDistance[] = { - {0, N_("None")}, {1, "0.1 m"}, {2, "0.2 m"}, {3, "0.3 m"}, {4, "0.4 m"}, {5, "0.5 m"}, - {6, "0.6 m"}, {7, "0.7 m"}, {8, "0.8 m"}, {9, "0.9 m"}, {10, "1.0 m"}, {11, "1.1 m"}, - {12, "1.3 m"}, {13, "1.4 m"}, {14, "1.6 m"}, {15, "1.8 m"}, {16, "2.0 m"}, {17, "2.2 m"}, - {18, "2.5 m"}, {19, "2.8 m"}, {20, "3.2 m"}, {21, "3.6 m"}, {22, "4.0 m"}, {23, "4.5 m"}, - {24, "5.0 m"}, {25, "5.6 m"}, {26, "6.3 m"}, {27, "7.1 m"}, {28, "8.0 m"}, {29, "9.0 m"}, - {30, "10.0 m"}, {31, "11.0 m"}, {32, "13.0 m"}, {33, "14.0 m"}, {34, "16.0 m"}, {35, "18.0 m"}, - {36, "20.0 m"}, {255, N_("n/a")}}; + {0, N_("None")}, {1, "0.1 m"}, {2, "0.2 m"}, {3, "0.3 m"}, {4, "0.4 m"}, {5, "0.5 m"}, {6, "0.6 m"}, {7, "0.7 m"}, {8, "0.8 m"}, {9, "0.9 m"}, {10, "1.0 m"}, {11, "1.1 m"}, {12, "1.3 m"}, {13, "1.4 m"}, {14, "1.6 m"}, {15, "1.8 m"}, {16, "2.0 m"}, {17, "2.2 m"}, {18, "2.5 m"}, {19, "2.8 m"}, {20, "3.2 m"}, {21, "3.6 m"}, {22, "4.0 m"}, {23, "4.5 m"}, {24, "5.0 m"}, {25, "5.6 m"}, {26, "6.3 m"}, {27, "7.1 m"}, {28, "8.0 m"}, {29, "9.0 m"}, {30, "10.0 m"}, {31, "11.0 m"}, {32, "13.0 m"}, {33, "14.0 m"}, {34, "16.0 m"}, {35, "18.0 m"}, {36, "20.0 m"}, {255, N_("n/a")}}; //! FlashControlMode constexpr TagDetails nikonFlashControlMode[] = { - {0, N_("Off")}, {1, N_("iTTL-BL")}, {2, N_("iTTL")}, - {3, N_("Auto Aperture")}, {4, N_("Automatic")}, {5, N_("GN (distance priority)")}, - {6, N_("Manual")}, {7, N_("Repeating Flash")}, + {0, N_("Off")}, + {1, N_("iTTL-BL")}, + {2, N_("iTTL")}, + {3, N_("Auto Aperture")}, + {4, N_("Automatic")}, + {5, N_("GN (distance priority)")}, + {6, N_("Manual")}, + {7, N_("Repeating Flash")}, }; //! ExternalFlashFlags @@ -873,9 +887,7 @@ namespace Exiv2::Internal {0, N_("Fired")}, {2, N_("Bounce Flash")}, {4, N_("Wide Flash Adapter")}}; //! FlashColorFilter - constexpr TagDetails nikonFlashColorFilter[] = {{0, N_("None")}, {1, N_("FL-GL1")}, {2, N_("FL-GL2")}, - {9, N_("TN-A1")}, {10, N_("TN-A2")}, {65, N_("Red")}, - {66, N_("Blue")}, {67, N_("Yellow")}, {68, N_("Amber")}}; + constexpr TagDetails nikonFlashColorFilter[] = {{0, N_("None")}, {1, N_("FL-GL1")}, {2, N_("FL-GL2")}, {9, N_("TN-A1")}, {10, N_("TN-A2")}, {65, N_("Red")}, {66, N_("Blue")}, {67, N_("Yellow")}, {68, N_("Amber")}}; // Nikon3 Flash Info 1 Tag Info constexpr TagInfo Nikon3MakerNote::tagInfoFl1_[] = { @@ -1046,13 +1058,7 @@ namespace Exiv2::Internal //! AfFineTuneAdj D300 (a) constexpr TagDetails nikonAfFineTuneAdj1[] = { - {0x0000, "0"}, {0x003a, "+1"}, {0x003b, "+2"}, {0x003c, "+4"}, {0x003d, "+8"}, {0x003e, "+16"}, - {0x00c2, "-16"}, {0x00c3, "-8"}, {0x00c4, "-4"}, {0x00c5, "-2"}, {0x00c6, "-1"}, {0x103e, "+17"}, - {0x10c2, "-17"}, {0x203d, "+9"}, {0x203e, "+18"}, {0x20c2, "-18"}, {0x20c3, "-9"}, {0x303e, "+19"}, - {0x30c2, "-19"}, {0x403c, "+5"}, {0x403d, "+10"}, {0x403e, "+20"}, {0x40c2, "-20"}, {0x40c3, "-10"}, - {0x40c4, "-5"}, {0x603d, "+11"}, {0x60c3, "-11"}, {0x803b, "+3"}, {0x803c, "+6"}, {0x803d, "+12"}, - {0x80c3, "-12"}, {0x80c4, "-6"}, {0x80c5, "-3"}, {0xa03d, "+13"}, {0xa0c3, "-13"}, {0xc03c, "+7"}, - {0xc03d, "+14"}, {0xc0c3, "-14"}, {0xc0c4, "-7"}, {0xe03d, "+15"}, {0xe0c3, "-15"}}; + {0x0000, "0"}, {0x003a, "+1"}, {0x003b, "+2"}, {0x003c, "+4"}, {0x003d, "+8"}, {0x003e, "+16"}, {0x00c2, "-16"}, {0x00c3, "-8"}, {0x00c4, "-4"}, {0x00c5, "-2"}, {0x00c6, "-1"}, {0x103e, "+17"}, {0x10c2, "-17"}, {0x203d, "+9"}, {0x203e, "+18"}, {0x20c2, "-18"}, {0x20c3, "-9"}, {0x303e, "+19"}, {0x30c2, "-19"}, {0x403c, "+5"}, {0x403d, "+10"}, {0x403e, "+20"}, {0x40c2, "-20"}, {0x40c3, "-10"}, {0x40c4, "-5"}, {0x603d, "+11"}, {0x60c3, "-11"}, {0x803b, "+3"}, {0x803c, "+6"}, {0x803d, "+12"}, {0x80c3, "-12"}, {0x80c4, "-6"}, {0x80c5, "-3"}, {0xa03d, "+13"}, {0xa0c3, "-13"}, {0xc03c, "+7"}, {0xc03d, "+14"}, {0xc0c3, "-14"}, {0xc0c4, "-7"}, {0xe03d, "+15"}, {0xe0c3, "-15"}}; // Nikon3 Shot Info D300 (a) Tag Info constexpr TagInfo Nikon3MakerNote::tagInfoSi3_[] = { @@ -1074,13 +1080,7 @@ namespace Exiv2::Internal //! AfFineTuneAdj D300 (b) constexpr TagDetails nikonAfFineTuneAdj2[] = { - {0x0000, "0"}, {0x043e, "+13"}, {0x04c2, "-13"}, {0x183d, "+7"}, {0x183e, "+14"}, {0x18c2, "-14"}, - {0x18c3, "-7"}, {0x2c3e, "+15"}, {0x2cc2, "-15"}, {0x403a, "+1"}, {0x403b, "+2"}, {0x403c, "+4"}, - {0x403d, "+8"}, {0x403e, "+16"}, {0x40c2, "-16"}, {0x40c3, "-8"}, {0x40c4, "-4"}, {0x40c5, "-2"}, - {0x40c6, "-1"}, {0x543e, "+17"}, {0x54c2, "-17"}, {0x683d, "+9"}, {0x683e, "+18"}, {0x68c2, "-18"}, - {0x68c3, "-9"}, {0x7c3e, "+19"}, {0x7cc2, "-19"}, {0x903c, "+5"}, {0x903d, "+10"}, {0x903e, "+20"}, - {0x90c2, "-20"}, {0x90c3, "-10"}, {0x90c4, "-5"}, {0xb83d, "+11"}, {0xb8c3, "-11"}, {0xe03b, "+3"}, - {0xe03c, "+6"}, {0xe03d, "+12"}, {0xe0c3, "-12"}, {0xe0c4, "-6"}, {0xe0c5, "-3"}}; + {0x0000, "0"}, {0x043e, "+13"}, {0x04c2, "-13"}, {0x183d, "+7"}, {0x183e, "+14"}, {0x18c2, "-14"}, {0x18c3, "-7"}, {0x2c3e, "+15"}, {0x2cc2, "-15"}, {0x403a, "+1"}, {0x403b, "+2"}, {0x403c, "+4"}, {0x403d, "+8"}, {0x403e, "+16"}, {0x40c2, "-16"}, {0x40c3, "-8"}, {0x40c4, "-4"}, {0x40c5, "-2"}, {0x40c6, "-1"}, {0x543e, "+17"}, {0x54c2, "-17"}, {0x683d, "+9"}, {0x683e, "+18"}, {0x68c2, "-18"}, {0x68c3, "-9"}, {0x7c3e, "+19"}, {0x7cc2, "-19"}, {0x903c, "+5"}, {0x903d, "+10"}, {0x903e, "+20"}, {0x90c2, "-20"}, {0x90c3, "-10"}, {0x90c4, "-5"}, {0xb83d, "+11"}, {0xb8c3, "-11"}, {0xe03b, "+3"}, {0xe03c, "+6"}, {0xe03d, "+12"}, {0xe0c3, "-12"}, {0xe0c4, "-6"}, {0xe0c5, "-3"}}; // Nikon3 Shot Info D300 (b) Tag Info constexpr TagInfo Nikon3MakerNote::tagInfoSi4_[] = { @@ -1613,9 +1613,11 @@ namespace Exiv2::Internal } } if (d70) { - EXV_PRINT_TAG_BITMASK(nikonShootingModeD70)(os, value, nullptr); + EXV_PRINT_TAG_BITMASK(nikonShootingModeD70) + (os, value, nullptr); } else { - EXV_PRINT_TAG_BITMASK(nikonShootingMode)(os, value, nullptr); + EXV_PRINT_TAG_BITMASK(nikonShootingMode) + (os, value, nullptr); } return os; } @@ -2974,8 +2976,13 @@ namespace Exiv2::Internal byte raw[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; static constexpr auto tags = std::array{ - "LensIDNumber", "LensFStops", "MinFocalLength", "MaxFocalLength", "MaxApertureAtMinFocal", - "MaxApertureAtMaxFocal", "MCUVersion", + "LensIDNumber", + "LensFStops", + "MinFocalLength", + "MaxFocalLength", + "MaxApertureAtMinFocal", + "MaxApertureAtMaxFocal", + "MCUVersion", }; const std::string pre = std::string("Exif.") + group + std::string("."); diff --git a/src/olympusmn_int.cpp b/src/olympusmn_int.cpp index a3d74428f0..b193ae618a 100644 --- a/src/olympusmn_int.cpp +++ b/src/olympusmn_int.cpp @@ -310,8 +310,7 @@ namespace Exiv2::Internal //! FlashMode, tag 0x0400 constexpr TagDetailsBitmask olympusFlashMode[] = { - {0x0000, N_("Off")}, {0x0001, N_("On")}, {0x0002, N_("Fill-in")}, {0x0004, N_("Red-eye")}, - {0x0008, N_("Slow-sync")}, {0x0010, N_("Forced On")}, {0x0020, N_("2nd Curtain")}}; + {0x0000, N_("Off")}, {0x0001, N_("On")}, {0x0002, N_("Fill-in")}, {0x0004, N_("Red-eye")}, {0x0008, N_("Slow-sync")}, {0x0010, N_("Forced On")}, {0x0020, N_("2nd Curtain")}}; //! FlashRemoteControl, tag 0x0403 constexpr TagDetails olympusFlashRemoteControl[] = {{0x0, N_("Off")}, @@ -391,12 +390,10 @@ namespace Exiv2::Internal {512, N_("Sepia")}}; //! PictureModeBWFilter, tag 0x0525 - constexpr TagDetails olympusPictureModeBWFilter[] = {{0, N_("n/a")}, {1, N_("Neutral")}, {2, N_("Yellow")}, - {3, N_("Orange")}, {4, N_("Red")}, {5, N_("Green")}}; + constexpr TagDetails olympusPictureModeBWFilter[] = {{0, N_("n/a")}, {1, N_("Neutral")}, {2, N_("Yellow")}, {3, N_("Orange")}, {4, N_("Red")}, {5, N_("Green")}}; //! PictureModeTone, tag 0x0526 - constexpr TagDetails olympusPictureModeTone[] = {{0, N_("n/a")}, {1, N_("Neutral")}, {2, N_("Sepia")}, - {3, N_("Blue")}, {4, N_("Purple")}, {5, N_("Green")}}; + constexpr TagDetails olympusPictureModeTone[] = {{0, N_("n/a")}, {1, N_("Neutral")}, {2, N_("Sepia")}, {3, N_("Blue")}, {4, N_("Purple")}, {5, N_("Green")}}; //! OlympusCs Quality, tag 0x0603 constexpr TagDetails olympusCsQuality[] = {{1, N_("SQ")}, {2, N_("HQ")}, {3, N_("SHQ")}, {4, N_("RAW")}}; @@ -527,8 +524,7 @@ namespace Exiv2::Internal //! OlympusEq FlashModel, tag 0x1001 constexpr TagDetails olympusEqFlashModel[] = { - {0, N_("None")}, {1, "FL-20"}, {2, "FL-50"}, {3, "RF-11"}, {4, "TF-22"}, {5, "FL-36"}, - {6, "FL-50R"}, {7, "FL-36R"}, {9, "FL-14"}, {11, "FL-600R"}, {11, "FL-600R"} // To silence compiler warning + {0, N_("None")}, {1, "FL-20"}, {2, "FL-50"}, {3, "RF-11"}, {4, "TF-22"}, {5, "FL-36"}, {6, "FL-50R"}, {7, "FL-36R"}, {9, "FL-14"}, {11, "FL-600R"}, {11, "FL-600R"} // To silence compiler warning }; constexpr TagInfo OlympusMakerNote::tagInfoEq_[] = { @@ -603,10 +599,7 @@ namespace Exiv2::Internal {0, N_("Original")}, {1, N_("Edited (Landscape)")}, {6, N_("Edited (Portrait)")}, {8, N_("Edited (Portrait)")}}; //! OlympusRd Settings, tag 0x010c - constexpr TagDetailsBitmask olympusRdSettings[] = {{0x0001, N_("WB Color Temp")}, {0x0004, N_("WB Gray Point")}, - {0x0008, N_("Saturation")}, {0x0010, N_("Contrast")}, - {0x0020, N_("Sharpness")}, {0x0040, N_("Color Space")}, - {0x0080, N_("High Function")}, {0x0100, N_("Noise Reduction")}}; + constexpr TagDetailsBitmask olympusRdSettings[] = {{0x0001, N_("WB Color Temp")}, {0x0004, N_("WB Gray Point")}, {0x0008, N_("Saturation")}, {0x0010, N_("Contrast")}, {0x0020, N_("Sharpness")}, {0x0040, N_("Color Space")}, {0x0080, N_("High Function")}, {0x0100, N_("Noise Reduction")}}; constexpr TagInfo OlympusMakerNote::tagInfoRd_[] = { {0x0000, "RawDevVersion", N_("Raw Development Version"), N_("Raw development version"), olympusRdId, makerTags, @@ -729,8 +722,7 @@ namespace Exiv2::Internal {0, N_("Off")}, {2, N_("On (2 frames)")}, {3, N_("On (3 frames)")}}; //! OlympusIp olympusIpAspectRatio, tag 0x101c - constexpr TagDetails olympusIpAspectRatio[] = {{1, "4:3"}, {2, "3:2"}, {3, "16:9"}, {4, "6:6"}, {5, "5:4"}, - {6, "7:6"}, {7, "6:5"}, {8, "7:5"}, {9, "3:4"}}; + constexpr TagDetails olympusIpAspectRatio[] = {{1, "4:3"}, {2, "3:2"}, {3, "16:9"}, {4, "6:6"}, {5, "5:4"}, {6, "7:6"}, {7, "6:5"}, {8, "7:5"}, {9, "3:4"}}; constexpr TagInfo OlympusMakerNote::tagInfoIp_[] = { {0x0000, "ImageProcessingVersion", N_("Image Processing Version"), N_("Image processing version"), olympusIpId, @@ -1395,17 +1387,24 @@ namespace Exiv2::Internal uint16_t val; const char* label; } focusModes0[] = { - {0, N_("Single AF")}, {1, N_("Sequential shooting AF")}, - {2, N_("Continuous AF")}, {3, N_("Multi AF")}, - {4, N_("Face detect")}, {10, N_("MF")}, + {0, N_("Single AF")}, + {1, N_("Sequential shooting AF")}, + {2, N_("Continuous AF")}, + {3, N_("Multi AF")}, + {4, N_("Face detect")}, + {10, N_("MF")}, }; static struct { uint16_t val; const char* label; } focusModes1[] = { - {0x0001, N_("S-AF")}, {0x0004, N_("C-AF")}, {0x0010, N_("MF")}, - {0x0020, N_("Face detect")}, {0x0040, N_("Imager AF")}, {0x0100, N_("AF sensor")}, + {0x0001, N_("S-AF")}, + {0x0004, N_("C-AF")}, + {0x0010, N_("MF")}, + {0x0020, N_("Face detect")}, + {0x0040, N_("Imager AF")}, + {0x0100, N_("AF sensor")}, }; if (value.count() < 1 || value.typeId() != unsignedShort) { @@ -1558,7 +1557,10 @@ namespace Exiv2::Internal uint16_t val; const char* label; } afPoints[] = { - {0, N_("Left (or n/a)")}, {1, N_("Center (horizontal)")}, {2, N_("Right")}, {3, N_("Center (vertical)")}, + {0, N_("Left (or n/a)")}, + {1, N_("Center (horizontal)")}, + {2, N_("Right")}, + {3, N_("Center (vertical)")}, {255, N_("None")}, }; diff --git a/src/orfimage_int.cpp b/src/orfimage_int.cpp index 65eb6fa0a2..4d5e368e27 100644 --- a/src/orfimage_int.cpp +++ b/src/orfimage_int.cpp @@ -4,7 +4,8 @@ namespace Exiv2::Internal { - OrfHeader::OrfHeader(ByteOrder byteOrder) : TiffHeaderBase(0x4f52, 8, byteOrder, 0x00000008), sig_(0x4f52) + OrfHeader::OrfHeader(ByteOrder byteOrder) + : TiffHeaderBase(0x4f52, 8, byteOrder, 0x00000008), sig_(0x4f52) { } diff --git a/src/panasonicmn_int.cpp b/src/panasonicmn_int.cpp index aa0943127d..0175a8b8be 100644 --- a/src/panasonicmn_int.cpp +++ b/src/panasonicmn_int.cpp @@ -17,25 +17,48 @@ namespace Exiv2::Internal { //! Quality, tag 0x0001 constexpr TagDetails panasonicQuality[] = { - {1, N_("TIFF")}, {2, N_("High")}, {3, N_("Normal")}, {6, N_("Very High")}, - {7, N_("Raw")}, {9, N_("Motion Picture")}, {11, N_("Full HD Movie")}, {12, N_("4k Movie")}, + {1, N_("TIFF")}, + {2, N_("High")}, + {3, N_("Normal")}, + {6, N_("Very High")}, + {7, N_("Raw")}, + {9, N_("Motion Picture")}, + {11, N_("Full HD Movie")}, + {12, N_("4k Movie")}, }; //! WhiteBalance, tag 0x0003 constexpr TagDetails panasonicWhiteBalance[] = { - {1, N_("Auto")}, {2, N_("Daylight")}, {3, N_("Cloudy")}, {4, N_("Halogen")}, {5, N_("Manual")}, - {8, N_("Flash")}, {10, N_("Black and white")}, {11, N_("Manual")}, {12, N_("Shade")}, {13, N_("Kelvin")}, + {1, N_("Auto")}, + {2, N_("Daylight")}, + {3, N_("Cloudy")}, + {4, N_("Halogen")}, + {5, N_("Manual")}, + {8, N_("Flash")}, + {10, N_("Black and white")}, + {11, N_("Manual")}, + {12, N_("Shade")}, + {13, N_("Kelvin")}, }; //! FocusMode, tag 0x0007 constexpr TagDetails panasonicFocusMode[] = { - {1, N_("Auto")}, {2, N_("Manual")}, {4, N_("Auto, focus button")}, {5, N_("Auto, continuous")}, {6, N_("AF-S")}, - {7, N_("AF-C")}, {8, N_("AF-F")}, + {1, N_("Auto")}, + {2, N_("Manual")}, + {4, N_("Auto, focus button")}, + {5, N_("Auto, continuous")}, + {6, N_("AF-S")}, + {7, N_("AF-C")}, + {8, N_("AF-F")}, }; //! ImageStabilizer, tag 0x001a constexpr TagDetails panasonicImageStabilizer[] = { - {2, N_("On, Mode 1")}, {3, N_("Off")}, {4, N_("On, Mode 2")}, {5, N_("Panning")}, {6, N_("On, Mode 3")}, + {2, N_("On, Mode 1")}, + {3, N_("Off")}, + {4, N_("On, Mode 2")}, + {5, N_("Panning")}, + {6, N_("On, Mode 3")}, }; //! Macro, tag 0x001c @@ -125,17 +148,14 @@ namespace Exiv2::Internal constexpr TagDetails panasonicAudio[] = {{1, N_("Yes")}, {2, N_("No")}, {3, N_("Stereo")}}; //! ColorEffect, tag 0x0028 - constexpr TagDetails panasonicColorEffect[] = {{1, N_("Off")}, {2, N_("Warm")}, - {3, N_("Cool")}, {4, N_("Black and white")}, - {5, N_("Sepia")}, {6, N_("Happy")}}; + constexpr TagDetails panasonicColorEffect[] = {{1, N_("Off")}, {2, N_("Warm")}, {3, N_("Cool")}, {4, N_("Black and white")}, {5, N_("Sepia")}, {6, N_("Happy")}}; //! BustMode, tag 0x002a constexpr TagDetails panasonicBurstMode[] = {{0, N_("Off")}, {1, N_("Low/High quality")}, {2, N_("Infinite")}}; //! Contrast, tag 0x002c constexpr TagDetails panasonicContrast[] = { - {0, N_("Normal")}, {1, N_("Low")}, {2, N_("High")}, {6, N_("Medium low")}, {7, N_("Medium high")}, - {256, N_("Low")}, {272, N_("Standard")}, {288, N_("High")}, {288, N_("High")} // To silence compiler warning + {0, N_("Normal")}, {1, N_("Low")}, {2, N_("High")}, {6, N_("Medium low")}, {7, N_("Medium high")}, {256, N_("Low")}, {272, N_("Standard")}, {288, N_("High")}, {288, N_("High")} // To silence compiler warning }; //! NoiseReduction, tag 0x002d @@ -181,9 +201,7 @@ namespace Exiv2::Internal //! FilmMode, tag 0x0042 constexpr TagDetails panasonicFilmMode[] = { - {1, N_("Standard (color)")}, {2, N_("Dynamic (color)")}, {3, N_("Nature (color)")}, - {4, N_("Smooth (color)")}, {5, N_("Standard (B&W)")}, {6, N_("Dynamic (B&W)")}, - {7, N_("Smooth (B&W)")}, {10, N_("Nostalgic")}, {11, N_("Vibrant")}}; + {1, N_("Standard (color)")}, {2, N_("Dynamic (color)")}, {3, N_("Nature (color)")}, {4, N_("Smooth (color)")}, {5, N_("Standard (B&W)")}, {6, N_("Dynamic (B&W)")}, {7, N_("Smooth (B&W)")}, {10, N_("Nostalgic")}, {11, N_("Vibrant")}}; //! Bracket Settings, tag 0x0045 constexpr TagDetails panasonicBracketSettings[] = {{0, N_("No Bracket")}, @@ -219,17 +237,13 @@ namespace Exiv2::Internal constexpr TagDetails panasonicClearRetouch[] = {{0, N_("Off")}, {1, N_("On")}}; //! Photo Style, tag 0x0089 - constexpr TagDetails panasonicPhotoStyle[] = {{0, N_("NoAuto")}, {1, N_("Standard or Custom")}, {2, N_("Vivid")}, - {3, N_("Natural")}, {4, N_("Monochrome")}, {5, N_("Scenery")}, - {6, N_("Portrait")}}; + constexpr TagDetails panasonicPhotoStyle[] = {{0, N_("NoAuto")}, {1, N_("Standard or Custom")}, {2, N_("Vivid")}, {3, N_("Natural")}, {4, N_("Monochrome")}, {5, N_("Scenery")}, {6, N_("Portrait")}}; //! Shading compensation, tag 0x008a constexpr TagDetails panasonicShadingCompensation[] = {{0, N_("Off")}, {1, N_("On")}}; //! Camera orientation, tag 0x008f - constexpr TagDetails panasonicCameraOrientation[] = {{0, N_("Normal")}, {1, N_("Rotate CW")}, - {2, N_("Rotate 180")}, {3, N_("Rotate CCW")}, - {4, N_("Tilt upwards")}, {5, N_("Tilt downwards")}}; + constexpr TagDetails panasonicCameraOrientation[] = {{0, N_("Normal")}, {1, N_("Rotate CW")}, {2, N_("Rotate 180")}, {3, N_("Rotate CCW")}, {4, N_("Tilt upwards")}, {5, N_("Tilt downwards")}}; //! Sweep panorama direction, tag 0x0093 constexpr TagDetails panasonicSweepPanoramaDirection[] = {{0, N_("Off")}, diff --git a/src/pentaxmn_int.cpp b/src/pentaxmn_int.cpp index 3aaaba0820..0d9bf58dc6 100644 --- a/src/pentaxmn_int.cpp +++ b/src/pentaxmn_int.cpp @@ -163,8 +163,13 @@ namespace Exiv2::Internal //! Quality, tag 0x0008 constexpr TagDetails pentaxQuality[] = { - {0, N_("Good")}, {1, N_("Better")}, {2, N_("Best")}, {3, N_("TIFF")}, - {4, N_("RAW")}, {5, N_("Premium")}, {65535, N_("n/a")}, + {0, N_("Good")}, + {1, N_("Better")}, + {2, N_("Best")}, + {3, N_("TIFF")}, + {4, N_("RAW")}, + {5, N_("Premium")}, + {65535, N_("n/a")}, }; //! Size, tag 0x0009 @@ -263,11 +268,16 @@ namespace Exiv2::Internal //! AFPointInFocus, tag 0x000f constexpr TagDetails pentaxAFPointFocus[] = { - {0xffff, N_("None")}, {0, N_("Fixed Center or multiple")}, - {1, N_("Top-left")}, {2, N_("Top-center")}, - {3, N_("Top-right")}, {4, N_("Left")}, - {5, N_("Center")}, {6, N_("Right")}, - {7, N_("Bottom-left")}, {8, N_("Bottom-center")}, + {0xffff, N_("None")}, + {0, N_("Fixed Center or multiple")}, + {1, N_("Top-left")}, + {2, N_("Top-center")}, + {3, N_("Top-right")}, + {4, N_("Left")}, + {5, N_("Center")}, + {6, N_("Right")}, + {7, N_("Bottom-left")}, + {8, N_("Bottom-center")}, {9, N_("Bottom-right")}, }; @@ -409,21 +419,33 @@ namespace Exiv2::Internal //! Saturation, tag 0x001f constexpr TagDetails pentaxSaturation[] = { - {0, N_("Low")}, {1, N_("Normal")}, {2, N_("High")}, {3, N_("Med Low")}, - {4, N_("Med High")}, {5, N_("Very Low")}, {6, N_("Very High")}, {7, N_("-4")}, - {8, N_("+4")}, {65535, N_("None")}, {65535, N_("None")} // To silence compiler warning + {0, N_("Low")}, {1, N_("Normal")}, {2, N_("High")}, {3, N_("Med Low")}, {4, N_("Med High")}, {5, N_("Very Low")}, {6, N_("Very High")}, {7, N_("-4")}, {8, N_("+4")}, {65535, N_("None")}, {65535, N_("None")} // To silence compiler warning }; //! Contrast, tag 0x0020 constexpr TagDetails pentaxContrast[] = { - {0, N_("Low")}, {1, N_("Normal")}, {2, N_("High")}, {3, N_("Med Low")}, {4, N_("Med High")}, - {5, N_("Very Low")}, {6, N_("Very High")}, {7, N_("-4")}, {8, N_("+4")}, + {0, N_("Low")}, + {1, N_("Normal")}, + {2, N_("High")}, + {3, N_("Med Low")}, + {4, N_("Med High")}, + {5, N_("Very Low")}, + {6, N_("Very High")}, + {7, N_("-4")}, + {8, N_("+4")}, }; //! Sharpness, tag 0x0021 constexpr TagDetails pentaxSharpness[] = { - {0, N_("Soft")}, {1, N_("Normal")}, {2, N_("Hard")}, {3, N_("Med Soft")}, {4, N_("Med Hard")}, - {5, N_("Very Soft")}, {6, N_("Very Hard")}, {7, N_("-4")}, {8, N_("+4")}, + {0, N_("Soft")}, + {1, N_("Normal")}, + {2, N_("Hard")}, + {3, N_("Med Soft")}, + {4, N_("Med Hard")}, + {5, N_("Very Soft")}, + {6, N_("Very Hard")}, + {7, N_("-4")}, + {8, N_("+4")}, }; //! Location, tag 0x0022 @@ -434,32 +456,86 @@ namespace Exiv2::Internal //! City names, tags 0x0023 and 0x0024 constexpr TagDetails pentaxCities[] = { - {0, N_("Pago Pago")}, {1, N_("Honolulu")}, {2, N_("Anchorage")}, {3, N_("Vancouver")}, - {4, N_("San Fransisco")}, {5, N_("Los Angeles")}, {6, N_("Calgary")}, {7, N_("Denver")}, - {8, N_("Mexico City")}, {9, N_("Chicago")}, {10, N_("Miami")}, {11, N_("Toronto")}, - {12, N_("New York")}, {13, N_("Santiago")}, {14, N_("Caracus")}, {15, N_("Halifax")}, - {16, N_("Buenos Aires")}, {17, N_("Sao Paulo")}, {18, N_("Rio de Janeiro")}, {19, N_("Madrid")}, - {20, N_("London")}, {21, N_("Paris")}, {22, N_("Milan")}, {23, N_("Rome")}, - {24, N_("Berlin")}, {25, N_("Johannesburg")}, {26, N_("Istanbul")}, {27, N_("Cairo")}, - {28, N_("Jerusalem")}, {29, N_("Moscow")}, {30, N_("Jeddah")}, {31, N_("Tehran")}, - {32, N_("Dubai")}, {33, N_("Karachi")}, {34, N_("Kabul")}, {35, N_("Male")}, - {36, N_("Delhi")}, {37, N_("Colombo")}, {38, N_("Kathmandu")}, {39, N_("Dacca")}, - {40, N_("Yangon")}, {41, N_("Bangkok")}, {42, N_("Kuala Lumpur")}, {43, N_("Vientiane")}, - {44, N_("Singapore")}, {45, N_("Phnom Penh")}, {46, N_("Ho Chi Minh")}, {47, N_("Jakarta")}, - {48, N_("Hong Kong")}, {49, N_("Perth")}, {50, N_("Beijing")}, {51, N_("Shanghai")}, - {52, N_("Manila")}, {53, N_("Taipei")}, {54, N_("Seoul")}, {55, N_("Adelaide")}, - {56, N_("Tokyo")}, {57, N_("Guam")}, {58, N_("Sydney")}, {59, N_("Noumea")}, - {60, N_("Wellington")}, {61, N_("Auckland")}, {62, N_("Lima")}, {63, N_("Dakar")}, - {64, N_("Algiers")}, {65, N_("Helsinki")}, {66, N_("Athens")}, {67, N_("Nairobi")}, - {68, N_("Amsterdam")}, {69, N_("Stockholm")}, {70, N_("Lisbon")}, {71, N_("Copenhagen")}, - {72, N_("Warsaw")}, {73, N_("Prague")}, {74, N_("Budapest")}, + {0, N_("Pago Pago")}, + {1, N_("Honolulu")}, + {2, N_("Anchorage")}, + {3, N_("Vancouver")}, + {4, N_("San Fransisco")}, + {5, N_("Los Angeles")}, + {6, N_("Calgary")}, + {7, N_("Denver")}, + {8, N_("Mexico City")}, + {9, N_("Chicago")}, + {10, N_("Miami")}, + {11, N_("Toronto")}, + {12, N_("New York")}, + {13, N_("Santiago")}, + {14, N_("Caracus")}, + {15, N_("Halifax")}, + {16, N_("Buenos Aires")}, + {17, N_("Sao Paulo")}, + {18, N_("Rio de Janeiro")}, + {19, N_("Madrid")}, + {20, N_("London")}, + {21, N_("Paris")}, + {22, N_("Milan")}, + {23, N_("Rome")}, + {24, N_("Berlin")}, + {25, N_("Johannesburg")}, + {26, N_("Istanbul")}, + {27, N_("Cairo")}, + {28, N_("Jerusalem")}, + {29, N_("Moscow")}, + {30, N_("Jeddah")}, + {31, N_("Tehran")}, + {32, N_("Dubai")}, + {33, N_("Karachi")}, + {34, N_("Kabul")}, + {35, N_("Male")}, + {36, N_("Delhi")}, + {37, N_("Colombo")}, + {38, N_("Kathmandu")}, + {39, N_("Dacca")}, + {40, N_("Yangon")}, + {41, N_("Bangkok")}, + {42, N_("Kuala Lumpur")}, + {43, N_("Vientiane")}, + {44, N_("Singapore")}, + {45, N_("Phnom Penh")}, + {46, N_("Ho Chi Minh")}, + {47, N_("Jakarta")}, + {48, N_("Hong Kong")}, + {49, N_("Perth")}, + {50, N_("Beijing")}, + {51, N_("Shanghai")}, + {52, N_("Manila")}, + {53, N_("Taipei")}, + {54, N_("Seoul")}, + {55, N_("Adelaide")}, + {56, N_("Tokyo")}, + {57, N_("Guam")}, + {58, N_("Sydney")}, + {59, N_("Noumea")}, + {60, N_("Wellington")}, + {61, N_("Auckland")}, + {62, N_("Lima")}, + {63, N_("Dakar")}, + {64, N_("Algiers")}, + {65, N_("Helsinki")}, + {66, N_("Athens")}, + {67, N_("Nairobi")}, + {68, N_("Amsterdam")}, + {69, N_("Stockholm")}, + {70, N_("Lisbon")}, + {71, N_("Copenhagen")}, + {72, N_("Warsaw")}, + {73, N_("Prague")}, + {74, N_("Budapest")}, }; //! ImageProcessing, combi-tag 0x0032 (4 bytes) constexpr TagDetails pentaxImageProcessing[] = { - {0x00000000, N_("Unprocessed")}, {0x00000004, N_("Digital Filter")}, {0x01000000, N_("Resized")}, - {0x02000000, N_("Cropped")}, {0x04000000, N_("Color Filter")}, {0x06000000, N_("Digital Filter 6")}, - {0x10000000, N_("Frame Synthesis?")}}; + {0x00000000, N_("Unprocessed")}, {0x00000004, N_("Digital Filter")}, {0x01000000, N_("Resized")}, {0x02000000, N_("Cropped")}, {0x04000000, N_("Color Filter")}, {0x06000000, N_("Digital Filter 6")}, {0x10000000, N_("Frame Synthesis?")}}; //! PictureMode, combi-tag 0x0033 (3 bytes) constexpr TagDetails pentaxPictureMode[] = { @@ -868,9 +944,16 @@ namespace Exiv2::Internal //! ImageTone, tag 0x004f constexpr TagDetails pentaxImageTone[] = { - {0, N_("Natural")}, {1, N_("Bright")}, {2, N_("Portrait")}, {3, N_("Landscape")}, - {4, N_("Vibrant")}, {5, N_("Monochrome")}, {6, N_("Muted")}, {7, N_("Reversal film")}, - {8, N_("Bleach bypass")}, {9, N_("Radiant")}, + {0, N_("Natural")}, + {1, N_("Bright")}, + {2, N_("Portrait")}, + {3, N_("Landscape")}, + {4, N_("Vibrant")}, + {5, N_("Monochrome")}, + {6, N_("Muted")}, + {7, N_("Reversal film")}, + {8, N_("Bleach bypass")}, + {9, N_("Radiant")}, }; //! DynamicRangeExpansion, tag 0x0069 @@ -881,7 +964,11 @@ namespace Exiv2::Internal //! HighISONoiseReduction, tag 0x0071 constexpr TagDetails pentaxHighISONoiseReduction[] = { - {0, N_("Off")}, {1, N_("Weakest")}, {2, N_("Weak")}, {3, N_("Strong")}, {4, N_("Custom")}, + {0, N_("Off")}, + {1, N_("Weakest")}, + {2, N_("Weak")}, + {3, N_("Strong")}, + {4, N_("Custom")}, }; std::ostream& PentaxMakerNote::printVersion(std::ostream& os, const Value& value, const ExifData*) @@ -1263,10 +1350,20 @@ namespace Exiv2::Internal //! List of lens ids which require special treatment using resolveLensType const LensIdFct lensIdFct[] = { - {0x0317, resolveLensType}, {0x0319, resolveLens0x319}, {0x031b, resolveLensType}, {0x031c, resolveLensType}, - {0x031d, resolveLensType}, {0x031f, resolveLensType}, {0x0329, resolveLensType}, {0x032c, resolveLens0x32c}, - {0x032e, resolveLensType}, {0x0334, resolveLensType}, {0x03ff, resolveLens0x3ff}, {0x041a, resolveLensType}, - {0x042d, resolveLensType}, {0x08ff, resolveLens0x8ff}, + {0x0317, resolveLensType}, + {0x0319, resolveLens0x319}, + {0x031b, resolveLensType}, + {0x031c, resolveLensType}, + {0x031d, resolveLensType}, + {0x031f, resolveLensType}, + {0x0329, resolveLensType}, + {0x032c, resolveLens0x32c}, + {0x032e, resolveLensType}, + {0x0334, resolveLensType}, + {0x03ff, resolveLens0x3ff}, + {0x041a, resolveLensType}, + {0x042d, resolveLensType}, + {0x08ff, resolveLens0x8ff}, }; //! A lens id and a pretty-print function for special treatment of the id. diff --git a/src/pngchunk_int.cpp b/src/pngchunk_int.cpp index 89d51f8650..d7eee5e805 100644 --- a/src/pngchunk_int.cpp +++ b/src/pngchunk_int.cpp @@ -505,9 +505,9 @@ namespace Exiv2::Internal } DataBuf info; - unsigned char unhex[103] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + unsigned char unhex[103] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15}; if (iTXt) { @@ -612,7 +612,9 @@ namespace Exiv2::Internal static byte hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; std::ostringstream oss; - oss << '\n' << profileType << '\n' << std::setw(8) << profileData.size(); + oss << '\n' + << profileType << '\n' + << std::setw(8) << profileData.size(); const char* sp = profileData.data(); for (std::string::size_type i = 0; i < profileData.size(); ++i) { if (i % 36 == 0) diff --git a/src/pngimage.cpp b/src/pngimage.cpp index 1648440660..0216942ec5 100644 --- a/src/pngimage.cpp +++ b/src/pngimage.cpp @@ -24,16 +24,120 @@ namespace { // Signature from front of PNG file constexpr unsigned char pngSignature[] = { - 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, + 0x89, + 0x50, + 0x4E, + 0x47, + 0x0D, + 0x0A, + 0x1A, + 0x0A, }; constexpr unsigned char pngBlank[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00, - 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, - 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x49, - 0x44, 0x41, 0x54, 0x08, 0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc, 0xcc, 0x59, - 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, + 0x89, + 0x50, + 0x4e, + 0x47, + 0x0d, + 0x0a, + 0x1a, + 0x0a, + 0x00, + 0x00, + 0x00, + 0x0d, + 0x49, + 0x48, + 0x44, + 0x52, + 0x00, + 0x00, + 0x00, + 0x01, + 0x00, + 0x00, + 0x00, + 0x01, + 0x08, + 0x02, + 0x00, + 0x00, + 0x00, + 0x90, + 0x77, + 0x53, + 0xde, + 0x00, + 0x00, + 0x00, + 0x01, + 0x73, + 0x52, + 0x47, + 0x42, + 0x00, + 0xae, + 0xce, + 0x1c, + 0xe9, + 0x00, + 0x00, + 0x00, + 0x09, + 0x70, + 0x48, + 0x59, + 0x73, + 0x00, + 0x00, + 0x0b, + 0x13, + 0x00, + 0x00, + 0x0b, + 0x13, + 0x01, + 0x00, + 0x9a, + 0x9c, + 0x18, + 0x00, + 0x00, + 0x00, + 0x0c, + 0x49, + 0x44, + 0x41, + 0x54, + 0x08, + 0xd7, + 0x63, + 0xf8, + 0xff, + 0xff, + 0x3f, + 0x00, + 0x05, + 0xfe, + 0x02, + 0xfe, + 0xdc, + 0xcc, + 0x59, + 0xe7, + 0x00, + 0x00, + 0x00, + 0x00, + 0x49, + 0x45, + 0x4e, + 0x44, + 0xae, + 0x42, + 0x60, + 0x82, }; const auto nullComp = reinterpret_cast("\0\0"); @@ -546,8 +650,8 @@ namespace Exiv2 // Read whole chunk : Chunk header + Chunk data (not fixed size - can be null) + CRC (4 bytes). - DataBuf chunkBuf(8 + dataOffset + 4); // Chunk header (8 bytes) + Chunk data + CRC (4 bytes). - chunkBuf.copyBytes(0, cheaderBuf.c_data(), 8); // Copy header. + DataBuf chunkBuf(8 + dataOffset + 4); // Chunk header (8 bytes) + Chunk data + CRC (4 bytes). + chunkBuf.copyBytes(0, cheaderBuf.c_data(), 8); // Copy header. bufRead = io_->read(chunkBuf.data(8), dataOffset + 4); // Extract chunk data + CRC if (io_->error()) throw Error(ErrorCode::kerFailedToReadImageData); diff --git a/src/preview.cpp b/src/preview.cpp index 96dc69cb02..cd85457c42 100644 --- a/src/preview.cpp +++ b/src/preview.cpp @@ -276,23 +276,7 @@ namespace // class member definitions const Loader::LoaderList Loader::loaderList_[] = { - {nullptr, createLoaderNative, 0}, {nullptr, createLoaderNative, 1}, - {nullptr, createLoaderNative, 2}, {nullptr, createLoaderNative, 3}, - {nullptr, createLoaderExifDataJpeg, 0}, {nullptr, createLoaderExifDataJpeg, 1}, - {nullptr, createLoaderExifDataJpeg, 2}, {nullptr, createLoaderExifDataJpeg, 3}, - {nullptr, createLoaderExifDataJpeg, 4}, {nullptr, createLoaderExifDataJpeg, 5}, - {nullptr, createLoaderExifDataJpeg, 6}, {nullptr, createLoaderExifDataJpeg, 7}, - {nullptr, createLoaderExifDataJpeg, 8}, {"image/x-panasonic-rw2", createLoaderExifDataJpeg, 9}, - {nullptr, createLoaderExifDataJpeg, 10}, {nullptr, createLoaderExifDataJpeg, 11}, - {nullptr, createLoaderTiff, 0}, {nullptr, createLoaderTiff, 1}, - {nullptr, createLoaderTiff, 2}, {nullptr, createLoaderTiff, 3}, - {nullptr, createLoaderTiff, 4}, {nullptr, createLoaderTiff, 5}, - {nullptr, createLoaderTiff, 6}, {"image/x-canon-cr2", createLoaderTiff, 7}, - {nullptr, createLoaderExifJpeg, 0}, {nullptr, createLoaderExifJpeg, 1}, - {nullptr, createLoaderExifJpeg, 2}, {nullptr, createLoaderExifJpeg, 3}, - {nullptr, createLoaderExifJpeg, 4}, {nullptr, createLoaderExifJpeg, 5}, - {nullptr, createLoaderExifJpeg, 6}, {"image/x-canon-cr2", createLoaderExifJpeg, 7}, - {nullptr, createLoaderExifJpeg, 8}, {nullptr, createLoaderXmpJpeg, 0}}; + {nullptr, createLoaderNative, 0}, {nullptr, createLoaderNative, 1}, {nullptr, createLoaderNative, 2}, {nullptr, createLoaderNative, 3}, {nullptr, createLoaderExifDataJpeg, 0}, {nullptr, createLoaderExifDataJpeg, 1}, {nullptr, createLoaderExifDataJpeg, 2}, {nullptr, createLoaderExifDataJpeg, 3}, {nullptr, createLoaderExifDataJpeg, 4}, {nullptr, createLoaderExifDataJpeg, 5}, {nullptr, createLoaderExifDataJpeg, 6}, {nullptr, createLoaderExifDataJpeg, 7}, {nullptr, createLoaderExifDataJpeg, 8}, {"image/x-panasonic-rw2", createLoaderExifDataJpeg, 9}, {nullptr, createLoaderExifDataJpeg, 10}, {nullptr, createLoaderExifDataJpeg, 11}, {nullptr, createLoaderTiff, 0}, {nullptr, createLoaderTiff, 1}, {nullptr, createLoaderTiff, 2}, {nullptr, createLoaderTiff, 3}, {nullptr, createLoaderTiff, 4}, {nullptr, createLoaderTiff, 5}, {nullptr, createLoaderTiff, 6}, {"image/x-canon-cr2", createLoaderTiff, 7}, {nullptr, createLoaderExifJpeg, 0}, {nullptr, createLoaderExifJpeg, 1}, {nullptr, createLoaderExifJpeg, 2}, {nullptr, createLoaderExifJpeg, 3}, {nullptr, createLoaderExifJpeg, 4}, {nullptr, createLoaderExifJpeg, 5}, {nullptr, createLoaderExifJpeg, 6}, {"image/x-canon-cr2", createLoaderExifJpeg, 7}, {nullptr, createLoaderExifJpeg, 8}, {nullptr, createLoaderXmpJpeg, 0}}; const LoaderExifJpeg::Param LoaderExifJpeg::param_[] = { {"Exif.Image.JPEGInterchangeFormat", "Exif.Image.JPEGInterchangeFormatLength", nullptr}, // 0 @@ -368,7 +352,8 @@ namespace return PreviewId(std::size(loaderList_)); } - LoaderNative::LoaderNative(PreviewId id, const Image &image, int parIdx) : Loader(id, image) + LoaderNative::LoaderNative(PreviewId id, const Image &image, int parIdx) + : Loader(id, image) { if (!(0 <= parIdx && static_cast(parIdx) < image.nativePreviews().size())) return; @@ -479,7 +464,8 @@ namespace return true; } - LoaderExifJpeg::LoaderExifJpeg(PreviewId id, const Image &image, int parIdx) : Loader(id, image), offset_(0) + LoaderExifJpeg::LoaderExifJpeg(PreviewId id, const Image &image, int parIdx) + : Loader(id, image), offset_(0) { const ExifData &exifData = image_.exifData(); auto pos = exifData.findKey(ExifKey(param_[parIdx].offsetKey_)); @@ -800,7 +786,8 @@ namespace return {mio.mmap(), mio.size()}; } - LoaderXmpJpeg::LoaderXmpJpeg(PreviewId id, const Image &image, int parIdx) : Loader(id, image) + LoaderXmpJpeg::LoaderXmpJpeg(PreviewId id, const Image &image, int parIdx) + : Loader(id, image) { (void)parIdx; @@ -1079,7 +1066,8 @@ namespace Exiv2 return properties_.id_; } - PreviewManager::PreviewManager(const Image &image) : image_(image) + PreviewManager::PreviewManager(const Image &image) + : image_(image) { } diff --git a/src/private.h b/src/private.h index fcc6e18320..57d92954c1 100644 --- a/src/private.h +++ b/src/private.h @@ -25,7 +25,7 @@ #ifndef lint #ifndef NOID -static char privatehid[] = "@(#)private.h 7.53"; +static char privatehid[] = "@(#)private.h 7.53"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -34,24 +34,24 @@ static char privatehid[] = "@(#)private.h 7.53"; /* ahu: disable warnings */ #ifdef _MSC_VER // disable warning 'uses old-style declarator' C4131 -#pragma warning (disable: 4131) +#pragma warning(disable : 4131) #endif /* ** Nested includes */ -#include "sys/types.h" /* for time_t */ -#include "stdio.h" #include "errno.h" +#include "limits.h" /* for CHAR_BIT */ +#include "stdio.h" +#include "stdlib.h" #include "string.h" -#include "limits.h" /* for CHAR_BIT */ +#include "sys/types.h" /* for time_t */ #include "time.h" -#include "stdlib.h" /* ahu: added io.h for MSVC */ #ifdef _MSC_VER -# include "io.h" +#include "io.h" #endif /* ahu: deleted include libintl.h */ @@ -59,15 +59,15 @@ static char privatehid[] = "@(#)private.h 7.53"; /* ahu: deleted include sys/wait.h and WIFEXITED, WEXITSTATUS macros */ #if EXV_HAVE_UNISTD_H - 0 -#include "unistd.h" /* for F_OK and R_OK */ -#endif /* EXV_HAVE_UNISTD_H - 0 */ +#include "unistd.h" /* for F_OK and R_OK */ +#endif /* EXV_HAVE_UNISTD_H - 0 */ #if !(EXV_HAVE_UNISTD_H - 0) #ifndef F_OK -#define F_OK 0 +#define F_OK 0 #endif /* !defined F_OK */ #ifndef R_OK -#define R_OK 4 +#define R_OK 4 #endif /* !defined R_OK */ #endif /* !(EXV_HAVE_UNISTD_H - 0) */ @@ -84,10 +84,10 @@ static char privatehid[] = "@(#)private.h 7.53"; #ifndef P #ifdef __STDC__ -#define P(x) x +#define P(x) x #endif /* defined __STDC__ */ #ifndef __STDC__ -#define P(x) () +#define P(x) () #endif /* !defined __STDC__ */ #endif /* !defined P */ @@ -96,7 +96,7 @@ static char privatehid[] = "@(#)private.h 7.53"; */ #ifndef EXIT_SUCCESS -#define EXIT_SUCCESS 0 +#define EXIT_SUCCESS 0 #endif /* !defined EXIT_SUCCESS */ /* @@ -104,7 +104,7 @@ static char privatehid[] = "@(#)private.h 7.53"; */ #ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 +#define EXIT_FAILURE 1 #endif /* !defined EXIT_FAILURE */ /* @@ -120,11 +120,11 @@ static char privatehid[] = "@(#)private.h 7.53"; #endif /* !defined MAXPATHLEN */ #ifdef MAXPATHLEN -#define FILENAME_MAX MAXPATHLEN +#define FILENAME_MAX MAXPATHLEN #endif /* defined MAXPATHLEN */ #ifndef MAXPATHLEN -#define FILENAME_MAX 1024 /* Pure guesswork */ -#endif /* !defined MAXPATHLEN */ +#define FILENAME_MAX 1024 /* Pure guesswork */ +#endif /* !defined MAXPATHLEN */ #endif /* !defined FILENAME_MAX */ @@ -139,19 +139,19 @@ static char privatehid[] = "@(#)private.h 7.53"; */ #ifndef TRUE -#define TRUE 1 +#define TRUE 1 #endif /* !defined TRUE */ #ifndef FALSE -#define FALSE 0 +#define FALSE 0 #endif /* !defined FALSE */ #ifndef TYPE_BIT -#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT) +#define TYPE_BIT(type) (sizeof(type) * CHAR_BIT) #endif /* !defined TYPE_BIT */ #ifndef TYPE_SIGNED -#define TYPE_SIGNED(type) (((type) -1) < 0) +#define TYPE_SIGNED(type) (((type)-1) < 0) #endif /* !defined TYPE_SIGNED */ #ifndef INT_STRLEN_MAXIMUM @@ -182,7 +182,7 @@ static char privatehid[] = "@(#)private.h 7.53"; #ifndef INITIALIZE #ifdef GNUC_or_lint -#define INITIALIZE(x) ((x) = 0) +#define INITIALIZE(x) ((x) = 0) #endif /* defined GNUC_or_lint */ #ifndef GNUC_or_lint #define INITIALIZE(x) diff --git a/src/properties.cpp b/src/properties.cpp index 091ced0fb7..d1c6a1daf8 100644 --- a/src/properties.cpp +++ b/src/properties.cpp @@ -1555,18 +1555,30 @@ namespace Exiv2 //! XMP Iptc4xmpCore:Scene // Source: http://cv.iptc.org/newscodes/scene/ constexpr TagVocabulary iptcScene[] = { - {"010100", N_("Headshot")}, {"010200", N_("Half-length")}, - {"010300", N_("Full-length")}, {"010400", N_("Profile")}, - {"010500", N_("rear view")}, {"010600", N_("Single")}, - {"010700", N_("Couple")}, {"010800", N_("Two")}, - {"010900", N_("Group")}, {"011000", N_("General view")}, - {"011100", N_("Panoramic view")}, {"011200", N_("Aerial view")}, - {"011300", N_("Under-water")}, {"011400", N_("Night scene")}, - {"011500", N_("Satellite")}, {"011600", N_("Exterior view")}, - {"011700", N_("Interior view")}, {"011800", N_("Close-up")}, - {"011900", N_("Action")}, {"012000", N_("Performing")}, - {"012100", N_("Posing")}, {"012200", N_("Symbolic")}, - {"012300", N_("Off-beat")}, {"012400", N_("Movie scene")}, + {"010100", N_("Headshot")}, + {"010200", N_("Half-length")}, + {"010300", N_("Full-length")}, + {"010400", N_("Profile")}, + {"010500", N_("rear view")}, + {"010600", N_("Single")}, + {"010700", N_("Couple")}, + {"010800", N_("Two")}, + {"010900", N_("Group")}, + {"011000", N_("General view")}, + {"011100", N_("Panoramic view")}, + {"011200", N_("Aerial view")}, + {"011300", N_("Under-water")}, + {"011400", N_("Night scene")}, + {"011500", N_("Satellite")}, + {"011600", N_("Exterior view")}, + {"011700", N_("Interior view")}, + {"011800", N_("Close-up")}, + {"011900", N_("Action")}, + {"012000", N_("Performing")}, + {"012100", N_("Posing")}, + {"012200", N_("Symbolic")}, + {"012300", N_("Off-beat")}, + {"012400", N_("Movie scene")}, }; //! XMP Iptc4xmpCore:SubjectCode @@ -2980,9 +2992,7 @@ namespace Exiv2 //! XMP iptcExt:DigitalSourcefileType constexpr TagVocabulary iptcExtDigitalSourcefileType[] = { - {"scanfilm", N_("Scan from film")}, {"scantransparency", N_("Scan from transparency (including slide)")}, - {"scanprint", N_("Scan from print")}, {"cameraraw", N_("Camera RAW")}, - {"cameratiff", N_("Camera TIFF")}, {"camerajpeg", N_("Camera JPEG")}}; + {"scanfilm", N_("Scan from film")}, {"scantransparency", N_("Scan from transparency (including slide)")}, {"scanprint", N_("Scan from print")}, {"cameraraw", N_("Camera RAW")}, {"cameratiff", N_("Camera TIFF")}, {"camerajpeg", N_("Camera JPEG")}}; //! XMP iptcExt:DigitalSourceType // Source: http://cv.iptc.org/newscodes/digitalsourcetype/ @@ -3180,8 +3190,7 @@ namespace Exiv2 //! XMP plus:ImageAlterationConstraints constexpr TagVocabulary plusImageAlterationConstraints[] = { - {"AL-CLR", N_("No Colorization")}, {"AL-CRP", N_("No Cropping")}, {"AL-DCL", N_("No De-Colorization")}, - {"AL-FLP", N_("No Flipping")}, {"AL-MRG", N_("No Merging")}, {"AL-RET", N_("No Retouching")}}; + {"AL-CLR", N_("No Colorization")}, {"AL-CRP", N_("No Cropping")}, {"AL-DCL", N_("No De-Colorization")}, {"AL-FLP", N_("No Flipping")}, {"AL-MRG", N_("No Merging")}, {"AL-RET", N_("No Retouching")}}; //! XMP plus:ImageDuplicationConstraints constexpr TagVocabulary plusImageDuplicationConstraints[] = { @@ -3230,11 +3239,7 @@ namespace Exiv2 //! XMP plus:MinorModelAgeDisclosure constexpr TagVocabulary plusMinorModelAgeDisclosure[] = { - {"AG-UNK", N_("Age Unknown")}, {"AG-A25", N_("Age 25 or Over")}, {"AG-A24", N_("Age 24")}, - {"AG-A23", N_("Age 23")}, {"AG-A22", N_("Age 22")}, {"AG-A21", N_("Age 21")}, - {"AG-A20", N_("Age 20")}, {"AG-A19", N_("Age 19")}, {"AG-A18", N_("Age 18")}, - {"AG-A17", N_("Age 17")}, {"AG-A16", N_("Age 16")}, {"AG-A15", N_("Age 15")}, - {"AG-U14", N_("Age 14 or Under")}}; + {"AG-UNK", N_("Age Unknown")}, {"AG-A25", N_("Age 25 or Over")}, {"AG-A24", N_("Age 24")}, {"AG-A23", N_("Age 23")}, {"AG-A22", N_("Age 22")}, {"AG-A21", N_("Age 21")}, {"AG-A20", N_("Age 20")}, {"AG-A19", N_("Age 19")}, {"AG-A18", N_("Age 18")}, {"AG-A17", N_("Age 17")}, {"AG-A16", N_("Age 16")}, {"AG-A15", N_("Age 15")}, {"AG-U14", N_("Age 14 or Under")}}; //! XMP plus:ModelReleaseStatus constexpr TagVocabulary plusModelReleaseStatus[] = {{"MR-NON", N_("None")}, @@ -4901,11 +4906,13 @@ namespace Exiv2 {"Xmp.plus.PropertyReleaseStatus", EXV_PRINT_VOCABULARY(plusPropertyReleaseStatus)}, {"Xmp.plus.Reuse", EXV_PRINT_VOCABULARY(plusReuse)}}; - XmpNsInfo::Ns::Ns(std::string ns) : ns_(std::move(ns)) + XmpNsInfo::Ns::Ns(std::string ns) + : ns_(std::move(ns)) { } - XmpNsInfo::Prefix::Prefix(std::string prefix) : prefix_(std::move(prefix)) + XmpNsInfo::Prefix::Prefix(std::string prefix) + : prefix_(std::move(prefix)) { } @@ -5173,7 +5180,8 @@ namespace Exiv2 prefix_ = prefix; } - XmpKey::XmpKey(const std::string& key) : p_(std::make_unique()) + XmpKey::XmpKey(const std::string& key) + : p_(std::make_unique()) { p_->decomposeKey(key); } @@ -5185,7 +5193,8 @@ namespace Exiv2 XmpKey::~XmpKey() = default; - XmpKey::XmpKey(const XmpKey& rhs) : p_(std::make_unique(*rhs.p_)) + XmpKey::XmpKey(const XmpKey& rhs) + : p_(std::make_unique(*rhs.p_)) { } diff --git a/src/psdimage.cpp b/src/psdimage.cpp index 2990d93228..c447e476ab 100644 --- a/src/psdimage.cpp +++ b/src/psdimage.cpp @@ -33,31 +33,31 @@ struct PhotoshopResourceBlock enum { kPhotoshopResourceID_Photoshop2Info = - 0x03e8, // [obsolete -- Photoshop 2.0 only] General information -- contains five 2-byte values: number of - // channels, rows, columns, depth and mode + 0x03e8, // [obsolete -- Photoshop 2.0 only] General information -- contains five 2-byte values: number of + // channels, rows, columns, depth and mode kPhotoshopResourceID_MacintoshClassicPrintInfo = 0x03e9, // [optional] Macintosh classic print record (120 bytes) kPhotoshopResourceID_MacintoshCarbonPrintInfo = - 0x03ea, // [optional] Macintosh carbon print info (variable-length XML format) - kPhotoshopResourceID_Photoshop2ColorTable = 0x03eb, // [obsolete -- Photoshop 2.0 only] Indexed color table - kPhotoshopResourceID_ResolutionInfo = 0x03ed, // PhotoshopResolutionInfo structure (see below) - kPhotoshopResourceID_AlphaChannelsNames = 0x03ee, // as a series of Pstrings - kPhotoshopResourceID_DisplayInfo = 0x03ef, // see appendix A in Photoshop SDK - kPhotoshopResourceID_PStringCaption = 0x03f0, // [optional] the caption, as a Pstring - kPhotoshopResourceID_BorderInformation = 0x03f1, // border width and units - kPhotoshopResourceID_BackgroundColor = 0x03f2, // see additional Adobe information - kPhotoshopResourceID_PrintFlags = 0x03f3, // labels, crop marks, colour bars, ecc... - kPhotoshopResourceID_BWHalftoningInfo = 0x03f4, // Gray-scale and multich. half-toning info - kPhotoshopResourceID_ColorHalftoningInfo = 0x03f5, // Colour half-toning information - kPhotoshopResourceID_DuotoneHalftoningInfo = 0x03f6, // Duo-tone half-toning information - kPhotoshopResourceID_BWTransferFunc = 0x03f7, // Gray-scale and multich. transfer function - kPhotoshopResourceID_ColorTransferFuncs = 0x03f8, // Colour transfer function - kPhotoshopResourceID_DuotoneTransferFuncs = 0x03f9, // Duo-tone transfer function - kPhotoshopResourceID_DuotoneImageInfo = 0x03fa, // Duo-tone image information - kPhotoshopResourceID_EffectiveBW = 0x03fb, // two bytes for the effective black and white values - kPhotoshopResourceID_ObsoletePhotoshopTag1 = 0x03fc, // [obsolete] - kPhotoshopResourceID_EPSOptions = 0x03fd, // Encapsulated Postscript options - kPhotoshopResourceID_QuickMaskInfo = 0x03fe, // Quick Mask information. 2 bytes containing Quick Mask channel ID, - // 1 byte boolean indicating whether the mask was initially empty. + 0x03ea, // [optional] Macintosh carbon print info (variable-length XML format) + kPhotoshopResourceID_Photoshop2ColorTable = 0x03eb, // [obsolete -- Photoshop 2.0 only] Indexed color table + kPhotoshopResourceID_ResolutionInfo = 0x03ed, // PhotoshopResolutionInfo structure (see below) + kPhotoshopResourceID_AlphaChannelsNames = 0x03ee, // as a series of Pstrings + kPhotoshopResourceID_DisplayInfo = 0x03ef, // see appendix A in Photoshop SDK + kPhotoshopResourceID_PStringCaption = 0x03f0, // [optional] the caption, as a Pstring + kPhotoshopResourceID_BorderInformation = 0x03f1, // border width and units + kPhotoshopResourceID_BackgroundColor = 0x03f2, // see additional Adobe information + kPhotoshopResourceID_PrintFlags = 0x03f3, // labels, crop marks, colour bars, ecc... + kPhotoshopResourceID_BWHalftoningInfo = 0x03f4, // Gray-scale and multich. half-toning info + kPhotoshopResourceID_ColorHalftoningInfo = 0x03f5, // Colour half-toning information + kPhotoshopResourceID_DuotoneHalftoningInfo = 0x03f6, // Duo-tone half-toning information + kPhotoshopResourceID_BWTransferFunc = 0x03f7, // Gray-scale and multich. transfer function + kPhotoshopResourceID_ColorTransferFuncs = 0x03f8, // Colour transfer function + kPhotoshopResourceID_DuotoneTransferFuncs = 0x03f9, // Duo-tone transfer function + kPhotoshopResourceID_DuotoneImageInfo = 0x03fa, // Duo-tone image information + kPhotoshopResourceID_EffectiveBW = 0x03fb, // two bytes for the effective black and white values + kPhotoshopResourceID_ObsoletePhotoshopTag1 = 0x03fc, // [obsolete] + kPhotoshopResourceID_EPSOptions = 0x03fd, // Encapsulated Postscript options + kPhotoshopResourceID_QuickMaskInfo = 0x03fe, // Quick Mask information. 2 bytes containing Quick Mask channel ID, + // 1 byte boolean indicating whether the mask was initially empty. kPhotoshopResourceID_ObsoletePhotoshopTag2 = 0x03ff, // [obsolete] kPhotoshopResourceID_LayerStateInfo = 0x0400, // index of target layer (0 means bottom) kPhotoshopResourceID_WorkingPathInfo = 0x0401, // should not be saved to the file @@ -91,7 +91,7 @@ enum kPhotoshopResourceID_VersionInfo = 0x0421, // [Photoshop 6.0 and later] see additional Adobe info kPhotoshopResourceID_ExifInfo = 0x0422, // [Photoshop 7.0?] Exif metadata kPhotoshopResourceID_XMPPacket = - 0x0424, // [Photoshop 7.0?] XMP packet -- see http://www.adobe.com/devnet/xmp/pdfs/xmp_specification.pdf + 0x0424, // [Photoshop 7.0?] XMP packet -- see http://www.adobe.com/devnet/xmp/pdfs/xmp_specification.pdf kPhotoshopResourceID_ClippingPathName = 0x0bb7, // [Photoshop 6.0 and later] name of clipping path kPhotoshopResourceID_MorePrintFlags = 0x2710 // [Photoshop 6.0 and later] Print flags information. 2 bytes version (=1), 1 byte center crop marks, 1 @@ -102,7 +102,8 @@ enum // class member definitions namespace Exiv2 { - PsdImage::PsdImage(BasicIo::UniquePtr io) : Image(ImageType::psd, mdExif | mdIptc | mdXmp, std::move(io)) + PsdImage::PsdImage(BasicIo::UniquePtr io) + : Image(ImageType::psd, mdExif | mdIptc | mdXmp, std::move(io)) { } // PsdImage::PsdImage diff --git a/src/rw2image.cpp b/src/rw2image.cpp index 5134fc722a..c47d089852 100644 --- a/src/rw2image.cpp +++ b/src/rw2image.cpp @@ -24,7 +24,8 @@ namespace Exiv2 { using namespace Internal; - Rw2Image::Rw2Image(BasicIo::UniquePtr io) : Image(ImageType::rw2, mdExif | mdIptc | mdXmp, std::move(io)) + Rw2Image::Rw2Image(BasicIo::UniquePtr io) + : Image(ImageType::rw2, mdExif | mdIptc | mdXmp, std::move(io)) { } // Rw2Image::Rw2Image diff --git a/src/rw2image_int.cpp b/src/rw2image_int.cpp index 27a9b0ba15..8cfd7f7d41 100644 --- a/src/rw2image_int.cpp +++ b/src/rw2image_int.cpp @@ -4,7 +4,8 @@ namespace Exiv2::Internal { - Rw2Header::Rw2Header() : TiffHeaderBase(0x0055, 24, littleEndian, 0x00000018) + Rw2Header::Rw2Header() + : TiffHeaderBase(0x0055, 24, littleEndian, 0x00000018) { } diff --git a/src/samsungmn_int.cpp b/src/samsungmn_int.cpp index b8a4dc9a5b..622c3ea57b 100644 --- a/src/samsungmn_int.cpp +++ b/src/samsungmn_int.cpp @@ -143,10 +143,7 @@ namespace Exiv2::Internal } //! PictureWizard Mode - constexpr TagDetails samsungPwMode[] = {{0, N_("Standard")}, {1, N_("Vivid")}, {2, N_("Portrait")}, - {3, N_("Landscape")}, {4, N_("Forest")}, {5, N_("Retro")}, - {6, N_("Cool")}, {7, N_("Calm")}, {8, N_("Classic")}, - {9, N_("Custom1")}, {10, N_("Custom2")}, {11, N_("Custom3")}}; + constexpr TagDetails samsungPwMode[] = {{0, N_("Standard")}, {1, N_("Vivid")}, {2, N_("Portrait")}, {3, N_("Landscape")}, {4, N_("Forest")}, {5, N_("Retro")}, {6, N_("Cool")}, {7, N_("Calm")}, {8, N_("Classic")}, {9, N_("Custom1")}, {10, N_("Custom2")}, {11, N_("Custom3")}}; //! Print the PictureWizard Color tag value std::ostream& printPwColor(std::ostream& os, const Value& value, const ExifData*) diff --git a/src/sonymn_int.cpp b/src/sonymn_int.cpp index 4cc485dbc9..0aefbe8bce 100644 --- a/src/sonymn_int.cpp +++ b/src/sonymn_int.cpp @@ -19,8 +19,7 @@ namespace Exiv2::Internal // -- Standard Sony Makernotes tags --------------------------------------------------------------- //! Lookup table to translate Sony Auto HDR values to readable labels - constexpr TagDetails sonyHDRMode[] = {{0x00000, N_("Off")}, {0x10001, N_("Auto")}, {0x10010, "1"}, {0x10012, "2"}, - {0x10014, "3"}, {0x10016, "4"}, {0x10018, "5"}}; + constexpr TagDetails sonyHDRMode[] = {{0x00000, N_("Off")}, {0x10001, N_("Auto")}, {0x10010, "1"}, {0x10012, "2"}, {0x10014, "3"}, {0x10016, "4"}, {0x10018, "5"}}; //! Lookup table to translate Sony model ID values to readable labels constexpr TagDetails sonyModelId[] = {{2, "DSC-R1"}, @@ -173,9 +172,7 @@ namespace Exiv2::Internal constexpr TagDetails sonyFocusMode[] = {{1, "AF-S"}, {2, "AF-C"}, {4, N_("Permanent-AF")}, {65535, N_("n/a")}}; //! Lookup table to translate Sony AF mode values to readable labels - constexpr TagDetails sonyAFMode[] = {{0, N_("Default")}, {1, N_("Multi AF")}, {2, N_("Center AF")}, - {3, N_("Spot AF")}, {4, N_("Flexible Spot AF")}, {6, N_("Touch AF")}, - {14, N_("Manual Focus")}, {15, N_("Face Detected")}, {65535, N_("n/a")}}; + constexpr TagDetails sonyAFMode[] = {{0, N_("Default")}, {1, N_("Multi AF")}, {2, N_("Center AF")}, {3, N_("Spot AF")}, {4, N_("Flexible Spot AF")}, {6, N_("Touch AF")}, {14, N_("Manual Focus")}, {15, N_("Face Detected")}, {65535, N_("n/a")}}; //! Lookup table to translate Sony AF illuminator values to readable labels constexpr TagDetails sonyAFIlluminator[] = {{0, N_("Off")}, {1, N_("Auto")}, {65535, N_("n/a")}}; @@ -399,11 +396,7 @@ namespace Exiv2::Internal //! Lookup table to translate Sony camera settings creative style values to readable labels constexpr TagDetails sonyCreativeStyle[] = { - {1, N_("Standard")}, {2, N_("Vivid")}, {3, N_("Portrait")}, - {4, N_("Landscape")}, {5, N_("Sunset")}, {6, N_("Night View/Portrait")}, - {8, N_("Black & White")}, {9, N_("Adobe RGB")}, {11, N_("Neutral")}, - {12, N_("Clear")}, {13, N_("Deep")}, {14, N_("Light")}, - {15, N_("Autumn")}, {16, N_("Sepia")}}; + {1, N_("Standard")}, {2, N_("Vivid")}, {3, N_("Portrait")}, {4, N_("Landscape")}, {5, N_("Sunset")}, {6, N_("Night View/Portrait")}, {8, N_("Black & White")}, {9, N_("Adobe RGB")}, {11, N_("Neutral")}, {12, N_("Clear")}, {13, N_("Deep")}, {14, N_("Light")}, {15, N_("Autumn")}, {16, N_("Sepia")}}; //! Lookup table to translate Sony camera settings flash mode values to readable labels constexpr TagDetails sonyFlashMode[] = { @@ -416,11 +409,7 @@ namespace Exiv2::Internal //! Lookup table to translate Sony camera settings image style values to readable labels constexpr TagDetails sonyImageStyle[] = { - {1, N_("Standard")}, {2, N_("Vivid")}, {3, N_("Portrait")}, - {4, N_("Landscape")}, {5, N_("Sunset")}, {7, N_("Night View/Portrait")}, - {8, N_("B&W")}, {9, N_("Adobe RGB")}, {11, N_("Neutral")}, - {129, N_("StyleBox1")}, {130, N_("StyleBox2")}, {131, N_("StyleBox3")}, - {132, N_("StyleBox4")}, {133, N_("StyleBox5")}, {134, N_("StyleBox6")}}; + {1, N_("Standard")}, {2, N_("Vivid")}, {3, N_("Portrait")}, {4, N_("Landscape")}, {5, N_("Sunset")}, {7, N_("Night View/Portrait")}, {8, N_("B&W")}, {9, N_("Adobe RGB")}, {11, N_("Neutral")}, {129, N_("StyleBox1")}, {130, N_("StyleBox2")}, {131, N_("StyleBox3")}, {132, N_("StyleBox4")}, {133, N_("StyleBox5")}, {134, N_("StyleBox6")}}; //! Lookup table to translate Sony camera settings exposure program values to readable labels constexpr TagDetails sonyExposureProgram[] = {{0, N_("Auto")}, @@ -818,9 +807,7 @@ namespace Exiv2::Internal {200, N_("Continuous - Sweep Panorama")}}; //! Lookup table to translate Sony camera SonyMisc3c sequence length 2 values to readable labels - constexpr TagDetails sonyMisc3cSequenceLength2[] = {{0, N_("Continuous")}, {1, N_("1 file")}, {2, N_("2 files")}, - {3, N_("3 files")}, {5, N_("5 files")}, {7, N_("7 files")}, - {9, N_("9 files")}, {10, N_("10 files")}}; + constexpr TagDetails sonyMisc3cSequenceLength2[] = {{0, N_("Continuous")}, {1, N_("1 file")}, {2, N_("2 files")}, {3, N_("3 files")}, {5, N_("5 files")}, {7, N_("7 files")}, {9, N_("9 files")}, {10, N_("10 files")}}; //! Lookup table to translate Sony camera SonyMisc3c, camera orientation values to readable labels constexpr TagDetails sonyMisc3cCameraOrientation[] = { @@ -873,11 +860,39 @@ namespace Exiv2::Internal // Models that support this tag static constexpr auto models = std::array{ - "ILCA-68", "ILCA-77M2", "ILCA-99M2", "ILCE-5000", "ILCE-5100", "ILCE-6000", "ILCE-6300", - "ILCE-6500", "ILCE-7", "ILCE-7M2", "ILCE-7R", "ILCE-7RM2", "ILCE-7S", "ILCE-7SM2", - "ILCE-QX1", "DSC-HX350", "DSC-HX400V", "DSC-HX60V", "DSC-HX80", "DSC-HX90", "DSC-HX90V", - "DSC-QX30", "DSC-RX0", "DSC-RX1RM2", "DSC-RX10", "DSC-RX10M2", "DSC-RX10M3", "DSC-RX100M3", - "DSC-RX100M4", "DSC-RX100M5", "DSC-WX220", "DSC-WX350", "DSC-WX500", + "ILCA-68", + "ILCA-77M2", + "ILCA-99M2", + "ILCE-5000", + "ILCE-5100", + "ILCE-6000", + "ILCE-6300", + "ILCE-6500", + "ILCE-7", + "ILCE-7M2", + "ILCE-7R", + "ILCE-7RM2", + "ILCE-7S", + "ILCE-7SM2", + "ILCE-QX1", + "DSC-HX350", + "DSC-HX400V", + "DSC-HX60V", + "DSC-HX80", + "DSC-HX90", + "DSC-HX90V", + "DSC-QX30", + "DSC-RX0", + "DSC-RX1RM2", + "DSC-RX10", + "DSC-RX10M2", + "DSC-RX10M3", + "DSC-RX100M3", + "DSC-RX100M4", + "DSC-RX100M5", + "DSC-WX220", + "DSC-WX350", + "DSC-WX500", }; std::string model = pos->toString(); diff --git a/src/tags.cpp b/src/tags.cpp index 85470f2424..41c0dbc312 100644 --- a/src/tags.cpp +++ b/src/tags.cpp @@ -57,8 +57,8 @@ namespace Exiv2::Internal } // Unknown Tag - static const TagInfo unknownTag{0xffff, "Unknown tag", N_("Unknown tag"), N_("Unknown tag"), - ifdIdNotSet, sectionIdNotSet, asciiString, -1, + static const TagInfo unknownTag{0xffff, "Unknown tag", N_("Unknown tag"), N_("Unknown tag"), + ifdIdNotSet, sectionIdNotSet, asciiString, -1, printValue}; } // namespace Exiv2::Internal @@ -66,7 +66,8 @@ namespace Exiv2::Internal namespace Exiv2 { //! @cond IGNORE - GroupInfo::GroupName::GroupName(std::string groupName) : g_(std::move(groupName)) + GroupInfo::GroupName::GroupName(std::string groupName) + : g_(std::move(groupName)) { } //! @endcond @@ -261,7 +262,8 @@ namespace Exiv2 key_ = std::string(familyName_) + "." + groupName_ + "." + tagName(); } - ExifKey::ExifKey(uint16_t tag, const std::string& groupName) : p_(std::make_unique()) + ExifKey::ExifKey(uint16_t tag, const std::string& groupName) + : p_(std::make_unique()) { IfdId ifdId = groupId(groupName); // Todo: Test if this condition can be removed @@ -276,7 +278,8 @@ namespace Exiv2 p_->makeKey(tag, ifdId, ti); } - ExifKey::ExifKey(const TagInfo& ti) : p_(std::make_unique()) + ExifKey::ExifKey(const TagInfo& ti) + : p_(std::make_unique()) { auto ifdId = static_cast(ti.ifdId_); if (!Internal::isExifIfd(ifdId) && !Internal::isMakerIfd(ifdId)) { @@ -286,12 +289,14 @@ namespace Exiv2 p_->makeKey(ti.tag_, ifdId, &ti); } - ExifKey::ExifKey(const std::string& key) : p_(std::make_unique()) + ExifKey::ExifKey(const std::string& key) + : p_(std::make_unique()) { p_->decomposeKey(key); } - ExifKey::ExifKey(const ExifKey& rhs) : p_(std::make_unique(*rhs.p_)) + ExifKey::ExifKey(const ExifKey& rhs) + : p_(std::make_unique(*rhs.p_)) { } diff --git a/src/tags_int.cpp b/src/tags_int.cpp index 3c1c2307b4..a86e65f4ec 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -174,9 +174,7 @@ namespace Exiv2::Internal //! Orientation, tag 0x0112 constexpr TagDetails exifOrientation[] = { - {1, N_("top, left")}, {2, N_("top, right")}, {3, N_("bottom, right")}, - {4, N_("bottom, left")}, {5, N_("left, top")}, {6, N_("right, top")}, - {7, N_("right, bottom")}, {8, N_("left, bottom")}, {8, N_("left, bottom")} // To silence compiler warning + {1, N_("top, left")}, {2, N_("top, right")}, {3, N_("bottom, right")}, {4, N_("bottom, left")}, {5, N_("left, top")}, {6, N_("right, top")}, {7, N_("right, bottom")}, {8, N_("left, bottom")}, {8, N_("left, bottom")} // To silence compiler warning }; //! PlanarConfiguration, tag 0x011c @@ -292,8 +290,7 @@ namespace Exiv2::Internal //! exifJpegLosslessPredictor, tag 0x0205 constexpr TagDetails exifJpegLosslessPredictor[] = { - {1, N_("A")}, {2, N_("B")}, {3, N_("C")}, {4, N_("A+B-C")}, - {5, N_("A+((B-C)/2)")}, {6, N_("B+((A-C)/2)")}, {7, N_("(A+B)/2")}}; + {1, N_("A")}, {2, N_("B")}, {3, N_("C")}, {4, N_("A+B-C")}, {5, N_("A+((B-C)/2)")}, {6, N_("B+((A-C)/2)")}, {7, N_("(A+B)/2")}}; //! LightSource, tag 0x9208 constexpr TagDetails exifLightSource[] = {{0, N_("Unknown")}, @@ -353,9 +350,7 @@ namespace Exiv2::Internal //! SensingMethod, TIFF/EP tag 0x9217 constexpr TagDetails tiffSensingMethod[] = { - {0, N_("Undefined")}, {1, N_("Monochrome area")}, {2, N_("One-chip color area")}, - {3, N_("Two-chip color area")}, {4, N_("Three-chip color area")}, {5, N_("Color sequential area")}, - {6, N_("Monochrome linear")}, {7, N_("Trilinear sensor")}, {8, N_("Color sequential linear")}}; + {0, N_("Undefined")}, {1, N_("Monochrome area")}, {2, N_("One-chip color area")}, {3, N_("Two-chip color area")}, {4, N_("Three-chip color area")}, {5, N_("Color sequential area")}, {6, N_("Monochrome linear")}, {7, N_("Trilinear sensor")}, {8, N_("Color sequential linear")}}; //! CFALayout, DNG tag 0xc617 constexpr TagDetails dngCfaLayout[] = { @@ -2772,9 +2767,7 @@ namespace Exiv2::Internal //! ExposureProgram, tag 0x8822 constexpr TagDetails exifExposureProgram[] = { - {0, N_("Not defined")}, {1, N_("Manual")}, {2, N_("Auto")}, - {3, N_("Aperture priority")}, {4, N_("Shutter priority")}, {5, N_("Creative program")}, - {6, N_("Action program")}, {7, N_("Portrait mode")}, {8, N_("Landscape mode")}}; + {0, N_("Not defined")}, {1, N_("Manual")}, {2, N_("Auto")}, {3, N_("Aperture priority")}, {4, N_("Shutter priority")}, {5, N_("Creative program")}, {6, N_("Action program")}, {7, N_("Portrait mode")}, {8, N_("Landscape mode")}}; std::ostream& print0x8822(std::ostream& os, const Value& value, const ExifData* metadata) { @@ -2890,9 +2883,7 @@ namespace Exiv2::Internal //! MeteringMode, tag 0x9207 constexpr TagDetails exifMeteringMode[] = { - {0, N_("Unknown")}, {1, N_("Average")}, {2, N_("Center weighted average")}, - {3, N_("Spot")}, {4, N_("Multi-spot")}, {5, N_("Multi-segment")}, - {6, N_("Partial")}, {255, N_("Other")}, {255, N_("Other")} // To silence compiler warning + {0, N_("Unknown")}, {1, N_("Average")}, {2, N_("Center weighted average")}, {3, N_("Spot")}, {4, N_("Multi-spot")}, {5, N_("Multi-segment")}, {6, N_("Partial")}, {255, N_("Other")}, {255, N_("Other")} // To silence compiler warning }; std::ostream& print0x9207(std::ostream& os, const Value& value, const ExifData* metadata) diff --git a/src/tgaimage.cpp b/src/tgaimage.cpp index eea0efc5c4..3511d140ad 100644 --- a/src/tgaimage.cpp +++ b/src/tgaimage.cpp @@ -15,7 +15,8 @@ // class member definitions namespace Exiv2 { - TgaImage::TgaImage(BasicIo::UniquePtr io) : Image(ImageType::tga, mdNone, std::move(io)) + TgaImage::TgaImage(BasicIo::UniquePtr io) + : Image(ImageType::tga, mdNone, std::move(io)) { } diff --git a/src/tiffcomposite_int.cpp b/src/tiffcomposite_int.cpp index 382974d91c..6d6be9b402 100644 --- a/src/tiffcomposite_int.cpp +++ b/src/tiffcomposite_int.cpp @@ -64,7 +64,8 @@ namespace Exiv2::Internal pow_->setTarget(OffsetWriter::OffsetId(id), static_cast(target)); } - TiffComponent::TiffComponent(uint16_t tag, IfdId group) : tag_(tag), group_(group) + TiffComponent::TiffComponent(uint16_t tag, IfdId group) + : tag_(tag), group_(group) { } @@ -166,11 +167,13 @@ namespace Exiv2::Internal { } - TiffDirectory::TiffDirectory(const TiffDirectory& rhs) : TiffComponent(rhs), hasNext_(rhs.hasNext_) + TiffDirectory::TiffDirectory(const TiffDirectory& rhs) + : TiffComponent(rhs), hasNext_(rhs.hasNext_) { } - TiffSubIfd::TiffSubIfd(const TiffSubIfd& rhs) : TiffEntryBase(rhs), newGroup_(rhs.newGroup_) + TiffSubIfd::TiffSubIfd(const TiffSubIfd& rhs) + : TiffEntryBase(rhs), newGroup_(rhs.newGroup_) { } diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index 6b9e605439..773a3092d9 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -68,7 +68,8 @@ namespace Exiv2 //! @name Creators //@{ //! Constructor - TiffPathItem(uint32_t extendedTag, IfdId group) : extendedTag_(extendedTag), group_(group) + TiffPathItem(uint32_t extendedTag, IfdId group) + : extendedTag_(extendedTag), group_(group) { } //@} @@ -384,7 +385,8 @@ namespace Exiv2 struct TiffMappingInfo::Key { //! Constructor - Key(std::string m, uint32_t e, IfdId g) : m_(std::move(m)), e_(e), g_(g) + Key(std::string m, uint32_t e, IfdId g) + : m_(std::move(m)), e_(e), g_(g) { } std::string m_; //!< Camera make @@ -599,7 +601,8 @@ namespace Exiv2 //! @name Creators //@{ //! Constructor - TiffEntry(uint16_t tag, IfdId group) : TiffEntryBase(tag, group) + TiffEntry(uint16_t tag, IfdId group) + : TiffEntryBase(tag, group) { } //! Virtual destructor. @@ -881,7 +884,8 @@ namespace Exiv2 //! @name Creators //@{ //! Default constructor - TiffDirectory(uint16_t tag, IfdId group, bool hasNext = true) : TiffComponent(tag, group), hasNext_(hasNext) + TiffDirectory(uint16_t tag, IfdId group, bool hasNext = true) + : TiffComponent(tag, group), hasNext_(hasNext) { } //! Virtual destructor diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index b0ad3b8da0..62f83e2914 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -85,9 +85,15 @@ namespace Exiv2 return primaryGroup_; static constexpr auto keys = std::array{ - "Exif.Image.NewSubfileType", "Exif.SubImage1.NewSubfileType", "Exif.SubImage2.NewSubfileType", - "Exif.SubImage3.NewSubfileType", "Exif.SubImage4.NewSubfileType", "Exif.SubImage5.NewSubfileType", - "Exif.SubImage6.NewSubfileType", "Exif.SubImage7.NewSubfileType", "Exif.SubImage8.NewSubfileType", + "Exif.Image.NewSubfileType", + "Exif.SubImage1.NewSubfileType", + "Exif.SubImage2.NewSubfileType", + "Exif.SubImage3.NewSubfileType", + "Exif.SubImage4.NewSubfileType", + "Exif.SubImage5.NewSubfileType", + "Exif.SubImage6.NewSubfileType", + "Exif.SubImage7.NewSubfileType", + "Exif.SubImage8.NewSubfileType", "Exif.SubImage9.NewSubfileType", }; // Find the group of the primary image, default to "Image" diff --git a/src/tiffimage_int.cpp b/src/tiffimage_int.cpp index 853f485c05..b7d1dc9bd7 100644 --- a/src/tiffimage_int.cpp +++ b/src/tiffimage_int.cpp @@ -235,10 +235,18 @@ namespace Exiv2::Internal //! Nikon Picture Control binary array - definition constexpr ArrayDef nikonPcDef[] = { {0, ttUndefined, 4}, // Version - {4, ttAsciiString, 20}, {24, ttAsciiString, 20}, {48, ttUnsignedByte, 1}, - {49, ttUnsignedByte, 1}, {50, ttUnsignedByte, 1}, {51, ttUnsignedByte, 1}, - {52, ttUnsignedByte, 1}, {53, ttUnsignedByte, 1}, {54, ttUnsignedByte, 1}, - {55, ttUnsignedByte, 1}, {56, ttUnsignedByte, 1}, {57, ttUnsignedByte, 1} // The array contains 58 bytes + {4, ttAsciiString, 20}, + {24, ttAsciiString, 20}, + {48, ttUnsignedByte, 1}, + {49, ttUnsignedByte, 1}, + {50, ttUnsignedByte, 1}, + {51, ttUnsignedByte, 1}, + {52, ttUnsignedByte, 1}, + {53, ttUnsignedByte, 1}, + {54, ttUnsignedByte, 1}, + {55, ttUnsignedByte, 1}, + {56, ttUnsignedByte, 1}, + {57, ttUnsignedByte, 1} // The array contains 58 bytes }; //! Nikon World Time binary array - configuration @@ -741,9 +749,12 @@ namespace Exiv2::Internal }; //! Nikon Color Balance configurations and definitions constexpr ArraySet nikonCbSet[] = { - {nikonCb1Cfg, nikonCb1Def, std::size(nikonCb1Def)}, {nikonCb2Cfg, nikonCb2Def, std::size(nikonCb2Def)}, - {nikonCb2aCfg, nikonCb2aDef, std::size(nikonCb2aDef)}, {nikonCb2bCfg, nikonCb2bDef, std::size(nikonCb2bDef)}, - {nikonCb3Cfg, nikonCb3Def, std::size(nikonCb3Def)}, {nikonCb4Cfg, nikonCb4Def, std::size(nikonCb4Def)}, + {nikonCb1Cfg, nikonCb1Def, std::size(nikonCb1Def)}, + {nikonCb2Cfg, nikonCb2Def, std::size(nikonCb2Def)}, + {nikonCb2aCfg, nikonCb2aDef, std::size(nikonCb2aDef)}, + {nikonCb2bCfg, nikonCb2bDef, std::size(nikonCb2bDef)}, + {nikonCb3Cfg, nikonCb3Def, std::size(nikonCb3Def)}, + {nikonCb4Cfg, nikonCb4Def, std::size(nikonCb4Def)}, }; //! Minolta Camera Settings (old) binary array - configuration @@ -1948,8 +1959,19 @@ namespace Exiv2::Internal return; static constexpr auto imageGroups = std::array{ - ifd0Id, ifd1Id, ifd2Id, ifd3Id, subImage1Id, subImage2Id, subImage3Id, - subImage4Id, subImage5Id, subImage6Id, subImage7Id, subImage8Id, subImage9Id, + ifd0Id, + ifd1Id, + ifd2Id, + ifd3Id, + subImage1Id, + subImage2Id, + subImage3Id, + subImage4Id, + subImage5Id, + subImage6Id, + subImage7Id, + subImage8Id, + subImage9Id, }; for (auto&& imageGroup : imageGroups) { diff --git a/src/tiffimage_int.hpp b/src/tiffimage_int.hpp index 5564343cae..c5caaa4da2 100644 --- a/src/tiffimage_int.hpp +++ b/src/tiffimage_int.hpp @@ -141,7 +141,8 @@ namespace Exiv2::Internal struct Key { //! Constructor - Key(uint16_t t, IfdId g) : t_(t), g_(g) + Key(uint16_t t, IfdId g) + : t_(t), g_(g) { } uint16_t t_; //!< %Tag @@ -169,7 +170,8 @@ namespace Exiv2::Internal struct Key { //! Constructor - Key(uint32_t e, IfdId g) : e_(e), g_(g) + Key(uint32_t e, IfdId g) + : e_(e), g_(g) { } uint32_t e_; //!< Extended tag @@ -215,7 +217,8 @@ namespace Exiv2::Internal struct TiffTreeStruct::Key { //! Constructor - Key(uint32_t r, IfdId g) : r_(r), g_(g) + Key(uint32_t r, IfdId g) + : r_(r), g_(g) { } uint32_t r_; //!< Root @@ -405,11 +408,13 @@ namespace Exiv2::Internal struct OffsetData { //! Default constructor - OffsetData() : origin_(0), byteOrder_(littleEndian) + OffsetData() + : origin_(0), byteOrder_(littleEndian) { } //! Constructor - OffsetData(uint32_t origin, ByteOrder byteOrder) : origin_(origin), byteOrder_(byteOrder) + OffsetData(uint32_t origin, ByteOrder byteOrder) + : origin_(origin), byteOrder_(byteOrder) { } // DATA @@ -431,7 +436,8 @@ namespace Exiv2::Internal { public: //! Constructor, initializes the object with the IfdId to look for. - explicit FindExifdatum(Exiv2::Internal::IfdId ifdId) : ifdId_(ifdId) + explicit FindExifdatum(Exiv2::Internal::IfdId ifdId) + : ifdId_(ifdId) { } //! Returns true if IFD id matches. diff --git a/src/tiffvisitor_int.cpp b/src/tiffvisitor_int.cpp index 6ab12abf77..0aa3e00d3a 100644 --- a/src/tiffvisitor_int.cpp +++ b/src/tiffvisitor_int.cpp @@ -24,7 +24,8 @@ namespace { public: //! Constructor, initializes the object with the group and index to look for. - FindExifdatum2(Exiv2::Internal::IfdId group, int idx) : groupName_(Exiv2::Internal::groupName(group)), idx_(idx) + FindExifdatum2(Exiv2::Internal::IfdId group, int idx) + : groupName_(Exiv2::Internal::groupName(group)), idx_(idx) { } //! Returns true if group and index match. @@ -497,7 +498,8 @@ namespace Exiv2::Internal const DecoderFct decoderFct = findDecoderFct_(make_, object->tag(), object->group()); // skip decoding if decoderFct == 0 if (decoderFct) { - EXV_CALL_MEMBER_FN(*this, decoderFct)(object); + EXV_CALL_MEMBER_FN(*this, decoderFct) + (object); } } // TiffDecoder::decodeTiffEntry @@ -862,7 +864,8 @@ namespace Exiv2::Internal const EncoderFct fct = findEncoderFct_(make_, object->tag(), object->group()); if (fct) { // If an encoding function is registered for the tag, use it - EXV_CALL_MEMBER_FN(*this, fct)(object, ed); + EXV_CALL_MEMBER_FN(*this, fct) + (object, ed); } else { // Else use the encode function at the object (results in a double-dispatch // to the appropriate encoding function of the encoder. diff --git a/src/tiffvisitor_int.hpp b/src/tiffvisitor_int.hpp index f63a787299..82f866b298 100644 --- a/src/tiffvisitor_int.hpp +++ b/src/tiffvisitor_int.hpp @@ -139,7 +139,8 @@ namespace Exiv2 //! @name Creators //@{ //! Constructor, taking \em tag and \em group of the component to find. - TiffFinder(uint16_t tag, IfdId group) : tag_(tag), group_(group) + TiffFinder(uint16_t tag, IfdId group) + : tag_(tag), group_(group) { } //! Virtual destructor @@ -548,7 +549,8 @@ namespace Exiv2 //! @name Creators //@{ //! Constructor. - TiffRwState(ByteOrder byteOrder, uint32_t baseOffset) : byteOrder_(byteOrder), baseOffset_(baseOffset) + TiffRwState(ByteOrder byteOrder, uint32_t baseOffset) + : byteOrder_(byteOrder), baseOffset_(baseOffset) { } //@} diff --git a/src/types.cpp b/src/types.cpp index 19bc27c43d..ece5889a47 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -98,11 +98,13 @@ namespace Exiv2 return tit->size_; } - DataBuf::DataBuf(size_t size) : pData_(size) + DataBuf::DataBuf(size_t size) + : pData_(size) { } - DataBuf::DataBuf(const byte* pData, size_t size) : pData_(size) + DataBuf::DataBuf(const byte* pData, size_t size) + : pData_(size) { std::copy_n(pData, size, pData_.begin()); } diff --git a/src/tzfile.h b/src/tzfile.h index b19de406df..d4883e0137 100644 --- a/src/tzfile.h +++ b/src/tzfile.h @@ -25,7 +25,7 @@ #ifndef lint #ifndef NOID -static char tzfilehid[] = "@(#)tzfile.h 7.14"; +static char tzfilehid[] = "@(#)tzfile.h 7.14"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -34,32 +34,33 @@ static char tzfilehid[] = "@(#)tzfile.h 7.14"; */ #ifndef TZDIR -#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ -#endif /* !defined TZDIR */ +#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ +#endif /* !defined TZDIR */ #ifndef TZDEFAULT -#define TZDEFAULT "localtime" +#define TZDEFAULT "localtime" #endif /* !defined TZDEFAULT */ #ifndef TZDEFRULES -#define TZDEFRULES "posixrules" +#define TZDEFRULES "posixrules" #endif /* !defined TZDEFRULES */ /* ** Each file begins with. . . */ -#define TZ_MAGIC "TZif" - -struct tzhead { - char tzh_magic[4]; /* TZ_MAGIC */ - char tzh_reserved[16]; /* reserved for future use */ - char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ - char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ - char tzh_leapcnt[4]; /* coded number of leap seconds */ - char tzh_timecnt[4]; /* coded number of transition times */ - char tzh_typecnt[4]; /* coded number of local time types */ - char tzh_charcnt[4]; /* coded number of abbr. chars */ +#define TZ_MAGIC "TZif" + +struct tzhead +{ + char tzh_magic[4]; /* TZ_MAGIC */ + char tzh_reserved[16]; /* reserved for future use */ + char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */ + char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ + char tzh_leapcnt[4]; /* coded number of leap seconds */ + char tzh_timecnt[4]; /* coded number of transition times */ + char tzh_typecnt[4]; /* coded number of local time types */ + char tzh_charcnt[4]; /* coded number of abbr. chars */ }; /* @@ -99,66 +100,66 @@ struct tzhead { ** 138 years of Pacific Presidential Election time ** (where there are three time zone transitions every fourth year). */ -#define TZ_MAX_TIMES 370 +#define TZ_MAX_TIMES 370 #endif /* !defined TZ_MAX_TIMES */ #ifndef TZ_MAX_TYPES #ifndef NOSOLAR -#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ -#endif /* !defined NOSOLAR */ +#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ +#endif /* !defined NOSOLAR */ #ifdef NOSOLAR /* ** Must be at least 14 for Europe/Riga as of Jan 12 1995, ** as noted by Earl Chew . */ -#define TZ_MAX_TYPES 20 /* Maximum number of local time types */ -#endif /* !defined NOSOLAR */ -#endif /* !defined TZ_MAX_TYPES */ +#define TZ_MAX_TYPES 20 /* Maximum number of local time types */ +#endif /* !defined NOSOLAR */ +#endif /* !defined TZ_MAX_TYPES */ #ifndef TZ_MAX_CHARS -#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ - /* (limited by what unsigned chars can hold) */ +#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ +/* (limited by what unsigned chars can hold) */ #endif /* !defined TZ_MAX_CHARS */ #ifndef TZ_MAX_LEAPS -#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ -#endif /* !defined TZ_MAX_LEAPS */ - -#define SECSPERMIN 60 -#define MINSPERHOUR 60 -#define HOURSPERDAY 24 -#define DAYSPERWEEK 7 -#define DAYSPERNYEAR 365 -#define DAYSPERLYEAR 366 -#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) -#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) -#define MONSPERYEAR 12 - -#define TM_SUNDAY 0 -#define TM_MONDAY 1 -#define TM_TUESDAY 2 -#define TM_WEDNESDAY 3 -#define TM_THURSDAY 4 -#define TM_FRIDAY 5 -#define TM_SATURDAY 6 - -#define TM_JANUARY 0 -#define TM_FEBRUARY 1 -#define TM_MARCH 2 -#define TM_APRIL 3 -#define TM_MAY 4 -#define TM_JUNE 5 -#define TM_JULY 6 -#define TM_AUGUST 7 -#define TM_SEPTEMBER 8 -#define TM_OCTOBER 9 -#define TM_NOVEMBER 10 -#define TM_DECEMBER 11 - -#define TM_YEAR_BASE 1900 - -#define EPOCH_YEAR 1970 -#define EPOCH_WDAY TM_THURSDAY +#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ +#endif /* !defined TZ_MAX_LEAPS */ + +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define DAYSPERWEEK 7 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#define SECSPERDAY ((long)SECSPERHOUR * HOURSPERDAY) +#define MONSPERYEAR 12 + +#define TM_SUNDAY 0 +#define TM_MONDAY 1 +#define TM_TUESDAY 2 +#define TM_WEDNESDAY 3 +#define TM_THURSDAY 4 +#define TM_FRIDAY 5 +#define TM_SATURDAY 6 + +#define TM_JANUARY 0 +#define TM_FEBRUARY 1 +#define TM_MARCH 2 +#define TM_APRIL 3 +#define TM_MAY 4 +#define TM_JUNE 5 +#define TM_JULY 6 +#define TM_AUGUST 7 +#define TM_SEPTEMBER 8 +#define TM_OCTOBER 9 +#define TM_NOVEMBER 10 +#define TM_DECEMBER 11 + +#define TM_YEAR_BASE 1900 + +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY TM_THURSDAY /* ** Accurate only for the past couple of centuries; @@ -177,15 +178,15 @@ struct tzhead { ** this file. */ -#define SECS_PER_MIN SECSPERMIN -#define MINS_PER_HOUR MINSPERHOUR -#define HOURS_PER_DAY HOURSPERDAY -#define DAYS_PER_WEEK DAYSPERWEEK -#define DAYS_PER_NYEAR DAYSPERNYEAR -#define DAYS_PER_LYEAR DAYSPERLYEAR -#define SECS_PER_HOUR SECSPERHOUR -#define SECS_PER_DAY SECSPERDAY -#define MONS_PER_YEAR MONSPERYEAR +#define SECS_PER_MIN SECSPERMIN +#define MINS_PER_HOUR MINSPERHOUR +#define HOURS_PER_DAY HOURSPERDAY +#define DAYS_PER_WEEK DAYSPERWEEK +#define DAYS_PER_NYEAR DAYSPERNYEAR +#define DAYS_PER_LYEAR DAYSPERLYEAR +#define SECS_PER_HOUR SECSPERHOUR +#define SECS_PER_DAY SECSPERDAY +#define MONS_PER_YEAR MONSPERYEAR #endif /* !defined USG */ diff --git a/src/value.cpp b/src/value.cpp index d227dee754..1a62b976d2 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -17,7 +17,8 @@ // class member definitions namespace Exiv2 { - Value::Value(TypeId typeId) : ok_(true), type_(typeId) + Value::Value(TypeId typeId) + : ok_(true), type_(typeId) { } @@ -119,11 +120,13 @@ namespace Exiv2 return {nullptr, 0}; } - DataValue::DataValue(TypeId typeId) : Value(typeId) + DataValue::DataValue(TypeId typeId) + : Value(typeId) { } - DataValue::DataValue(const byte* buf, size_t len, ByteOrder byteOrder, TypeId typeId) : Value(typeId) + DataValue::DataValue(const byte* buf, size_t len, ByteOrder byteOrder, TypeId typeId) + : Value(typeId) { read(buf, len, byteOrder); } @@ -214,11 +217,13 @@ namespace Exiv2 return {value_.at(n), 1}; } - StringValueBase::StringValueBase(TypeId typeId) : Value(typeId) + StringValueBase::StringValueBase(TypeId typeId) + : Value(typeId) { } - StringValueBase::StringValueBase(TypeId typeId, const std::string& buf) : Value(typeId) + StringValueBase::StringValueBase(TypeId typeId, const std::string& buf) + : Value(typeId) { read(buf); } @@ -294,11 +299,13 @@ namespace Exiv2 return {value_.at(n), 1}; } - StringValue::StringValue() : StringValueBase(string) + StringValue::StringValue() + : StringValueBase(string) { } - StringValue::StringValue(const std::string& buf) : StringValueBase(string, buf) + StringValue::StringValue(const std::string& buf) + : StringValueBase(string, buf) { } @@ -307,11 +314,13 @@ namespace Exiv2 return new StringValue(*this); } - AsciiValue::AsciiValue() : StringValueBase(asciiString) + AsciiValue::AsciiValue() + : StringValueBase(asciiString) { } - AsciiValue::AsciiValue(const std::string& buf) : StringValueBase(asciiString, buf) + AsciiValue::AsciiValue(const std::string& buf) + : StringValueBase(asciiString, buf) { } @@ -380,11 +389,13 @@ namespace Exiv2 return charsetTable_[i].charsetId_ == lastCharsetId ? invalidCharsetId : charsetTable_[i].charsetId_; } - CommentValue::CommentValue() : StringValueBase(Exiv2::undefined), byteOrder_(littleEndian) + CommentValue::CommentValue() + : StringValueBase(Exiv2::undefined), byteOrder_(littleEndian) { } - CommentValue::CommentValue(const std::string& comment) : StringValueBase(Exiv2::undefined), byteOrder_(littleEndian) + CommentValue::CommentValue(const std::string& comment) + : StringValueBase(Exiv2::undefined), byteOrder_(littleEndian) { read(comment); } @@ -511,7 +522,8 @@ namespace Exiv2 return new CommentValue(*this); } - XmpValue::XmpValue(TypeId typeId) : Value(typeId), xmpArrayType_(xaNone), xmpStruct_(xsNone) + XmpValue::XmpValue(TypeId typeId) + : Value(typeId), xmpArrayType_(xaNone), xmpStruct_(xsNone) { } @@ -577,11 +589,13 @@ namespace Exiv2 return os.str().size(); } - XmpTextValue::XmpTextValue() : XmpValue(xmpText) + XmpTextValue::XmpTextValue() + : XmpValue(xmpText) { } - XmpTextValue::XmpTextValue(const std::string& buf) : XmpValue(xmpText) + XmpTextValue::XmpTextValue(const std::string& buf) + : XmpValue(xmpText) { read(buf); } @@ -693,7 +707,8 @@ namespace Exiv2 return new XmpTextValue(*this); } - XmpArrayValue::XmpArrayValue(TypeId typeId) : XmpValue(typeId) + XmpArrayValue::XmpArrayValue(TypeId typeId) + : XmpValue(typeId) { setXmpArrayType(xmpArrayType(typeId)); } @@ -756,11 +771,13 @@ namespace Exiv2 return new XmpArrayValue(*this); } - LangAltValue::LangAltValue() : XmpValue(langAlt) + LangAltValue::LangAltValue() + : XmpValue(langAlt) { } - LangAltValue::LangAltValue(const std::string& buf) : XmpValue(langAlt) + LangAltValue::LangAltValue(const std::string& buf) + : XmpValue(langAlt) { read(buf); } @@ -890,11 +907,13 @@ namespace Exiv2 return new LangAltValue(*this); } - DateValue::DateValue() : Value(date) + DateValue::DateValue() + : Value(date) { } - DateValue::DateValue(int year, int month, int day) : Value(date) + DateValue::DateValue(int year, int month, int day) + : Value(date) { date_.year = year; date_.month = month; @@ -1027,11 +1046,13 @@ namespace Exiv2 return {static_cast(toInt64(n)), 1}; } - TimeValue::TimeValue() : Value(time) + TimeValue::TimeValue() + : Value(time) { } - TimeValue::TimeValue(int hour, int minute, int second, int tzHour, int tzMinute) : Value(date) + TimeValue::TimeValue(int hour, int minute, int second, int tzHour, int tzMinute) + : Value(date) { time_.hour = hour; time_.minute = minute; diff --git a/src/version.cpp b/src/version.cpp index e6d44427c4..ca28e9ea93 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -232,7 +232,22 @@ void Exiv2::dumpLibraryInfo(std::ostream& os, const std::vector& key // 7.10 = 2003 8.00 = 2005 etc 12.00 = 2013 13.00 = 2015 (yet the installer labels it as 14.0!) size_t edition = (_MSC_VER - 600) / 100; constexpr auto editions = std::array{ - "0", "1", "2", "3", "4", "5", "6", "2003", "2005", "2008", "2010", "2012", "2013", "2015", "2017", "2019", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "2003", + "2005", + "2008", + "2010", + "2012", + "2013", + "2015", + "2017", + "2019", }; if (edition == 13 && _MSC_VER >= 1910) edition++; // 2017 _MSC_VAR == 1910 diff --git a/src/webpimage.cpp b/src/webpimage.cpp index dec1b011e0..305aca9b19 100644 --- a/src/webpimage.cpp +++ b/src/webpimage.cpp @@ -62,7 +62,9 @@ namespace } } - hexOutput << std::endl << std::endl << std::endl; + hexOutput << std::endl + << std::endl + << std::endl; return hexOutput.str(); } @@ -74,7 +76,8 @@ namespace Exiv2 { using namespace Exiv2::Internal; - WebPImage::WebPImage(BasicIo::UniquePtr io) : Image(ImageType::webp, mdNone, std::move(io)) + WebPImage::WebPImage(BasicIo::UniquePtr io) + : Image(ImageType::webp, mdNone, std::move(io)) { } // WebPImage::WebPImage diff --git a/src/xmp.cpp b/src/xmp.cpp index e0045b318b..413aa85501 100644 --- a/src/xmp.cpp +++ b/src/xmp.cpp @@ -71,7 +71,8 @@ namespace private: // Private constructor, because this class is only constructed by // the (static) check method. - XMLValidator() : parser_(XML_ParserCreateNS(0, '@')) + XMLValidator() + : parser_(XML_ParserCreateNS(0, '@')) { if (!parser_) { throw Error(ErrorCode::kerXMPToolkitError, "Could not create expat parser"); @@ -206,7 +207,8 @@ namespace { public: //! Constructor, initializes the object with key - explicit FindXmpdatum(const Exiv2::XmpKey& key) : key_(key.key()) + explicit FindXmpdatum(const Exiv2::XmpKey& key) + : key_(key.key()) { } /*! @@ -292,7 +294,8 @@ namespace Exiv2 Value::UniquePtr value_; //!< Value }; - Xmpdatum::Impl::Impl(const XmpKey& key, const Value* pValue) : key_(key.clone()) + Xmpdatum::Impl::Impl(const XmpKey& key, const Value* pValue) + : key_(key.clone()) { if (pValue) value_ = pValue->clone(); @@ -319,11 +322,13 @@ namespace Exiv2 return *this; } - Xmpdatum::Xmpdatum(const XmpKey& key, const Value* pValue) : p_(std::make_unique(key, pValue)) + Xmpdatum::Xmpdatum(const XmpKey& key, const Value* pValue) + : p_(std::make_unique(key, pValue)) { } - Xmpdatum::Xmpdatum(const Xmpdatum& rhs) : Metadatum(rhs), p_(std::make_unique(*rhs.p_)) + Xmpdatum::Xmpdatum(const Xmpdatum& rhs) + : Metadatum(rhs), p_(std::make_unique(*rhs.p_)) { } diff --git a/src/xmpsidecar.cpp b/src/xmpsidecar.cpp index a30bd9ca23..ab5780d84f 100644 --- a/src/xmpsidecar.cpp +++ b/src/xmpsidecar.cpp @@ -21,7 +21,8 @@ namespace // class member definitions namespace Exiv2 { - XmpSidecar::XmpSidecar(BasicIo::UniquePtr io, bool create) : Image(ImageType::xmp, mdXmp, std::move(io)) + XmpSidecar::XmpSidecar(BasicIo::UniquePtr io, bool create) + : Image(ImageType::xmp, mdXmp, std::move(io)) { if (create) { if (io_->open() == 0) { diff --git a/unitTests/test_bmpimage.cpp b/unitTests/test_bmpimage.cpp index 2c02200af7..e9defbfd6e 100644 --- a/unitTests/test_bmpimage.cpp +++ b/unitTests/test_bmpimage.cpp @@ -82,7 +82,7 @@ TEST(BmpImage, setCommentIsNotImplemented) TEST(BmpImage, readMetadataReadsImageDimensionsWhenDataIsAvailable) { const std::array header{ - 'B', 'M', // Signature off:0 size:2 + 'B', 'M', // Signature off:0 size:2 0x4E, 0x47, 0x0D, 0x0A, // Size of the BMP file in bytes off:2, size:4 0x1A, 0x0A, // Reserved off:6, size:2 0x00, 0x00, // Reserved off:8, size:2 @@ -102,7 +102,7 @@ TEST(BmpImage, readMetadataReadsImageDimensionsWhenDataIsAvailable) TEST(BmpImage, readMetadataThrowsWhenImageIsNotBMP) { const std::array header{ - 'B', 'A', // Signature off:0 size:2 + 'B', 'A', // Signature off:0 size:2 0x4E, 0x47, 0x0D, 0x0A, // Size of the BMP file in bytes off:2, size:4 0x1A, 0x0A, // Reserved off:6, size:2 0x00, 0x00, // Reserved off:8, size:2 @@ -152,7 +152,7 @@ TEST(BmpImage, readMetadataThrowsWhenIoCannotBeOpened) TEST(newBmpInstance, createsValidInstace) { const std::array bitmapHeader{ - 'B', 'M', // Signature + 'B', 'M', // Signature 0x4E, 0x47, 0x0D, 0x0A, // Size of the BMP file in bytes 0x1A, 0x0A, // Reserved 0x00, 0x00, // Reserved @@ -173,7 +173,7 @@ TEST(newBmpInstance, createsInvalidInstaceWithNonExistingFilePath) TEST(isBmpType, withValidSignatureReturnsTrue) { const std::array bitmapHeader{ - 'B', 'M', // Signature + 'B', 'M', // Signature 0x4E, 0x47, 0x0D, 0x0A, // Size of the BMP file in bytes 0x1A, 0x0A, // Reserved 0x00, 0x00, // Reserved @@ -186,7 +186,7 @@ TEST(isBmpType, withValidSignatureReturnsTrue) TEST(isBmpType, withInvalidSignatureReturnsFalse) { const std::array bitmapHeader{ - 'B', 'A', // Signature + 'B', 'A', // Signature 0x4E, 0x47, 0x0D, 0x0A, // Size of the BMP file in bytes 0x1A, 0x0A, // Reserved 0x00, 0x00, // Reserved diff --git a/unitTests/test_types.cpp b/unitTests/test_types.cpp index c62ad46139..48882697d8 100644 --- a/unitTests/test_types.cpp +++ b/unitTests/test_types.cpp @@ -50,7 +50,7 @@ TEST(DataBuf, read_write_endianess) buf.write_uint16(4 + 1, 0x0203, bigEndian); buf.write_uint32(4 + 1 + 2, 0x04050607, bigEndian); buf.write_uint64(4 + 1 + 2 + 4, 0x08090a0b0c0d0e0fULL, bigEndian); - static const uint8_t expected_le[4 + 1 + 2 + 4 + 8] = {0, 0, 0, 0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, + static const uint8_t expected_le[4 + 1 + 2 + 4 + 8] = {0, 0, 0, 0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}; ASSERT_EQ(0, buf.cmpBytes(0, expected_le, buf.size())); ASSERT_EQ(buf.read_uint8(4), 0x01); @@ -63,7 +63,7 @@ TEST(DataBuf, read_write_endianess) buf.write_uint16(4 + 1, 0x0203, littleEndian); buf.write_uint32(4 + 1 + 2, 0x04050607, littleEndian); buf.write_uint64(4 + 1 + 2 + 4, 0x08090a0b0c0d0e0fULL, littleEndian); - static const uint8_t expected_be[4 + 1 + 2 + 4 + 8] = {0, 0, 0, 0, 0x1, 0x3, 0x2, 0x7, 0x6, 0x5, + static const uint8_t expected_be[4 + 1 + 2 + 4 + 8] = {0, 0, 0, 0, 0x1, 0x3, 0x2, 0x7, 0x6, 0x5, 0x4, 0xf, 0xe, 0xd, 0xc, 0xb, 0xa, 0x9, 0x8}; ASSERT_EQ(0, buf.cmpBytes(0, expected_be, buf.size())); ASSERT_EQ(buf.read_uint8(4), 0x01);