support rating tag from EXIF/XMP
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
CacheImageData::CacheImageData ()
|
||||
: md5(""), supported(false), format(FT_Invalid), rankOld(-1), inTrashOld(false), recentlySaved(false),
|
||||
timeValid(false), year(0), month(0), day(0), hour(0), min(0), sec(0), exifValid(false), frameCount(1),
|
||||
fnumber(0.0), shutter(0.0), focalLen(0.0), focalLen35mm(0.0), focusDist(0.f), iso(0), isHDR (false),
|
||||
fnumber(0.0), shutter(0.0), focalLen(0.0), focalLen35mm(0.0), focusDist(0.f), iso(0), rating(0), isHDR (false),
|
||||
isPixelShift (false), sensortype(rtengine::ST_NONE), sampleFormat(rtengine::IIOSF_UNKNOWN),
|
||||
redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), rotate(0), thumbImgType(0)
|
||||
{
|
||||
|
||||
@@ -54,6 +54,7 @@ public:
|
||||
double focalLen, focalLen35mm;
|
||||
float focusDist;
|
||||
unsigned iso;
|
||||
int rating;
|
||||
bool isHDR;
|
||||
bool isPixelShift;
|
||||
int sensortype;
|
||||
@@ -108,6 +109,7 @@ public:
|
||||
std::string getModel (unsigned int frame = 0) const override { return camModel; }
|
||||
std::string getLens (unsigned int frame = 0) const override { return lens; }
|
||||
std::string getOrientation (unsigned int frame = 0) const override { return ""; } // TODO
|
||||
int getRating (unsigned int frame = 0) const override { return rating; } // FIXME-piotr : missing rating
|
||||
bool getPixelShift () const override { return isPixelShift; }
|
||||
bool getHDR (unsigned int frame = 0) const override { return isHDR; }
|
||||
std::string getImageType (unsigned int frame) const override { return isPixelShift ? "PS" : isHDR ? "HDR" : "STD"; }
|
||||
|
||||
@@ -813,6 +813,7 @@ int Thumbnail::infoFromImage (const Glib::ustring& fname, std::unique_ptr<rtengi
|
||||
cfs.lens = idata->getLens();
|
||||
cfs.camMake = idata->getMake();
|
||||
cfs.camModel = idata->getModel();
|
||||
cfs.rating = idata->getRating();
|
||||
|
||||
if (idata->getOrientation() == "Rotate 90 CW") {
|
||||
deg = 90;
|
||||
|
||||
@@ -164,7 +164,10 @@ public:
|
||||
return cfs.md5;
|
||||
}
|
||||
|
||||
int getRank () const;
|
||||
int getRank () const
|
||||
{
|
||||
return cfs.rating;
|
||||
}
|
||||
void setRank (int rank);
|
||||
|
||||
int getColorLabel () const;
|
||||
|
||||
Reference in New Issue
Block a user