Exiv2Helper.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00011 /*
00012  *  This is free software; you can redistribute it and/or
00013  *  modify it under the terms of the GNU General Public
00014  *  License as published by the Free Software Foundation; either
00015  *  version 2 of the License, or (at your option) any later version.
00016  *
00017  *  This software is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  *  Lesser General Public License for more details.
00021  *
00022  *  You should have received a copy of the GNU General Public
00023  *  License along with this software. If not, see
00024  *  <http://www.gnu.org/licenses/>.
00025  *
00026  */
00027 
00028 #ifndef _EXIV2HELPER_H
00029 #define _EXIV2HELPER_H
00030 
00031 #include <string>
00032 #include <vector>
00033 #include <exiv2/exif.hpp>
00034 
00035 // these functions are intentionally not exposed to public
00036 // they are supposed only be used by SrcPanoImage.cpp for internal use
00037 
00038 namespace HuginBase
00039 {
00040     namespace Exiv2Helper
00041     {
00042         // helper function to return a single value
00043         const double getExiv2ValueDouble(Exiv2::ExifData& exifData, Exiv2::ExifData::const_iterator it);
00044         const double getExiv2ValueDouble(Exiv2::ExifData& exifData, std::string keyName);
00045         const std::string getExiv2ValueString(Exiv2::ExifData& exifData, Exiv2::ExifData::const_iterator it);
00046         const std::string getExiv2ValueString(Exiv2::ExifData& exifData, std::string keyName);
00047         const long getExiv2ValueLong(Exiv2::ExifData& exifData, Exiv2::ExifData::const_iterator it);
00048         const long getExiv2ValueLong(Exiv2::ExifData& exifData, std::string keyName);
00049         
00050         // read the RedBalance and BlueBalance data from makernotes of different manufactures
00051         bool readRedBlueBalance(Exiv2::ExifData &exifData, double & redBalance, double & blueBalance);
00052         // read the crop factor from the EXIF data, code for handling with different variants for saving crop factor
00053         const double getCropFactor(Exiv2::ExifData &exifData, long width, long height);
00054         // read the lens name for EXIF or makernotes data
00055         const std::string getLensName(Exiv2::ExifData &exifData);
00056     };
00057 };
00058 #endif

Generated on 20 Apr 2018 for Hugintrunk by  doxygen 1.4.7