Use exiv2 for metadata handling

This commit is contained in:
Alberto Griggio
2019-05-06 09:27:44 +02:00
parent a2e2ace1c8
commit c360fd7e2c
49 changed files with 1359 additions and 17510 deletions

View File

@@ -1075,90 +1075,8 @@ struct MetaDataParams {
};
/**
* Minimal wrapper allowing forward declaration for representing a key/value for the exif metadata information
*/
class ExifPairs final
{
public:
using const_iterator = std::map<Glib::ustring, Glib::ustring>::const_iterator;
const_iterator begin() const
{
return pairs.begin();
}
const_iterator end() const
{
return pairs.end();
}
void clear()
{
pairs.clear();
}
Glib::ustring& operator[](const Glib::ustring& key)
{
return pairs[key];
}
bool operator ==(const ExifPairs& other) const
{
return pairs == other.pairs;
}
private:
std::map<Glib::ustring, Glib::ustring> pairs;
};
/**
* The IPTC key/value pairs
*/
class IPTCPairs final
{
public:
using iterator = std::map<Glib::ustring, std::vector<Glib::ustring>>::iterator;
using const_iterator = std::map<Glib::ustring, std::vector<Glib::ustring>>::const_iterator;
iterator find(const Glib::ustring& key)
{
return pairs.find(key);
}
const_iterator begin() const
{
return pairs.begin();
}
const_iterator end() const
{
return pairs.end();
}
bool empty() const
{
return pairs.empty();
}
void clear()
{
pairs.clear();
}
std::vector<Glib::ustring>& operator[](const Glib::ustring& key)
{
return pairs[key];
}
bool operator ==(const IPTCPairs& other) const
{
return pairs == other.pairs;
}
private:
std::map<Glib::ustring, std::vector<Glib::ustring>> pairs;
};
typedef std::map<Glib::ustring, Glib::ustring> ExifPairs;
typedef std::map<Glib::ustring, std::vector<Glib::ustring>> IPTCPairs;
struct WaveletParams {
std::vector<double> ccwcurve;