Hugin trunk 0.1
Loading...
Searching...
No Matches
Exiv2Helper.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
11/*
12 * This is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
16 *
17 * This software is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public
23 * License along with this software. If not, see
24 * <http://www.gnu.org/licenses/>.
25 *
26 */
27
28#ifndef _EXIV2HELPER_H
29#define _EXIV2HELPER_H
30
31#include <string>
32#include <vector>
33#include <exiv2/exif.hpp>
34
35// these functions are intentionally not exposed to public
36// they are supposed only be used by SrcPanoImage.cpp for internal use
37
38namespace HuginBase
39{
40 namespace Exiv2Helper
41 {
42 // helper function to return a single value
43 const double getExiv2ValueDouble(Exiv2::ExifData& exifData, Exiv2::ExifData::const_iterator it);
44 const double getExiv2ValueDouble(Exiv2::ExifData& exifData, std::string keyName);
45 const std::string getExiv2ValueString(Exiv2::ExifData& exifData, Exiv2::ExifData::const_iterator it);
46 const std::string getExiv2ValueString(Exiv2::ExifData& exifData, std::string keyName);
47 const long getExiv2ValueLong(Exiv2::ExifData& exifData, Exiv2::ExifData::const_iterator it);
48 const long getExiv2ValueLong(Exiv2::ExifData& exifData, std::string keyName);
49 bool getExiv2GPSLatitude(Exiv2::ExifData& exifData, double& latitude);
50 bool getExiv2GPSLongitude(Exiv2::ExifData& exifData, double& longitude);
51
52 // read the RedBalance and BlueBalance data from makernotes of different manufactures
53 bool readRedBlueBalance(Exiv2::ExifData &exifData, double & redBalance, double & blueBalance);
54 // read the crop factor from the EXIF data, code for handling with different variants for saving crop factor
55 const double getCropFactor(Exiv2::ExifData &exifData, long width, long height);
56 // read the lens name for EXIF or makernotes data
57 const std::string getLensName(Exiv2::ExifData &exifData);
58 };
59};
60#endif
const std::string getExiv2ValueString(Exiv2::ExifData &exifData, Exiv2::ExifData::const_iterator it)
bool getExiv2GPSLongitude(Exiv2::ExifData &exifData, double &longitude)
const double getCropFactor(Exiv2::ExifData &exifData, long width, long height)
bool getExiv2GPSLatitude(Exiv2::ExifData &exifData, double &latitude)
const double getExiv2ValueDouble(Exiv2::ExifData &exifData, Exiv2::ExifData::const_iterator it)
const long getExiv2ValueLong(Exiv2::ExifData &exifData, Exiv2::ExifData::const_iterator it)
const std::string getLensName(Exiv2::ExifData &exifData)
bool readRedBlueBalance(Exiv2::ExifData &exifData, double &redBalance, double &blueBalance)
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
Definition wxcms.cpp:39
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41