diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch
index a2f33e6fe..7f562d51c 100644
--- a/rtdata/languages/Deutsch
+++ b/rtdata/languages/Deutsch
@@ -201,10 +201,12 @@ FILEBROWSER_COLORLABEL_TOOLTIP;Farbmarkierung\n\nTaste: Strg +
FILEBROWSER_COPYPROFILE;Profil kopieren
FILEBROWSER_CURRENT_NAME;Aktueller Name:
FILEBROWSER_DARKFRAME;Dunkelbild
+FILEBROWSER_DELETEDIALOG_ALL;Möchten Sie wirklich %1 Dateien unwiderruflich löschen?
FILEBROWSER_DELETEDIALOG_HEADER;Dateien löschen
FILEBROWSER_DELETEDIALOG_SELECTED;Möchten Sie wirklich %1 Datei(en) unwiderruflich löschen?
FILEBROWSER_DELETEDIALOG_SELECTEDINCLPROC;Möchten Sie wirklich %1 Datei(en) unwiderruflich löschen, mit allen aus der Stapelverarbeitung resultierenden zugehörigen Ausgabedateien?
FILEBROWSER_EMPTYTRASH;Papierkorb leeren
+FILEBROWSER_EMPTYTRASHHINT;Alle Dateien im Papierkorb\nunwiderruflich löschen.
FILEBROWSER_EXTPROGMENU;Öffnen mit
FILEBROWSER_FLATFIELD;Weißbild
FILEBROWSER_MOVETODARKFDIR;In Dunkelbild-Verzeichnis verschieben
@@ -2358,9 +2360,3 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen.\nTaste: Alt + f
ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: +
ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: -
-!!!!!!!!!!!!!!!!!!!!!!!!!
-! Untranslated keys follow; remove the ! prefix after an entry is translated.
-!!!!!!!!!!!!!!!!!!!!!!!!!
-
-FILEBROWSER_DELETEDIALOG_ALL;Möchten Sie wirklich %1 Dateien unwiderruflich löschen?
-FILEBROWSER_EMPTYTRASHHINT;Alle Dateien im Papierkorb\nunwiderruflich löschen.
diff --git a/rtdata/languages/default b/rtdata/languages/default
index c6e71a092..255cefce5 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -1646,7 +1646,7 @@ TP_COLORAPP_SURROUND_AVER;Average
TP_COLORAPP_SURROUND_DARK;Dark
TP_COLORAPP_SURROUND_DIM;Dim
TP_COLORAPP_SURROUND_EXDARK;Extremly Dark (Cutsheet)
-TP_COLORAPP_SURROUND_TOOLTIP;Changes tones and colors to take into account the viewing conditions of the output device.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment (TV). The image will become slighty dark.\n\nDark: Dark environment (projector). The image will become more dark.\n\nExtremly Dark: Extremly dark environment (cutsheet). The image will become very dark.
+TP_COLORAPP_SURROUND_TOOLTIP;Changes tones and colors to take into account the viewing conditions of the output device.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment (TV). The image will become slightly dark.\n\nDark: Dark environment (projector). The image will become more dark.\n\nExtremly Dark: Extremly dark environment (cutsheet). The image will become very dark.
TP_COLORAPP_TCMODE_BRIGHTNESS;Brightness
TP_COLORAPP_TCMODE_CHROMA;Chroma
TP_COLORAPP_TCMODE_COLORF;Colorfulness
diff --git a/rtdata/options/options.lin b/rtdata/options/options.lin
index 91520dc0e..1d2f9faac 100644
--- a/rtdata/options/options.lin
+++ b/rtdata/options/options.lin
@@ -6,7 +6,7 @@
[General]
# Setting MultiUser to false will use the application's installation directory as cache directory,
-# which can be useful if you want to keep the application and all the cache datas in a single place,
+# which can be useful if you want to keep the application and all the cache data in a single place,
# an external HD for example
MultiUser=true
diff --git a/rtdata/options/options.osx b/rtdata/options/options.osx
index 4decccb6d..11c5da4c8 100644
--- a/rtdata/options/options.osx
+++ b/rtdata/options/options.osx
@@ -6,7 +6,7 @@
[General]
# Setting MultiUser to false will use the application's installation directory as cache directory,
-# which can be useful if you want to keep the application and all the cache datas in a single place,
+# which can be useful if you want to keep the application and all the cache data in a single place,
# an external HD for example
MultiUser=true
diff --git a/rtdata/options/options.win b/rtdata/options/options.win
index 40e73aacc..a4a767bf4 100644
--- a/rtdata/options/options.win
+++ b/rtdata/options/options.win
@@ -6,7 +6,7 @@
[General]
# Setting MultiUser to false will use the application's installation directory as cache directory,
-# which can be useful if you want to keep the application and all the cache datas in a single place,
+# which can be useful if you want to keep the application and all the cache data in a single place,
# an external HD for example
MultiUser=true
# Windows users should not use the system theme : some composed widget won't be usable
diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc
index 3777c39ae..0f85b14d5 100644
--- a/rtengine/EdgePreservingDecomposition.cc
+++ b/rtengine/EdgePreservingDecomposition.cc
@@ -406,7 +406,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max
fp = 1;
for(int ii = 1; ii < m; ii++) {
- fp = rtengine::min(StartRows[ii] - StartRows[ii - 1], MaxFillAbove); //Guarunteed positive since StartRows must be created in increasing order.
+ fp = rtengine::min(StartRows[ii] - StartRows[ii - 1], MaxFillAbove); //Guaranteed positive since StartRows must be created in increasing order.
mic = mic + fp;
}
diff --git a/rtengine/camconst.json b/rtengine/camconst.json
index 2492eec28..9e6ec49b6 100644
--- a/rtengine/camconst.json
+++ b/rtengine/camconst.json
@@ -1245,6 +1245,11 @@ Camera constants:
"ranges": { "white": 64886 }
},
+ { // Quality C
+ "make_model": "FUJIFILM GFX 100",
+ "raw_crop": [ 0, 2, 11664, 8734 ]
+ },
+
{ // Quality B
"make_model": "FUJIFILM GFX 50S",
"dcraw_matrix": [ 11756,-4754,-874,-3056,11045,2305,-381,1457,6006 ], // DNGv9.9 D65
diff --git a/rtengine/color.h b/rtengine/color.h
index 7e36dd7aa..11df48253 100644
--- a/rtengine/color.h
+++ b/rtengine/color.h
@@ -1856,7 +1856,7 @@ public:
static inline double huelab_to_huehsv2(float HH)
{
//hr=translate Hue Lab value (-Pi +Pi) in approximative hr (hsv values) (0 1) [red 1/6 yellow 1/6 green 1/6 cyan 1/6 blue 1/6 magenta 1/6 ]
- // with multi linear correspondances (I expect there is no error !!)
+ // with multi linear correspondences (I expect there is no error !!)
double hr = 0.0;
//always put h between 0 and 1
diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
index ceb40f279..280b692e7 100644
--- a/rtengine/dcraw.cc
+++ b/rtengine/dcraw.cc
@@ -4,6 +4,9 @@
#if (__GNUC__ >= 6)
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif
+#if (__GNUC__ >= 9)
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
#endif
/*RT*/#include
@@ -2504,11 +2507,19 @@ void CLASS unpacked_load_raw()
while (1 << ++bits < maximum);
read_shorts (raw_image, raw_width*raw_height);
- for (row=0; row < raw_height; row++)
- for (col=0; col < raw_width; col++)
- if ((RAW(row,col) >>= load_flags) >> bits
- && (unsigned) (row-top_margin) < height
- && (unsigned) (col-left_margin) < width) derror();
+ if (load_flags) {
+ for (row=0; row < raw_height; row++)
+ for (col=0; col < raw_width; col++)
+ if ((RAW(row,col) >>= load_flags) >> bits
+ && (unsigned) (row-top_margin) < height
+ && (unsigned) (col-left_margin) < width) derror();
+ } else if (bits < 16) {
+ for (row=0; row < raw_height; row++)
+ for (col=0; col < raw_width; col++)
+ if (RAW(row,col) >> bits
+ && (unsigned) (row-top_margin) < height
+ && (unsigned) (col-left_margin) < width) derror();
+ }
}
@@ -9279,6 +9290,8 @@ void CLASS identify()
apply_tiff();
if (!strcmp(model, "X-T3")) {
height = raw_height - 2;
+ } else if (!strcmp(model, "GFX 100")) {
+ load_flags = 0;
}
if (!load_raw) {
load_raw = &CLASS unpacked_load_raw;
diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc
index 3536f1053..dc12bc01a 100644
--- a/rtengine/demosaic_algos.cc
+++ b/rtengine/demosaic_algos.cc
@@ -1206,10 +1206,10 @@ void RawImageSource::igv_interpolate(int winw, int winh)
}
for (; col < width; col++, indx += 2) {
- dest1[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT datas
+ dest1[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT data
col++;
if(col < width)
- dest2[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT datas
+ dest2[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT data
}
}
@@ -1561,7 +1561,7 @@ void RawImageSource::igv_interpolate(int winw, int winh)
for (int row = 0; row < height - 0; row++)
for (int col = 0, indx = row * width + col; col < width - 0; col++, indx++) {
int c = FC(row, col);
- rgb[c][indx] = CLIP(rawData[row][col]); //rawData = RT datas
+ rgb[c][indx] = CLIP(rawData[row][col]); //rawData = RT data
}
// border_interpolate2(7, rgb);
diff --git a/rtengine/eahd_demosaic.cc b/rtengine/eahd_demosaic.cc
index 4bbf37c69..1663a087d 100644
--- a/rtengine/eahd_demosaic.cc
+++ b/rtengine/eahd_demosaic.cc
@@ -415,7 +415,7 @@ void RawImageSource::eahd_demosaic ()
}
}
- // finish H-2th and H-1th row, homogenity value is still valailable
+ // finish H-2th and H-1th row, homogeneity value is still available
for (int i = H - 1; i < H + 1; i++)
for (int j = 0; j < W; j++) {
int hc = homh[(i - 1) % 3][j];
diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc
index 3b8b14dff..bd459f4c7 100644
--- a/rtengine/improcfun.cc
+++ b/rtengine/improcfun.cc
@@ -748,7 +748,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
const float hue = params->colorappearance.colorh;
const float rstprotection = 100. - params->colorappearance.rstprotection;
- // extracting datas from 'params' to avoid cache flush (to be confirmed)
+ // extracting data from 'params' to avoid cache flush (to be confirmed)
const ColorAppearanceParams::TcMode curveMode = params->colorappearance.curveMode;
const bool hasColCurve1 = bool (customColCurve1);
const bool t1L = hasColCurve1 && curveMode == ColorAppearanceParams::TcMode::LIGHT;
@@ -1687,7 +1687,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
-//all this treatments reduce artifacts, but can lead to slighty different results
+//all this treatments reduce artifacts, but can lead to slightly different results
if (params->defringe.enabled)
if (execsharp) {
@@ -2258,7 +2258,7 @@ void ImProcFunctions::rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer
const float shoulder = ((65536.0 / max(1.0f, exp_scale)) * (hlcomprthresh / 200.0)) + 0.1;
const float hlrange = 65536.0 - shoulder;
const bool isProPhoto = (params->icm.workingProfile == "ProPhoto");
- // extracting datas from 'params' to avoid cache flush (to be confirmed)
+ // extracting data from 'params' to avoid cache flush (to be confirmed)
ToneCurveMode curveMode = params->toneCurve.curveMode;
ToneCurveMode curveMode2 = params->toneCurve.curveMode2;
bool highlight = params->toneCurve.hrenabled;//Get the value if "highlight reconstruction" is activated
diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc
index f6f78620e..84c8b80ef 100644
--- a/rtengine/ipretinex.cc
+++ b/rtengine/ipretinex.cc
@@ -699,7 +699,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
float cdfactor = 32768.f / delta;
maxCD = -9999999.f;
minCD = 9999999.f;
- // coeff for auto "transmission" with 2 sigma #95% datas
+ // coeff for auto "transmission" with 2 sigma #95% data
float aza = 16300.f / (2.f * stddv);
float azb = -aza * (mean - 2.f * stddv);
float bza = 16300.f / (2.f * stddv);
diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc
index fc785ab15..43f4611ba 100644
--- a/rtengine/ipwavelet.cc
+++ b/rtengine/ipwavelet.cc
@@ -3003,7 +3003,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit
if (useChromAndHue) {
float modhue = varhue[ii][jj];
modchro = varchrom[ii * 2][jj * 2];
- // hue chroma skin with initial lab datas
+ // hue chroma skin with initial lab data
scale = 1.f;
if (skinprot > 0.f) {
@@ -3215,7 +3215,7 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue,
float LL100 = labco->L[ii * 2][jj * 2] / 327.68f;
float modhue = varhue[ii][jj];
float modchro = varchrom[ii * 2][jj * 2];
- // hue chroma skin with initial lab datas
+ // hue chroma skin with initial lab data
float scale = 1.f;
if (skinprot > 0.f) {
@@ -3251,7 +3251,7 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue,
float modchro = varchrom[ii * 2][jj * 2];
if (useSkinControl) {
- // hue chroma skin with initial lab datas
+ // hue chroma skin with initial lab data
float LL100 = labco->L[ii * 2][jj * 2] / 327.68f;
float modhue = varhue[ii][jj];
diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc
index 877d7ed79..581a08c1d 100644
--- a/rtengine/procparams.cc
+++ b/rtengine/procparams.cc
@@ -4653,7 +4653,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
if (ppVersion >= 346) {
assignFromKeyfile(keyFile, "SharpenMicro", "Uniformity", pedited, sharpenMicro.uniformity, pedited->sharpenMicro.uniformity);
} else {
- double temp;
+ double temp = 50.0;
assignFromKeyfile(keyFile, "SharpenMicro", "Uniformity", pedited, temp, pedited->sharpenMicro.uniformity);
sharpenMicro.uniformity = temp / 10;
}
diff --git a/rtgui/cachemanager.cc b/rtgui/cachemanager.cc
index c10b85989..fbc6ae491 100644
--- a/rtgui/cachemanager.cc
+++ b/rtgui/cachemanager.cc
@@ -16,18 +16,20 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see .
*/
-#include "cachemanager.h"
#include
#include
-#include
+#include
#include
+#include
#ifdef WIN32
#include
#endif
+#include "cachemanager.h"
+
#include "guiutils.h"
#include "options.h"
#include "procparamchangers.h"
@@ -347,65 +349,69 @@ Glib::ustring CacheManager::getCacheFileName (const Glib::ustring& subDir,
void CacheManager::applyCacheSizeLimitation () const
{
// first count files without fetching file name and timestamp.
+ auto cachedir = opendir(Glib::build_filename(baseDir, "data").c_str());
+ if (!cachedir) {
+ return;
+ }
+
std::size_t numFiles = 0;
- try {
+ while (readdir(cachedir)) {
+ ++numFiles;
+ }
- const auto dirName = Glib::build_filename (baseDir, "data");
- const auto dir = Gio::File::create_for_path (dirName);
-
- auto enumerator = dir->enumerate_children ("");
-
- while (numFiles <= options.maxCacheEntries && enumerator->next_file ()) {
- ++numFiles;
- }
-
- } catch (Glib::Exception&) {}
+ closedir(cachedir);
+ if (numFiles > 2) {
+ numFiles -= 2; // because . and .. are counted
+ }
if (numFiles <= options.maxCacheEntries) {
return;
}
using FNameMTime = std::pair;
+
std::vector files;
+ files.reserve(numFiles);
+ constexpr std::size_t md5_size = 32;
+ // get filenames and timestamps
try {
+ const auto dir = Gio::File::create_for_path(Glib::build_filename(baseDir, "data"));
+ const auto enumerator = dir->enumerate_children("standard::name,time::modified");
- const auto dirName = Glib::build_filename (baseDir, "data");
- const auto dir = Gio::File::create_for_path (dirName);
-
- auto enumerator = dir->enumerate_children ("standard::name,time::modified");
-
- while (auto file = enumerator->next_file ()) {
- files.emplace_back (file->get_name (), file->modification_time ());
+ while (const auto file = enumerator->next_file()) {
+ const auto name = file->get_name();
+ if (name.size() >= md5_size + 5) {
+ files.emplace_back(name, file->modification_time());
+ }
}
} catch (Glib::Exception&) {}
- if (files.size () <= options.maxCacheEntries) {
+ if (files.size() <= options.maxCacheEntries) {
+ // limit not reached
return;
}
- std::sort (files.begin (), files.end (), [] (const FNameMTime & lhs, const FNameMTime & rhs) {
- return lhs.second < rhs.second;
- });
+ const std::size_t toDelete = files.size() - options.maxCacheEntries + options.maxCacheEntries * 5 / 100; // reserve 5% free cache space
- auto cacheEntries = files.size ();
-
- for (auto entry = files.begin (); cacheEntries-- > options.maxCacheEntries; ++entry) {
-
- const auto& name = entry->first;
-
- constexpr auto md5_size = 32;
- const auto name_size = name.size();
-
- if (name_size < md5_size + 5) {
- continue;
+ std::nth_element(
+ files.begin(),
+ files.begin() + toDelete,
+ files.end(),
+ [](const FNameMTime& lhs, const FNameMTime& rhs) -> bool
+ {
+ return lhs.second < rhs.second;
}
+ );
- const auto fname = name.substr (0, name_size - md5_size - 5);
- const auto md5 = name.substr (name_size - md5_size - 4, md5_size);
+ for (std::vector::const_iterator entry = files.begin(), end = files.begin() + toDelete; entry != end; ++entry) {
+ const auto& name = entry->first;
+ const auto name_size = name.size() - md5_size;
+ const auto fname = name.substr(0, name_size - 5);
+ const auto md5 = name.substr(name_size - 4, md5_size);
- deleteFiles (fname, md5, true, false);
+ deleteFiles(fname, md5, true, false);
}
}
diff --git a/rtgui/myflatcurve.cc b/rtgui/myflatcurve.cc
index 0c8b1e952..ad4131fda 100644
--- a/rtgui/myflatcurve.cc
+++ b/rtgui/myflatcurve.cc
@@ -1636,7 +1636,7 @@ void MyFlatCurve::movePoint(bool moveX, bool moveY, bool pipetteDrag)
}
}
-// Set datas relative to cursor position
+// Set data relative to cursor position
void MyFlatCurve::getCursorPosition(Gdk::EventType evType, bool isHint, int evX, int evY, Gdk::ModifierType modifierKey)
{
int tx, ty;
diff --git a/rtgui/options.cc b/rtgui/options.cc
index d439658bf..b985e9132 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -44,7 +44,7 @@
// User's settings directory, including images' profiles if used
Glib::ustring Options::rtdir;
-// User's cached datas' directory
+// User's cached data directory
Glib::ustring Options::cacheBaseDir;
Options options;
diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc
index 67c22149e..fc20aa5da 100644
--- a/rtgui/toolpanelcoord.cc
+++ b/rtgui/toolpanelcoord.cc
@@ -865,8 +865,8 @@ rtengine::RawImage* ToolPanelCoordinator::getFF()
const rtengine::FramesMetaData *imd = ipc->getInitialImage()->getMetaData();
if (imd) {
- // int iso = imd->getISOSpeed(); temporarilly removed because unused
- // double shutter = imd->getShutterSpeed(); temporarilly removed because unused
+ // int iso = imd->getISOSpeed(); temporarily removed because unused
+ // double shutter = imd->getShutterSpeed(); temporarily removed because unused
double aperture = imd->getFNumber();
double focallength = imd->getFocalLen();
std::string maker(imd->getMake());
diff --git a/win.cmake b/win.cmake
index 9c292b2df..8b1caa12d 100644
--- a/win.cmake
+++ b/win.cmake
@@ -5,7 +5,7 @@
#set(CMAKE_BUILD_TYPE Release CACHE STRING "Between: None Debug Release RelWithDebInfo MinSizeRel.")
set(CMAKE_INSTALL_PREFIX ./${CMAKE_BUILD_TYPE} CACHE PATH "Libraries installation path")
-set(DATADIR . CACHE PATH "Datas installation path")
+set(DATADIR . CACHE PATH "Data installation path")
set(BINDIR . CACHE PATH "Binaries installation path")
set(LIBDIR . CACHE PATH "Libraries installation path")
set(DOCDIR ./doc CACHE PATH "Documentation installation path")