Merge branch 'dev' into metadata-exiv2

- Rating (#5325) not yet implemented
This commit is contained in:
Flössie
2019-09-24 14:30:54 +02:00
539 changed files with 7707 additions and 5098 deletions

View File

@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#include "cacheimagedata.h"
#include <vector>
@@ -24,12 +24,37 @@
#include "../rtengine/procparams.h"
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),
isPixelShift (false), sensortype(rtengine::ST_NONE), sampleFormat(rtengine::IIOSF_UNKNOWN),
redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), rotate(0), thumbImgType(0)
CacheImageData::CacheImageData() :
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),
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)
{
}
@@ -66,6 +91,10 @@ int CacheImageData::load (const Glib::ustring& fname)
rankOld = keyFile.get_integer ("General", "Rank");
}
if (keyFile.has_key ("General", "Rating")) {
rating = keyFile.get_integer ("General", "Rating");
}
if (keyFile.has_key ("General", "InTrash")) {
inTrashOld = keyFile.get_boolean ("General", "InTrash");
}
@@ -227,6 +256,7 @@ int CacheImageData::save (const Glib::ustring& fname)
keyFile.set_boolean ("General", "Supported", supported);
keyFile.set_integer ("General", "Format", format);
keyFile.set_boolean ("General", "RecentlySaved", recentlySaved);
keyFile.set_integer ("General", "Rating", rating);
// remove the old implementation of Rank and InTrash from cache
if (keyFile.has_key ("General", "Rank")) {