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