metadata: initialize thumbnail rating from exif
(cherry picked from commit 96bd2db0d2e127678bded3bee7aa3275332826c0)
This commit is contained in:
committed by
Lawrence Lee
parent
38d87bae72
commit
b01b0fbef0
@@ -287,6 +287,10 @@ FramesData::FramesData(const Glib::ustring &fname) :
|
||||
expcomp = pos->toFloat();
|
||||
}
|
||||
|
||||
if (find_exif_tag("Exif.Image.Rating")) {
|
||||
rating = pos->toLong();
|
||||
}
|
||||
|
||||
// -----------------------
|
||||
// Special file type detection (HDR, PixelShift)
|
||||
// ------------------------
|
||||
@@ -567,12 +571,6 @@ std::string FramesData::getOrientation() const
|
||||
}
|
||||
|
||||
|
||||
int FramesData::getRating() const
|
||||
{
|
||||
return rating;
|
||||
}
|
||||
|
||||
|
||||
void FramesData::setDCRawFrameCount(unsigned int frameCount)
|
||||
{
|
||||
dcrawFrameCount = frameCount;
|
||||
@@ -589,6 +587,12 @@ Glib::ustring FramesData::getFileName() const
|
||||
return fname_;
|
||||
}
|
||||
|
||||
|
||||
int FramesData::getRating() const
|
||||
{
|
||||
return rating;
|
||||
}
|
||||
|
||||
//------inherited functions--------------//
|
||||
|
||||
std::string FramesMetaData::apertureToString(double aperture)
|
||||
|
@@ -81,8 +81,8 @@ public:
|
||||
std::string getLens() const override;
|
||||
std::string getSerialNumber() const;
|
||||
std::string getOrientation() const override;
|
||||
int getRating() const override;
|
||||
Glib::ustring getFileName() const override;
|
||||
int getRating() const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
/* -*- C++ -*-
|
||||
*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
@@ -122,7 +123,7 @@ public:
|
||||
/** @return the orientation of the image */
|
||||
virtual std::string getOrientation() const = 0;
|
||||
/** @return the rating of the image */
|
||||
virtual int getRating () const = 0;
|
||||
virtual int getRating() const = 0;
|
||||
|
||||
/** @return true if the file is a PixelShift shot (Pentax and Sony bodies) */
|
||||
virtual bool getPixelShift () const = 0;
|
||||
|
@@ -387,7 +387,7 @@ void Thumbnail::notifylisterners_procParamsChanged(int whoChangedIt)
|
||||
* The result is a complete ProcParams with default values merged with the values
|
||||
* from the loaded ProcParams (sidecar or cache file).
|
||||
*/
|
||||
void Thumbnail::loadProcParams ()
|
||||
void Thumbnail::loadProcParams()
|
||||
{
|
||||
MyMutex::MyLock lock(mutex);
|
||||
|
||||
|
Reference in New Issue
Block a user