diff --git a/rtdata/dcpprofiles/Canon EOS 1300D.dcp b/rtdata/dcpprofiles/Canon EOS 1300D.dcp new file mode 100644 index 000000000..e6fa7ac41 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 1300D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 60D.dcp b/rtdata/dcpprofiles/Canon EOS 60D.dcp new file mode 100644 index 000000000..24e7e04b6 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 60D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 6D Mark II.dcp b/rtdata/dcpprofiles/Canon EOS 6D Mark II.dcp new file mode 100644 index 000000000..69a131bd3 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 6D Mark II.dcp differ diff --git a/rtdata/dcpprofiles/Panasonic DC-TZ91.dcp b/rtdata/dcpprofiles/Panasonic DC-TZ91.dcp new file mode 100644 index 000000000..2a3abfaed Binary files /dev/null and b/rtdata/dcpprofiles/Panasonic DC-TZ91.dcp differ diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 065d4640c..ea0fd9f1c 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -714,9 +714,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double avg_r = 0; double avg_g = 0; double avg_b = 0; - const float eps = 1e-5; //tolerance to avoid dividing by zero - float rn = eps, gn = eps, bn = eps; + unsigned int rn = 0, gn = 0, bn = 0; for (int i = 32; i < height - 32; i++) { int start, end; @@ -831,9 +830,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati } } - double reds = avg_r / rn * tpp->camwbRed; - double greens = avg_g / gn * tpp->camwbGreen; - double blues = avg_b / bn * tpp->camwbBlue; + double reds = avg_r / std::max(rn, 1u) * tpp->camwbRed; + double greens = avg_g / std::max(gn, 1u) * tpp->camwbGreen; + double blues = avg_b / std::max(bn, 1u) * tpp->camwbBlue; tpp->redAWBMul = ri->get_rgb_cam (0, 0) * reds + ri->get_rgb_cam (0, 1) * greens + ri->get_rgb_cam (0, 2) * blues; tpp->greenAWBMul = ri->get_rgb_cam (1, 0) * reds + ri->get_rgb_cam (1, 1) * greens + ri->get_rgb_cam (1, 2) * blues; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 10d4809ed..b9c5baafb 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -975,15 +975,11 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) bppcl->endBatchPParamsChange(); } } else if (m == clearFromCache) { - for (size_t i = 0; i < mselected.size(); i++) { - tbl->clearFromCacheRequested (mselected, false); - } + tbl->clearFromCacheRequested (mselected, false); //queue_draw (); } else if (m == clearFromCacheFull) { - for (size_t i = 0; i < mselected.size(); i++) { - tbl->clearFromCacheRequested (mselected, true); - } + tbl->clearFromCacheRequested (mselected, true); //queue_draw (); } else if (miOpenDefaultViewer != nullptr && m == miOpenDefaultViewer) {