Use exiv2 for metadata handling
This commit is contained in:
@@ -31,13 +31,12 @@
|
||||
#include <memory>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <libiptcdata/iptc-data.h>
|
||||
#include "rtengine.h"
|
||||
#include "imageformat.h"
|
||||
#include "../rtexif/rtexif.h"
|
||||
#include "imagedimensions.h"
|
||||
#include "iimage.h"
|
||||
#include "colortemp.h"
|
||||
#include "procparams.h"
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
@@ -45,6 +44,24 @@ namespace rtengine
|
||||
class ProgressListener;
|
||||
class Imagefloat;
|
||||
|
||||
class MetadataInfo {
|
||||
public:
|
||||
explicit MetadataInfo(const Glib::ustring &src=Glib::ustring()):
|
||||
src_(src) {}
|
||||
|
||||
const Glib::ustring &filename() const { return src_; }
|
||||
|
||||
const rtengine::procparams::ExifPairs &exif() const { return exif_; }
|
||||
const rtengine::procparams::IPTCPairs &iptc() const { return iptc_; }
|
||||
void setExif(const rtengine::procparams::ExifPairs &exif) { exif_ = exif; }
|
||||
void setIptc(const rtengine::procparams::IPTCPairs &iptc) { iptc_ = iptc; }
|
||||
|
||||
private:
|
||||
Glib::ustring src_;
|
||||
rtengine::procparams::ExifPairs exif_;
|
||||
rtengine::procparams::IPTCPairs iptc_;
|
||||
};
|
||||
|
||||
class ImageIO : virtual public ImageDatas
|
||||
{
|
||||
|
||||
@@ -56,12 +73,10 @@ protected:
|
||||
char* loadedProfileData;
|
||||
bool loadedProfileDataJpg;
|
||||
int loadedProfileLength;
|
||||
const std::unique_ptr<procparams::ExifPairs> exifChange;
|
||||
IptcData* iptc;
|
||||
const rtexif::TagDirectory* exifRoot;
|
||||
MyMutex imutex;
|
||||
IIOSampleFormat sampleFormat;
|
||||
IIOSampleArrangement sampleArrangement;
|
||||
MetadataInfo metadataInfo;
|
||||
|
||||
private:
|
||||
void deleteLoadedProfileData( );
|
||||
@@ -103,10 +118,11 @@ public:
|
||||
cmsHPROFILE getEmbeddedProfile () const;
|
||||
void getEmbeddedProfileData (int& length, unsigned char*& pdata) const;
|
||||
|
||||
void setMetadata (const rtexif::TagDirectory* eroot);
|
||||
void setMetadata (const rtexif::TagDirectory* eroot, const rtengine::procparams::ExifPairs& exif, const rtengine::procparams::IPTCPairs& iptcc);
|
||||
void setMetadata(const MetadataInfo &info) { metadataInfo = info; }
|
||||
void setOutputProfile (const char* pdata, int plen);
|
||||
|
||||
bool saveMetadata(const Glib::ustring &fname) const;
|
||||
|
||||
MyMutex& mutex ();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user