metadata: initialize thumbnail rating from exif

(cherry picked from commit 96bd2db0d2e127678bded3bee7aa3275332826c0)
This commit is contained in:
Alberto Griggio
2019-05-20 01:56:38 -07:00
committed by Lawrence Lee
parent 38d87bae72
commit b01b0fbef0
4 changed files with 15 additions and 10 deletions

View File

@@ -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)

View File

@@ -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;
}; };
} }

View File

@@ -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>