Use exiv2 for metadata handling
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user