예제 #1
0
 //for diagnostic
 void PrintTag(Exiv2::ExifData::iterator itr)
 {
     std::cout << itr->value() << " (" << itr->typeName() << ", size: " << itr->count() << ")" << std::endl;
     if(itr->count()>1)
     {
         std::cout << "[";
         for(long i=0; i<itr->count(); i++)
         {
             std::cout << itr->toFloat(i) << ",";
         }
         std::cout << "]" << std::endl;
     };
 };
예제 #2
0
 bool _getExiv2Value(Exiv2::ExifData& exifData, std::string keyName, float & value)
 {
     Exiv2::ExifData::iterator itr = exifData.findKey(Exiv2::ExifKey(keyName));
     if (itr != exifData.end() && itr->count())
     {
         value = itr->toFloat();
         return true;
     }
     else
     {
         return false;
     };
 };
예제 #3
0
 bool _getExiv2Value(Exiv2::ExifData& exifData, uint16_t tagID, std::string groupName, double & value)
 {
     Exiv2::ExifData::iterator itr = exifData.findKey(Exiv2::ExifKey(tagID, groupName));
     if (itr != exifData.end() && itr->count())
     {
         value = itr->toFloat();
         return true;
     }
     else
     {
         return false;
     }
 }
예제 #4
0
 bool _getExiv2Value(Exiv2::ExifData& exifData, std::string keyName, std::vector<float> & values)
 {
     values.clear();
     Exiv2::ExifData::iterator itr = exifData.findKey(Exiv2::ExifKey(keyName));
     if (itr != exifData.end() && itr->count())
     {
         for(long i=0; i<itr->count(); i++)
         {
             values.push_back(itr->toFloat(i));
         };
         return true;
     }
     else
     {
         return false;
     }
 }