diff --git a/include/exiv2/types.hpp b/include/exiv2/types.hpp
index 3829110a..23be50d5 100644
--- a/include/exiv2/types.hpp
+++ b/include/exiv2/types.hpp
@@ -380,18 +380,32 @@ namespace Exiv2 {
EXIV2API std::string ws2s(const std::wstring& s);
#endif
/*!
- @brief Return a \em long set to the value represented by \em s.
+ @brief Return a \em int64_t set to the value represented by \em s.
- Besides strings that represent \em long values, the function also
+ Besides strings that represent \em int64_t values, the function also
handles \em float, \em Rational and boolean
(see also: stringTo(const std::string& s, bool& ok)).
@param s String to parse
@param ok Output variable indicating the success of the operation.
- @return Returns the \em long value represented by \em s and sets \em ok
+ @return Returns the \em int64_t value represented by \em s and sets \em ok
to \c true if the conversion was successful or \c false if not.
*/
- EXIV2API long parseLong(const std::string& s, bool& ok);
+ EXIV2API int64_t parseInt64(const std::string& s, bool& ok);
+
+ /*!
+ @brief Return a \em uint32_t set to the value represented by \em s.
+
+ Besides strings that represent \em uint32_t values, the function also
+ handles \em float, \em Rational and boolean
+ (see also: stringTo(const std::string& s, bool& ok)).
+
+ @param s String to parse
+ @param ok Output variable indicating the success of the operation.
+ @return Returns the \em uint32_t value represented by \em s and sets \em ok
+ to \c true if the conversion was successful or \c false if not.
+ */
+ EXIV2API uint32_t parseUint32(const std::string& s, bool& ok);
/*!
@brief Return a \em float set to the value represented by \em s.
diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp
index 5c014eb9..b51c5642 100644
--- a/include/exiv2/value.hpp
+++ b/include/exiv2/value.hpp
@@ -143,13 +143,21 @@ namespace Exiv2 {
*/
virtual std::string toString(long n) const;
/*!
- @brief Convert the n-th component of the value to a long.
+ @brief Convert the n-th component of the value to an int64_t.
The behaviour of this method may be undefined if there is no
n-th component.
@return The converted value.
*/
- virtual long toLong(long n =0) const =0;
+ virtual int64_t toInt64(long n =0) const =0;
+ /*!
+ @brief Convert the n-th component of the value to a float.
+ The behaviour of this method may be undefined if there is no
+ n-th component.
+
+ @return The converted value.
+ */
+ virtual uint32_t toUint32(long n =0) const =0;
/*!
@brief Convert the n-th component of the value to a float.
The behaviour of this method may be undefined if there is no
@@ -308,7 +316,8 @@ namespace Exiv2 {
n-th component.
*/
std::string toString(long n) const override;
- long toLong(long n = 0) const override;
+ int64_t toInt64(long n = 0) const override;
+ uint32_t toUint32(long n = 0) const override;
float toFloat(long n = 0) const override;
Rational toRational(long n = 0) const override;
//@}
@@ -385,7 +394,8 @@ namespace Exiv2 {
long copy(byte* buf, ByteOrder byteOrder = invalidByteOrder) const override;
long count() const override;
long size() const override;
- long toLong(long n = 0) const override;
+ int64_t toInt64(long n = 0) const override;
+ uint32_t toUint32(long n = 0) const override;
float toFloat(long n = 0) const override;
Rational toRational(long n = 0) const override;
std::ostream& write(std::ostream& os) const override;
@@ -739,12 +749,19 @@ namespace Exiv2 {
long size() const override;
long count() const override;
/*!
- @brief Convert the value to a long.
+ @brief Convert the value to an int64_t.
+ The optional parameter \em n is not used and is ignored.
+
+ @return The converted value.
+ */
+ int64_t toInt64(long n = 0) const override;
+ /*!
+ @brief Convert the value to an uint32_t.
The optional parameter \em n is not used and is ignored.
@return The converted value.
*/
- long toLong(long n = 0) const override;
+ uint32_t toUint32(long n = 0) const override;
/*!
@brief Convert the value to a float.
The optional parameter \em n is not used and is ignored.
@@ -818,7 +835,8 @@ namespace Exiv2 {
n-th component.
*/
std::string toString(long n) const override;
- long toLong(long n = 0) const override;
+ int64_t toInt64(long n = 0) const override;
+ uint32_t toUint32(long n = 0) const override;
float toFloat(long n = 0) const override;
Rational toRational(long n = 0) const override;
/*!
@@ -924,7 +942,8 @@ namespace Exiv2 {
to \c false if there is no entry for the language qualifier.
*/
std::string toString(const std::string& qualifier) const;
- long toLong(long n = 0) const override;
+ int64_t toInt64(long n = 0) const override;
+ uint32_t toUint32(long n = 0) const override;
float toFloat(long n = 0) const override;
Rational toRational(long n = 0) const override;
/*!
@@ -1032,8 +1051,10 @@ namespace Exiv2 {
long count() const override;
long size() const override;
std::ostream& write(std::ostream& os) const override;
- //! Return the value as a UNIX calender time converted to long.
- long toLong(long n = 0) const override;
+ //! Return the value as a UNIX calender time converted to int64_t.
+ int64_t toInt64(long n = 0) const override;
+ //! Return the value as a UNIX calender time converted to uint32_t.
+ uint32_t toUint32(long n = 0) const override;
//! Return the value as a UNIX calender time converted to float.
float toFloat(long n = 0) const override;
//! Return the value as a UNIX calender time converted to Rational.
@@ -1138,7 +1159,9 @@ namespace Exiv2 {
long size() const override;
std::ostream& write(std::ostream& os) const override;
//! Returns number of seconds in the day in UTC.
- long toLong(long n = 0) const override;
+ int64_t toInt64(long n = 0) const override;
+ //! Returns number of seconds in the day in UTC.
+ uint32_t toUint32(long n = 0) const override;
//! Returns number of seconds in the day in UTC converted to float.
float toFloat(long n = 0) const override;
//! Returns number of seconds in the day in UTC converted to Rational.
@@ -1241,7 +1264,8 @@ namespace Exiv2 {
component.
*/
std::string toString(long n) const override;
- long toLong(long n = 0) const override;
+ int64_t toInt64(long n = 0) const override;
+ uint32_t toUint32(long n = 0) const override;
float toFloat(long n = 0) const override;
Rational toRational(long n = 0) const override;
//! Return the size of the data area.
@@ -1270,6 +1294,62 @@ namespace Exiv2 {
ValueList value_;
private:
+ //! Utility for toInt64, toUint32, etc.
+ template
+ inline I float_to_integer_helper(long n) const {
+ const auto v = value_.at(n);
+ if (static_cast(std::numeric_limits::min()) <= v &&
+ v <= static_cast(std::numeric_limits::max())) {
+ return static_cast(v);
+ } else {
+ return 0;
+ }
+ }
+
+ //! Utility for toInt64, toUint32, etc.
+ template
+ inline I rational_to_integer_helper(long n) const {
+ const auto& t = value_.at(n);
+ const auto a = t.first;
+ const auto b = t.second;
+
+ // Protect against divide-by-zero.
+ if (b <= 0) {
+ return 0;
+ }
+
+ // Check for integer overflow.
+ if (std::is_signed::value == std::is_signed::value) {
+ // conversion does not change sign
+ const auto imin = std::numeric_limits::min();
+ const auto imax = std::numeric_limits::max();
+ if (imax < b || a < imin || imax < a) {
+ return 0;
+ }
+ } else if (std::is_signed::value) {
+ // conversion is from unsigned to signed
+ const auto imax =
+ static_cast::type>(std::numeric_limits::max());
+ if (imax < b || imax < a) {
+ return 0;
+ }
+ } else {
+ // conversion is from signed to unsigned
+ const auto imax = std::numeric_limits::max();
+ if (a < 0) {
+ return 0;
+ }
+ // Inputs are not negative so convert them to unsigned.
+ const auto a_u = static_cast::type>(a);
+ const auto b_u = static_cast::type>(b);
+ if (imax < b_u || imax < a_u) {
+ return 0;
+ }
+ }
+
+ return static_cast(a)/static_cast(b);
+ }
+
//! Internal virtual copy constructor.
ValueType* clone_() const override;
@@ -1585,46 +1665,62 @@ namespace Exiv2 {
// Default implementation
template
- long ValueType::toLong(long n) const
+ int64_t ValueType::toInt64(long n) const
+ {
+ ok_ = true;
+ return static_cast(value_.at(n));
+ }
+ template
+ uint32_t ValueType::toUint32(long n) const
{
ok_ = true;
- return static_cast(value_.at(n));
+ return static_cast(value_.at(n));
}
// #55 crash when value_.at(n).first == LONG_MIN
#define LARGE_INT 1000000
// Specialization for double
template<>
- inline long ValueType::toLong(long n) const
+ inline int64_t ValueType::toInt64(long n) const
+ {
+ return float_to_integer_helper(n);
+ }
+ template<>
+ inline uint32_t ValueType::toUint32(long n) const
{
- const double v = value_.at(n);
- ok_ = (INT_MIN <= v && v <= INT_MAX);
- if (!ok_) return 0;
- return static_cast(v);
+ return float_to_integer_helper(n);
}
// Specialization for float
template<>
- inline long ValueType::toLong(long n) const
+ inline int64_t ValueType::toInt64(long n) const
{
- const double v = value_.at(n);
- ok_ = (INT_MIN <= v && v <= INT_MAX);
- if (!ok_) return 0;
- return static_cast(v);
+ return float_to_integer_helper(n);
+ }
+ template<>
+ inline uint32_t ValueType::toUint32(long n) const
+ {
+ return float_to_integer_helper(n);
}
// Specialization for rational
template<>
- inline long ValueType::toLong(long n) const
+ inline int64_t ValueType::toInt64(long n) const
{
- ok_ = (value_.at(n).second > 0 && INT_MIN < value_.at(n).first && value_.at(n).first < INT_MAX );
- if (!ok_) return 0;
- return value_.at(n).first / value_.at(n).second;
+ return rational_to_integer_helper(n);
+ }
+ template<>
+ inline uint32_t ValueType::toUint32(long n) const
+ {
+ return rational_to_integer_helper(n);
}
// Specialization for unsigned rational
template<>
- inline long ValueType::toLong(long n) const
+ inline int64_t ValueType::toInt64(long n) const
+ {
+ return rational_to_integer_helper(n);
+ }
+ template<>
+ inline uint32_t ValueType::toUint32(long n) const
{
- ok_ = (value_.at(n).second > 0 && value_.at(n).first < LARGE_INT);
- if (!ok_) return 0;
- return value_.at(n).first / value_.at(n).second;
+ return rational_to_integer_helper(n);
}
// Default implementation
template
diff --git a/samples/stringto-test.cpp b/samples/stringto-test.cpp
index d4f8fe70..703ea81d 100644
--- a/samples/stringto-test.cpp
+++ b/samples/stringto-test.cpp
@@ -78,7 +78,7 @@ int main()
std::cout << std::setw(12) << std::left << s;
bool ok = false;
- long l = Exiv2::parseLong(s, ok);
+ const auto l = Exiv2::parseInt64(s, ok);
std::cout << std::setw(12) << std::left;
if (ok)
std::cout << l;
diff --git a/samples/xmpsample.cpp b/samples/xmpsample.cpp
index 7f237bf5..c465f0cb 100644
--- a/samples/xmpsample.cpp
+++ b/samples/xmpsample.cpp
@@ -88,7 +88,7 @@ try {
UNUSED(getv2);
assert(isEqual(getv2.toFloat(), 3.1415f));
assert(getv2.ok());
- assert(getv2.toLong() == 3);
+ assert(getv2.toInt64() == 3);
assert(getv2.ok());
Exiv2::Rational R = getv2.toRational();
UNUSED(R);
@@ -99,14 +99,14 @@ try {
UNUSED(getv3);
assert(isEqual(getv3.toFloat(), 5.0f/7.0f));
assert(getv3.ok());
- assert(getv3.toLong() == 0); // long(5.0 / 7.0)
+ assert(getv3.toInt64() == 0); // long(5.0 / 7.0)
assert(getv3.ok());
assert(getv3.toRational() == Exiv2::Rational(5, 7));
assert(getv3.ok());
const Exiv2::Value &getv6 = xmpData["Xmp.dc.six"].value();
UNUSED(getv6);
- assert(getv6.toLong() == 0);
+ assert(getv6.toInt64() == 0);
assert(getv6.ok());
assert(getv6.toFloat() == 0.0f);
assert(getv6.ok());
@@ -114,12 +114,12 @@ try {
assert(getv6.ok());
const Exiv2::Value &getv7 = xmpData["Xmp.dc.seven"].value();
- getv7.toLong(); // this should fail
+ getv7.toInt64(); // this should fail
assert(!getv7.ok());
const Exiv2::Value &getv8 = xmpData["Xmp.dc.eight"].value();
UNUSED(getv8);
- assert(getv8.toLong() == 1);
+ assert(getv8.toInt64() == 1);
assert(getv8.ok());
assert(getv8.toFloat() == 1.0f);
assert(getv8.ok());
diff --git a/src/actions.cpp b/src/actions.cpp
index ca8966e1..1c6899d6 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -573,7 +573,7 @@ namespace Action {
// #1114 - show negative values for SByte
if (md.typeId() == Exiv2::signedByte) {
for ( long c = 0 ; c < md.value().count() ; c++ ) {
- long value = md.value().toLong(c);
+ const auto value = md.value().toInt64(c);
os << (c?" ":"") << std::dec << (value < 128 ? value : value - 256);
}
} else {
diff --git a/src/canonmn_int.cpp b/src/canonmn_int.cpp
index e046a010..9bef915c 100644
--- a/src/canonmn_int.cpp
+++ b/src/canonmn_int.cpp
@@ -65,359 +65,359 @@ namespace Exiv2 {
//! ModelId, tag 0x0010
constexpr TagDetails canonModelId[] = {
- { static_cast(0x00000811), "EOS M6 Mark II"},
- { static_cast(0x00000804), "Powershot G5 X Mark II"},
- { static_cast(0x00000805), "PowerShot SX70 HS"},
- { static_cast(0x00000808), "PowerShot G7 X Mark III"},
- { static_cast(0x00000812), "EOS M200"},
- { static_cast(0x1010000), "PowerShot A30" },
- { static_cast(0x1040000), "PowerShot S300 / Digital IXUS 300 / IXY Digital 300" },
- { static_cast(0x1060000), "PowerShot A20" },
- { static_cast(0x1080000), "PowerShot A10" },
- { static_cast(0x1090000), "PowerShot S110 / Digital IXUS v / IXY Digital 200" },
- { static_cast(0x1100000), "PowerShot G2" },
- { static_cast(0x1110000), "PowerShot S40" },
- { static_cast(0x1120000), "PowerShot S30" },
- { static_cast(0x1130000), "PowerShot A40" },
- { static_cast(0x1140000), "EOS D30" },
- { static_cast(0x1150000), "PowerShot A100" },
- { static_cast(0x1160000), "PowerShot S200 / Digital IXUS v2 / IXY Digital 200a" },
- { static_cast(0x1170000), "PowerShot A200" },
- { static_cast(0x1180000), "PowerShot S330 / Digital IXUS 330 / IXY Digital 300a" },
- { static_cast(0x1190000), "PowerShot G3" },
- { static_cast(0x1210000), "PowerShot S45" },
- { static_cast(0x1230000), "PowerShot SD100 / Digital IXUS II / IXY Digital 30" },
- { static_cast(0x1240000), "PowerShot S230 / Digital IXUS v3 / IXY Digital 320" },
- { static_cast(0x1250000), "PowerShot A70" },
- { static_cast(0x1260000), "PowerShot A60" },
- { static_cast(0x1270000), "PowerShot S400 / Digital IXUS 400 / IXY Digital 400" },
- { static_cast(0x1290000), "PowerShot G5" },
- { static_cast(0x1300000), "PowerShot A300" },
- { static_cast(0x1310000), "PowerShot S50" },
- { static_cast(0x1340000), "PowerShot A80" },
- { static_cast(0x1350000), "PowerShot SD10 / Digital IXUS i / IXY Digital L" },
- { static_cast(0x1360000), "PowerShot S1 IS" },
- { static_cast(0x1370000), "PowerShot Pro1" },
- { static_cast(0x1380000), "PowerShot S70" },
- { static_cast(0x1390000), "PowerShot S60" },
- { static_cast(0x1400000), "PowerShot G6" },
- { static_cast(0x1410000), "PowerShot S500 / Digital IXUS 500 / IXY Digital 500" },
- { static_cast(0x1420000), "PowerShot A75" },
- { static_cast(0x1440000), "PowerShot SD110 / Digital IXUS IIs / IXY Digital 30a" },
- { static_cast(0x1450000), "PowerShot A400" },
- { static_cast(0x1470000), "PowerShot A310" },
- { static_cast(0x1490000), "PowerShot A85" },
- { static_cast(0x1520000), "PowerShot S410 / Digital IXUS 430 / IXY Digital 450" },
- { static_cast(0x1530000), "PowerShot A95" },
- { static_cast(0x1540000), "PowerShot SD300 / Digital IXUS 40 / IXY Digital 50" },
- { static_cast(0x1550000), "PowerShot SD200 / Digital IXUS 30 / IXY Digital 40" },
- { static_cast(0x1560000), "PowerShot A520" },
- { static_cast(0x1570000), "PowerShot A510" },
- { static_cast(0x1590000), "PowerShot SD20 / Digital IXUS i5 / IXY Digital L2" },
- { static_cast(0x1640000), "PowerShot S2 IS" },
- { static_cast(0x1650000), "PowerShot SD430 / Digital IXUS Wireless / IXY Digital Wireless" },
- { static_cast(0x1660000), "PowerShot SD500 / Digital IXUS 700 / IXY Digital 600" },
- { static_cast(0x1668000), "EOS D60" },
- { static_cast(0x1700000), "PowerShot SD30 / Digital IXUS i Zoom / IXY Digital L3" },
- { static_cast(0x1740000), "PowerShot A430" },
- { static_cast(0x1750000), "PowerShot A410" },
- { static_cast(0x1760000), "PowerShot S80" },
- { static_cast(0x1780000), "PowerShot A620" },
- { static_cast(0x1790000), "PowerShot A610" },
- { static_cast(0x1800000), "PowerShot SD630 / Digital IXUS 65 / IXY Digital 80" },
- { static_cast(0x1810000), "PowerShot SD450 / Digital IXUS 55 / IXY Digital 60" },
- { static_cast(0x1820000), "PowerShot TX1" },
- { static_cast(0x1870000), "PowerShot SD400 / Digital IXUS 50 / IXY Digital 55" },
- { static_cast(0x1880000), "PowerShot A420" },
- { static_cast(0x1890000), "PowerShot SD900 / Digital IXUS 900 Ti / IXY Digital 1000" },
- { static_cast(0x1900000), "PowerShot SD550 / Digital IXUS 750 / IXY Digital 700" },
- { static_cast(0x1920000), "PowerShot A700" },
- { static_cast(0x1940000), "PowerShot SD700 IS / Digital IXUS 800 IS / IXY Digital 800 IS" },
- { static_cast(0x1950000), "PowerShot S3 IS" },
- { static_cast(0x1960000), "PowerShot A540" },
- { static_cast(0x1970000), "PowerShot SD600 / Digital IXUS 60 / IXY Digital 70" },
- { static_cast(0x1980000), "PowerShot G7" },
- { static_cast(0x1990000), "PowerShot A530" },
- { static_cast(0x2000000), "PowerShot SD800 IS / Digital IXUS 850 IS / IXY Digital 900 IS" },
- { static_cast(0x2010000), "PowerShot SD40 / Digital IXUS i7 / IXY Digital L4" },
- { static_cast(0x2020000), "PowerShot A710 IS" },
- { static_cast(0x2030000), "PowerShot A640" },
- { static_cast(0x2040000), "PowerShot A630" },
- { static_cast(0x2090000), "PowerShot S5 IS" },
- { static_cast(0x2100000), "PowerShot A460" },
- { static_cast(0x2120000), "PowerShot SD850 IS / Digital IXUS 950 IS / IXY Digital 810 IS" },
- { static_cast(0x2130000), "PowerShot A570 IS" },
- { static_cast(0x2140000), "PowerShot A560" },
- { static_cast(0x2150000), "PowerShot SD750 / Digital IXUS 75 / IXY Digital 90" },
- { static_cast(0x2160000), "PowerShot SD1000 / Digital IXUS 70 / IXY Digital 10" },
- { static_cast(0x2180000), "PowerShot A550" },
- { static_cast(0x2190000), "PowerShot A450" },
- { static_cast(0x2230000), "PowerShot G9" },
- { static_cast(0x2240000), "PowerShot A650 IS" },
- { static_cast(0x2260000), "PowerShot A720 IS" },
- { static_cast(0x2290000), "PowerShot SX100 IS" },
- { static_cast(0x2300000), "PowerShot SD950 IS / Digital IXUS 960 IS / IXY Digital 2000 IS" },
- { static_cast(0x2310000), "PowerShot SD870 IS / Digital IXUS 860 IS / IXY Digital 910 IS" },
- { static_cast(0x2320000), "PowerShot SD890 IS / Digital IXUS 970 IS / IXY Digital 820 IS" },
- { static_cast(0x2360000), "PowerShot SD790 IS / Digital IXUS 90 IS / IXY Digital 95 IS" },
- { static_cast(0x2370000), "PowerShot SD770 IS / Digital IXUS 85 IS / IXY Digital 25 IS" },
- { static_cast(0x2380000), "PowerShot A590 IS" },
- { static_cast(0x2390000), "PowerShot A580" },
- { static_cast(0x2420000), "PowerShot A470" },
- { static_cast(0x2430000), "PowerShot SD1100 IS / Digital IXUS 80 IS / IXY Digital 20 IS" },
- { static_cast(0x2460000), "PowerShot SX1 IS" },
- { static_cast(0x2470000), "PowerShot SX10 IS" },
- { static_cast(0x2480000), "PowerShot A1000 IS" },
- { static_cast(0x2490000), "PowerShot G10" },
- { static_cast(0x2510000), "PowerShot A2000 IS" },
- { static_cast(0x2520000), "PowerShot SX110 IS" },
- { static_cast(0x2530000), "PowerShot SD990 IS / Digital IXUS 980 IS / IXY Digital 3000 IS" },
- { static_cast(0x2540000), "PowerShot SD880 IS / Digital IXUS 870 IS / IXY Digital 920 IS" },
- { static_cast(0x2550000), "PowerShot E1" },
- { static_cast(0x2560000), "PowerShot D10" },
- { static_cast(0x2570000), "PowerShot SD960 IS / Digital IXUS 110 IS / IXY Digital 510 IS" },
- { static_cast(0x2580000), "PowerShot A2100 IS" },
- { static_cast(0x2590000), "PowerShot A480" },
- { static_cast(0x2600000), "PowerShot SX200 IS" },
- { static_cast(0x2610000), "PowerShot SD970 IS / Digital IXUS 990 IS / IXY Digital 830 IS" },
- { static_cast(0x2620000), "PowerShot SD780 IS / Digital IXUS 100 IS / IXY Digital 210 IS" },
- { static_cast(0x2630000), "PowerShot A1100 IS" },
- { static_cast(0x2640000), "PowerShot SD1200 IS / Digital IXUS 95 IS / IXY Digital 110 IS" },
- { static_cast(0x2700000), "PowerShot G11" },
- { static_cast(0x2710000), "PowerShot SX120 IS" },
- { static_cast(0x2720000), "PowerShot S90" },
- { static_cast(0x2750000), "PowerShot SX20 IS" },
- { static_cast(0x2760000), "PowerShot SD980 IS / Digital IXUS 200 IS / IXY Digital 930 IS" },
- { static_cast(0x2770000), "PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS" },
- { static_cast(0x2800000), "PowerShot A495" },
- { static_cast(0x2810000), "PowerShot A490" },
- { static_cast(0x2820000), "PowerShot A3100/A3150 IS" },
- { static_cast(0x2830000), "PowerShot A3000 IS" },
- { static_cast(0x2840000), "PowerShot SD1400 IS / IXUS 130 / IXY 400F" },
- { static_cast(0x2850000), "PowerShot SD1300 IS / IXUS 105 / IXY 200F" },
- { static_cast(0x2860000), "PowerShot SD3500 IS / IXUS 210 / IXY 10S" },
- { static_cast(0x2870000), "PowerShot SX210 IS" },
- { static_cast(0x2880000), "PowerShot SD4000 IS / IXUS 300 HS / IXY 30S" },
- { static_cast(0x2890000), "PowerShot SD4500 IS / IXUS 1000 HS / IXY 50S" },
- { static_cast(0x2920000), "PowerShot G12" },
- { static_cast(0x2930000), "PowerShot SX30 IS" },
- { static_cast(0x2940000), "PowerShot SX130 IS" },
- { static_cast(0x2950000), "PowerShot S95" },
- { static_cast(0x2980000), "PowerShot A3300 IS" },
- { static_cast(0x2990000), "PowerShot A3200 IS" },
- { static_cast(0x3000000), "PowerShot ELPH 500 HS / IXUS 310 HS / IXY 31S" },
- { static_cast(0x3010000), "PowerShot Pro90 IS" },
- { static_cast(0x3010001), "PowerShot A800" },
- { static_cast(0x3020000), "PowerShot ELPH 100 HS / IXUS 115 HS / IXY 210F" },
- { static_cast(0x3030000), "PowerShot SX230 HS" },
- { static_cast(0x3040000), "PowerShot ELPH 300 HS / IXUS 220 HS / IXY 410F" },
- { static_cast(0x3050000), "PowerShot A2200" },
- { static_cast(0x3060000), "PowerShot A1200" },
- { static_cast(0x3070000), "PowerShot SX220 HS" },
- { static_cast(0x3080000), "PowerShot G1 X" },
- { static_cast(0x3090000), "PowerShot SX150 IS" },
- { static_cast(0x3100000), "PowerShot ELPH 510 HS / IXUS 1100 HS / IXY 51S" },
- { static_cast(0x3110000), "PowerShot S100 (new)" },
- { static_cast(0x3130000), "PowerShot SX40 HS" },
- { static_cast(0x3120000), "PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F" },
- { static_cast(0x3140000), "IXY 32S" },
- { static_cast(0x3160000), "PowerShot A1300" },
- { static_cast(0x3170000), "PowerShot A810" },
- { static_cast(0x3180000), "PowerShot ELPH 320 HS / IXUS 240 HS / IXY 420F" },
- { static_cast(0x3190000), "PowerShot ELPH 110 HS / IXUS 125 HS / IXY 220F" },
- { static_cast(0x3200000), "PowerShot D20" },
- { static_cast(0x3210000), "PowerShot A4000 IS" },
- { static_cast(0x3220000), "PowerShot SX260 HS" },
- { static_cast(0x3230000), "PowerShot SX240 HS" },
- { static_cast(0x3240000), "PowerShot ELPH 530 HS / IXUS 510 HS / IXY 1" },
- { static_cast(0x3250000), "PowerShot ELPH 520 HS / IXUS 500 HS / IXY 3" },
- { static_cast(0x3260000), "PowerShot A3400 IS" },
- { static_cast(0x3270000), "PowerShot A2400 IS" },
- { static_cast(0x3280000), "PowerShot A2300" },
- { static_cast(0x3320000), "PowerShot S100V" },
- { static_cast(0x3330000), "PowerShot G15" },
- { static_cast(0x3340000), "PowerShot SX50 HS" },
- { static_cast(0x3350000), "PowerShot SX160 IS" },
- { static_cast(0x3360000), "PowerShot S110 (new)" },
- { static_cast(0x3370000), "PowerShot SX500 IS" },
- { static_cast(0x3380000), "PowerShot N" },
- { static_cast(0x3390000), "IXUS 245 HS / IXY 430F" },
- { static_cast(0x3400000), "PowerShot SX280 HS" },
- { static_cast(0x3410000), "PowerShot SX270 HS" },
- { static_cast(0x3420000), "PowerShot A3500 IS" },
- { static_cast(0x3430000), "PowerShot A2600" },
- { static_cast(0x3440000), "PowerShot SX275 HS" },
- { static_cast(0x3450000), "PowerShot A1400" },
- { static_cast(0x3460000), "PowerShot ELPH 130 IS / IXUS 140 / IXY 110F" },
- { static_cast(0x3470000), "PowerShot ELPH 115/120 IS / IXUS 132/135 / IXY 90F/100F" },
- { static_cast(0x3490000), "PowerShot ELPH 330 HS / IXUS 255 HS / IXY 610F" },
- { static_cast(0x3510000), "PowerShot A2500" },
- { static_cast(0x3540000), "PowerShot G16" },
- { static_cast(0x3550000), "PowerShot S120" },
- { static_cast(0x3560000), "PowerShot SX170 IS" },
- { static_cast(0x3580000), "PowerShot SX510 HS" },
- { static_cast(0x3590000), "PowerShot S200 (new)" },
- { static_cast(0x3600000), "IXY 620F" },
- { static_cast(0x3610000), "PowerShot N100" },
- { static_cast(0x3640000), "PowerShot G1 X Mark II" },
- { static_cast(0x3650000), "PowerShot D30" },
- { static_cast(0x3660000), "PowerShot SX700 HS" },
- { static_cast(0x3670000), "PowerShot SX600 HS" },
- { static_cast(0x3680000), "PowerShot ELPH 140 IS / IXUS 150 / IXY 130" },
- { static_cast(0x3690000), "PowerShot ELPH 135 / IXUS 145 / IXY 120" },
- { static_cast(0x3700000), "PowerShot ELPH 340 HS / IXUS 265 HS / IXY 630" },
- { static_cast(0x3710000), "PowerShot ELPH 150 IS / IXUS 155 / IXY 140" },
- { static_cast(0x3740000), "EOS M3" },
- { static_cast