本文整理汇总了C++中exifdata::const_iterator::write方法的典型用法代码示例。如果您正苦于以下问题:C++ const_iterator::write方法的具体用法?C++ const_iterator::write怎么用?C++ const_iterator::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类exifdata::const_iterator
的用法示例。
在下文中一共展示了const_iterator::write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isoSpeed
ExifData::const_iterator isoSpeed(const ExifData& ed)
{
static const char* keys[] = {
"Exif.Photo.ISOSpeedRatings",
"Exif.Image.ISOSpeedRatings",
"Exif.CanonSi.ISOSpeed",
"Exif.CanonCs.ISOSpeed",
"Exif.Nikon1.ISOSpeed",
"Exif.Nikon2.ISOSpeed",
"Exif.Nikon3.ISOSpeed",
"Exif.NikonIi.ISO",
"Exif.NikonIi.ISO2",
"Exif.MinoltaCsNew.ISOSetting",
"Exif.MinoltaCsOld.ISOSetting",
"Exif.MinoltaCs5D.ISOSpeed",
"Exif.MinoltaCs7D.ISOSpeed",
"Exif.Sony1Cs.ISOSetting",
"Exif.Sony2Cs.ISOSetting",
"Exif.Sony1Cs2.ISOSetting",
"Exif.Sony2Cs2.ISOSetting",
"Exif.Sony1MltCsA100.ISOSetting",
"Exif.Pentax.ISO",
"Exif.PentaxDng.ISO",
"Exif.Olympus.ISOSpeed",
"Exif.Samsung2.ISO",
"Exif.Casio.ISO",
"Exif.Casio2.ISO",
"Exif.Casio2.ISOSpeed"
};
// Find the first ISO value which is not "0"
const int cnt = EXV_COUNTOF(keys);
ExifData::const_iterator md = ed.end();
for (int idx = 0; idx < cnt; ) {
md = findMetadatum(ed, keys + idx, cnt - idx);
if (md == ed.end()) break;
std::ostringstream os;
md->write(os, &ed);
bool ok = false;
long v = parseLong(os.str(), ok);
if (ok && v != 0) break;
while (strcmp(keys[idx++], md->key().c_str()) != 0 && idx < cnt) {}
md = ed.end();
}
return md;
}