From 511f6c2a7b9c65ee2d1e480b2e8ea663baea6054 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 20 Jul 2017 17:03:21 +0200 Subject: [PATCH 001/126] raise an exception when `Options::save` fails See #3975 #3976 --- rtgui/CMakeLists.txt | 2 +- rtgui/exportpanel.cc | 7 ++++- rtgui/main-cli.cc | 4 ++- rtgui/main.cc | 5 +++- rtgui/options.cc | 64 ++++++++++++++++++++++---------------------- rtgui/options.h | 19 ++++++++++--- rtgui/preferences.cc | 7 ++++- rtgui/rtwindow.cc | 7 ++++- 8 files changed, 73 insertions(+), 42 deletions(-) diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index 629e3890f..05afd9af5 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -229,7 +229,7 @@ if((WIN32) AND NOT(UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG")) set_target_properties(rth PROPERTIES LINK_FLAGS "-mwindows") endif() set_target_properties(rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee) -set_target_properties(rth-cli PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -DRAWTHERAPEE_CLI" OUTPUT_NAME rawtherapee-cli) +set_target_properties(rth-cli PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee-cli) # Add linked libraries dependencies to executables targets target_link_libraries(rth rtengine diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 72cf30fdd..6f90792b3 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -303,7 +303,12 @@ void ExportPanel::SaveSettingsAsDefault() #undef FE_OPT_STORE_ if (changed) { - Options::save(); + try { + Options::save(); + } catch (Options::Error &e) { + Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + msgd.run(); + } } } diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 69c3d8487..7c120e9cf 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -153,7 +153,9 @@ int main(int argc, char **argv) bool quickstart = dontLoadCache(argc, argv); - if (!Options::load (quickstart)) { + try { + Options::load (quickstart); + } catch (Options::Error &) { printf("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!\n"); return -2; } diff --git a/rtgui/main.cc b/rtgui/main.cc index 099751f06..1e329c284 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -207,7 +207,10 @@ int processLineParams( int argc, char **argv ) bool init_rt() { - if (!Options::load ()) { + try { + Options::load(); + } catch (Options::Error &e) { + std::cout << "ERROR: " << e.get_msg() << std::endl; return false; } diff --git a/rtgui/options.cc b/rtgui/options.cc index 07b0f81ad..39d633e90 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -743,14 +743,15 @@ void Options::filterOutParsedExtensions () } } -int Options::readFromFile (Glib::ustring fname) +void Options::readFromFile (Glib::ustring fname) { setlocale (LC_NUMERIC, "C"); // to set decimal point to "." Glib::KeyFile keyFile; if ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { - return 1; + Glib::ustring msg = Glib::ustring::compose("Options file %1 does not exist", fname); + throw Error(msg); } try { @@ -1858,21 +1859,22 @@ int Options::readFromFile (Glib::ustring fname) filterOutParsedExtensions (); - return 0; + return; } } catch (Glib::Error &err) { + Glib::ustring msg = Glib::ustring::compose("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what()); if (options.rtSettings.verbose) { - printf ("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + printf("%s\n", msg.c_str()); } + throw Error(msg); } catch (...) { + Glib::ustring msg = Glib::ustring::compose("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname); if (options.rtSettings.verbose) { - printf ("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); + printf ("%s\n", msg.c_str()); } + throw Error(msg); } - - return 1; - } bool Options::safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section, @@ -1890,7 +1892,7 @@ bool Options::safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& sec return false; } -int Options::saveToFile (Glib::ustring fname) +void Options::saveToFile (Glib::ustring fname) { Glib::ustring keyData; @@ -2220,31 +2222,23 @@ int Options::saveToFile (Glib::ustring fname) keyData = keyFile.to_data (); - } catch (Glib::KeyFileError&) {} - - if (keyData.empty ()) { - return 1; + } catch (Glib::KeyFileError &e) { + throw Error(e.what()); } FILE *f = g_fopen (fname.c_str (), "wt"); if (f == nullptr) { std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl; -#ifndef RAWTHERAPEE_CLI Glib::ustring msg_ = Glib::ustring::compose(M("MAIN_MSG_WRITEFAILED"), fname.c_str()); - //writeFailed (getToplevelWindow (this), msg_); - Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); - msgd.run (); -#endif - return 1; + throw Error(msg_); } else { fprintf (f, "%s", keyData.c_str ()); fclose (f); - return 0; } } -bool Options::load (bool lightweight) +void Options::load (bool lightweight) { // Find the application data path @@ -2258,7 +2252,8 @@ bool Options::load (bool lightweight) rtdir = Glib::ustring (path); if (!Glib::path_is_absolute (rtdir)) { - return false; + Glib::ustring msg = Glib::ustring::compose("Settings path %1 is not absolute", rtdir); + throw Error(msg); } } else { #ifdef WIN32 @@ -2283,7 +2278,11 @@ bool Options::load (bool lightweight) cacheBaseDir = Glib::build_filename (argv0, "cache"); // Read the global option file (the one located in the application's base folder) - options.readFromFile (Glib::build_filename (argv0, "options")); + try { + options.readFromFile (Glib::build_filename (argv0, "options")); + } catch (Options::Error &) { + // ignore errors here + } // Modify the path of the cache folder to the one provided in RT_CACHE environment variable path = g_getenv ("RT_CACHE"); @@ -2292,7 +2291,8 @@ bool Options::load (bool lightweight) cacheBaseDir = Glib::ustring (path); if (!Glib::path_is_absolute (cacheBaseDir)) { - return false; + Glib::ustring msg = Glib::ustring::compose("Cache base dir %1 is not absolute", cacheBaseDir); + throw Error(msg); } } // No environment variable provided, so falling back to the multi user mode, is enabled @@ -2308,12 +2308,14 @@ bool Options::load (bool lightweight) if (options.multiUser) { // Read the user option file (the one located somewhere in the user's home folder) // Those values supersets those of the global option file - int r = options.readFromFile (Glib::build_filename (rtdir, "options")); - - // If the local option file does not exist or is broken, and the local cache folder does not exist, recreate it - if (r && !g_mkdir_with_parents (rtdir.c_str (), 511)) { - // Save the option file - options.saveToFile (Glib::build_filename (rtdir, "options")); + try { + options.readFromFile (Glib::build_filename (rtdir, "options")); + } catch (Options::Error &) { + // If the local option file does not exist or is broken, and the local cache folder does not exist, recreate it + if (!g_mkdir_with_parents (rtdir.c_str (), 511)) { + // Save the option file + options.saveToFile (Glib::build_filename (rtdir, "options")); + } } #ifdef __APPLE__ @@ -2406,8 +2408,6 @@ bool Options::load (bool lightweight) langMgr.load (localeTranslation, new MultiLangMgr (languageTranslation, new MultiLangMgr (defaultTranslation))); rtengine::init (&options.rtSettings, argv0, rtdir, !lightweight); - - return true; } void Options::save () diff --git a/rtgui/options.h b/rtgui/options.h index 9253b7e2f..0b5882df0 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -21,6 +21,7 @@ #include #include "../rtengine/rtengine.h" +#include #define STARTUPDIR_CURRENT 0 #define STARTUPDIR_HOME 1 @@ -73,6 +74,16 @@ enum prevdemo_t {PD_Sidecar = 1, PD_Fast = 0}; class Options { +public: + class Error: public std::exception { + public: + Error(const Glib::ustring &msg): msg_(msg) {} + const char *what() const throw() { return msg_.c_str(); } + const Glib::ustring &get_msg() const throw() { return msg_; } + + private: + Glib::ustring msg_; + }; private: bool defProfRawMissing; @@ -325,10 +336,10 @@ public: Options* copyFrom (Options* other); void filterOutParsedExtensions (); void setDefaults (); - int readFromFile (Glib::ustring fname); - int saveToFile (Glib::ustring fname); - static bool load (bool lightweight = false); - static void save (); + void readFromFile(Glib::ustring fname); + void saveToFile(Glib::ustring fname); + static void load(bool lightweight = false); + static void save(); // if multiUser=false, send back the global profile path Glib::ustring getPreferredProfilePath(); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index d211add4f..d9e016ae9 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -2066,7 +2066,12 @@ void Preferences::okPressed () workflowUpdate(); options.copyFrom (&moptions); options.filterOutParsedExtensions(); - Options::save (); + try { + Options::save (); + } catch (Options::Error &e) { + Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + msgd.run(); + } dynProfilePanel->save(); hide (); } diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index c51d1b7f0..c08781331 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -673,7 +673,12 @@ bool RTWindow::on_delete_event(GdkEventAny* event) options.windowMonitor = get_screen()->get_monitor_at_window(get_window()); - Options::save (); + try { + Options::save (); + } catch (Options::Error &e) { + Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + msgd.run(); + } hide(); on_delete_has_run = true; From 7dd435b4ff09f227465729325eb8798db5411969 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:34:36 +0200 Subject: [PATCH 002/126] Update TooWaBlue-Bright-GTK3-20_.css --- rtdata/themes/TooWaBlue-Bright-GTK3-20_.css | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css b/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css index 14f2e3002..888533053 100644 --- a/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css @@ -31,19 +31,19 @@ @define-color bg-highlighted-text-color rgb(43,119,196); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ @define-color highlighted-text-color rgb(255,255,255); /*** Highlighted text color * Default: rgb(210,210,210) ***/ -@define-color bg-image rgb(90,90,90); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ +@define-color bg-image rgb(95,95,95); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ @define-color accent-color2 rgb(43,119,196); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ -@define-color accent-color4 rgb(128,128,128); /*** Slider knob * Default: rgb(115,115,115) ***/ +@define-color accent-color4 rgb(135,135,135); /*** Slider knob * Default: rgb(115,115,115) ***/ @define-color accent-color3 rgb(43,119,196); /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/ @define-color text-hl-color3 rgb(255,255,255); /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/ /*** Change me end *****************************************************************************/ -@define-color bg-light-grey rgb(110,110,110); -@define-color bg-grey rgb(90,90,90); -@define-color bg-dark-grey rgb(50,50,50); +@define-color bg-light-grey rgb(115,115,115); +@define-color bg-grey rgb(95,95,95); +@define-color bg-dark-grey rgb(55,55,55); @define-color bg-button-hover rgba(0,0,0,.25); @define-color bg-button-active rgba(0,0,0,.60); @@ -58,12 +58,15 @@ @define-color text-color rgb(210,210,210); @define-color text-tbEntry rgb(230,230,230); @define-color border-color rgba(255,255,255,.35); -@define-color bg-list-hover rgb(60,60,60); +@define-color bg-list-hover rgb(68,68,68); @define-color bg-scale-entry rgba(0,0,0,.14); -@define-color bg-button-border rgba(0,0,0,.60); +@define-color bg-button-border rgba(0,0,0,.5); @define-color bg-entry-border rgba(0,0,0,.40); @define-color view-grid-border rgba(255,255,255,0.25); @define-color headline-big rgb(210,210,210); @define-color headline-hl rgb(255,255,255); @define-color headline-frame rgb(245,245,245); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(145,145,145); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.3); /***********************************************************************************************/ From f0432666336c21439b68453d74a91ed7b45252e4 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:35:44 +0200 Subject: [PATCH 003/126] Update TooWaBlue-Dark-GTK3-20_.css --- rtdata/themes/TooWaBlue-Dark-GTK3-20_.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css b/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css index f1a42bfa4..23e32e1ec 100644 --- a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css @@ -43,7 +43,7 @@ @define-color bg-light-grey rgb(75,75,75); @define-color bg-grey rgb(58,58,58); -@define-color bg-dark-grey rgb(36,36,36); +@define-color bg-dark-grey rgb(30,30,30); @define-color bg-button-hover rgba(0,0,0,.3); @define-color bg-button-active rgba(0,0,0,.7); @@ -66,4 +66,7 @@ @define-color headline-big rgb(187,187,187); @define-color headline-hl rgb(215,215,215); @define-color headline-frame rgb(210,210,210); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(128,128,128); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.35); /***********************************************************************************************/ From 6be10fb314f0ca2617e7964c1eef2357324a680a Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:37:21 +0200 Subject: [PATCH 004/126] Update TooWaBlue-GTK3-20_.css Version 2.53 --- rtdata/themes/TooWaBlue-GTK3-20_.css | 33 ++++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 28c3b971a..e009c6d9a 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2017 TooWaBoo - Version 2.51 - requires RT 5.0 (Gtk+ >= 3.20) + Version 2.53 - requires RT 5.0 (Gtk+ >= 3.20) RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ @define-color bg-highlighted-text-color rgb(35,99,166); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ @define-color highlighted-text-color rgb(210,210,210); /*** Highlighted text color * Default: rgb(210,210,210) ***/ -@define-color bg-image rgb(70,70,70); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ +@define-color bg-image rgb(75,75,75); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ @define-color accent-color2 rgb(35,99,166); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ @define-color accent-color4 rgb(115,115,115); /*** Slider knob * Default: rgb(115,115,115) ***/ @@ -36,9 +36,9 @@ /*** Change me end *****************************************************************************/ -@define-color bg-light-grey rgb(90,90,90); -@define-color bg-grey rgb(70,70,70); -@define-color bg-dark-grey rgb(36,36,36); +@define-color bg-light-grey rgb(95,95,95); +@define-color bg-grey rgb(75,75,75); +@define-color bg-dark-grey rgb(40,40,40); @define-color bg-button-hover rgba(0,0,0,.25); @define-color bg-button-active rgba(0,0,0,.60); @@ -47,8 +47,8 @@ @define-color winTitle rgb(190,190,190); @define-color bg-tooltip rgb(185,185,185); -@define-color border-tooltip rgb(36,36,36); -@define-color text-tooltip rgb(36,36,36); +@define-color border-tooltip rgb(40,40,40); +@define-color text-tooltip rgb(40,40,40); /***********************************************/ @define-color text-color rgb(186,186,186); @define-color text-tbEntry rgb(192,192,192); @@ -61,6 +61,9 @@ @define-color headline-big rgb(195,195,195); @define-color headline-hl rgb(230,230,230); @define-color headline-frame rgb(215,215,215); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(128,128,128); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.33); /***********************************************************************************************/ * { @@ -72,7 +75,7 @@ } *:disabled { - color: rgb(128,128,128); + color: @fg-disabled; } #ToolPanelNotebook { @@ -422,6 +425,7 @@ paned.horizontal > separator { } paned.vertical > separator { + background-image: image(@bg-dark-grey); background-color: @bg-light-grey; min-height: 0.5em; border-top: 1px solid @bg-light-grey; @@ -594,7 +598,7 @@ scale slider { margin: calc(-0.33334em - 1px); border-radius: 0.83334em; background-image: linear-gradient(to bottom, shade (@accent-color4,1.15), shade (@accent-color4,.85)); - border: 0.08334em solid @bg-dark-grey; + border: 0.08334em solid @bg-button-border; box-shadow: none; } scale slider:hover { @@ -604,13 +608,13 @@ scale slider:hover { scale trough { margin: 0.5em; /* has to be half of "scale slider / min-width min-height*/ background-color: @bg-scale-entry; - border: 0.08334em solid @bg-dark-grey; + border: 0.08334em solid @bg-button-border; box-shadow: inset 0 0.08334em rgba(255, 255, 255, 0.11), 0 0.08334em rgba(242, 242, 242, 0.11); border-radius: 0.5em; } scale:not(:disabled) trough highlight { background-color: @accent-color2; - border: 0.08334em solid @bg-dark-grey; + border: 0.08334em solid @bg-button-border; box-shadow: inset 0 0.08334em shade(@accent-color2, 1.3); border-radius: 0.5em; } @@ -1639,7 +1643,7 @@ radiobutton { check, radio { - border: calc(0.083334em + 0.18px) solid shade(@text-color, .9); + border: calc(0.083334em + 0.18px) solid @text-color; background-image: none; background-color: transparent; margin: 0; @@ -1649,6 +1653,7 @@ radio { box-shadow: none; background-repeat: no-repeat; -gtk-icon-shadow: none; + color: @text-color; } radiobutton label, checkbutton label { @@ -1664,7 +1669,7 @@ radio{ } check:disabled, radio:disabled { - border-color: rgb(120,120,120); + border-color: @fg-disabled; } frame > checkbutton check{ @@ -1717,7 +1722,7 @@ spinbutton { min-width: 0; border-top-left-radius: 1.83334em; border-bottom-left-radius: 1.83334em; - background-color: shade(@bg-grey, 1.33); + background-color: @bg-tb-spinbutton; border: 0.08334em solid @bg-button-border; color: @text-tbEntry; box-shadow: inset 0.08334em 0.08334em rgba(0, 0, 0, .12), 0 0.08334em rgba(255, 255, 255, 0.12); From 9eb19bcc3c54bd0f32cb8749b1483da97446c2d3 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:39:33 +0200 Subject: [PATCH 005/126] Create TooWaGrey-ExtraBright-GTK3-20_.css --- .../themes/TooWaGrey-ExtraBright-GTK3-20_.css | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css diff --git a/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css b/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css new file mode 100644 index 000000000..98ec912b1 --- /dev/null +++ b/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css @@ -0,0 +1,72 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2016-2017 TooWaBoo + Requires RT 5.0 (Gtk+ >= 3.20) + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + 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 . +*/ + + +/*****************************************/ +/**/ @import "TooWaBlue-GTK3-20_.css"; /**/ +/*****************************************/ + +/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/ + +@define-color accent-color rgb(110,110,110); /*** Active color for Lists, Menu, Borders ... * Default: rgb(35,99,166) ***/ +@define-color text-hl-color rgb(255,255,255); /*** Active text color * Default: rgb(210,210,210) ***/ + +@define-color bg-highlighted-text-color rgb(49,132,220); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ +@define-color highlighted-text-color rgb(255,255,255); /*** Highlighted text color * Default: rgb(210,210,210) ***/ + +@define-color bg-image rgb(120,120,120); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ + +@define-color accent-color2 rgb(49,132,220); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ +@define-color accent-color4 rgb(155,155,155); /*** Slider knob * Default: rgb(115,115,115) ***/ + +@define-color accent-color3 rgb(85,85,85); /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/ +@define-color text-hl-color3 rgb(230,230,230); /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/ + +/*** Change me end *****************************************************************************/ + +@define-color bg-light-grey rgb(135,135,135); +@define-color bg-grey rgb(120,120,120); +@define-color bg-dark-grey rgb(85,85,85); + +@define-color bg-button-hover rgba(0,0,0,.15); +@define-color bg-button-active rgba(0,0,0,.5); + +@define-color winHeaderbar rgb(75,75,75); +@define-color winTitle rgb(210,210,210); + +@define-color bg-tooltip rgb(210,210,210); +@define-color border-tooltip rgb(50,50,50); +@define-color text-tooltip rgb(50,50,50); +/***********************************************/ +@define-color text-color rgb(230,230,230); +@define-color text-tbEntry rgb(245,245,245); +@define-color border-color rgba(255,255,255,.35); +@define-color bg-list-hover rgb(95,95,95); +@define-color bg-scale-entry rgba(0,0,0,.14); +@define-color bg-button-border rgba(0,0,0,.45); +@define-color bg-entry-border rgba(0,0,0,.40); +@define-color view-grid-border rgba(255,255,255,0.25); +@define-color headline-big rgb(210,210,210); +@define-color headline-hl rgb(255,255,255); +@define-color headline-frame rgb(245,245,245); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(180,180,180); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.20); +/***********************************************************************************************/ From 0ffbc5251eed3ac5371b75fcea57b7d327a52a0e Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 10 Aug 2017 14:20:00 +0200 Subject: [PATCH 006/126] Add CAT02 viewing conditions --- rtengine/ciecam02.cc | 13 +- rtengine/ciecam02.h | 2 +- rtengine/dcrop.cc | 396 +++++++++++++++++----------------- rtengine/improccoordinator.cc | 6 +- rtengine/improcfun.cc | 9 +- rtengine/improcfun.h | 2 +- rtengine/procevents.h | 2 + rtengine/procparams.cc | 28 +++ rtengine/procparams.h | 2 + rtengine/refreshmap.cc | 4 +- rtengine/rtengine.h | 2 +- rtengine/rtthumbnail.cc | 4 +- rtengine/simpleprocess.cc | 8 +- rtgui/colorappearance.cc | 52 ++++- rtgui/colorappearance.h | 6 +- rtgui/paramsedited.cc | 12 ++ rtgui/paramsedited.h | 2 + 17 files changed, 336 insertions(+), 214 deletions(-) diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index 08a9b3145..c9053f8bd 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -728,6 +728,8 @@ void Ciecam02::initcam2(double gamu, double yb, double f, double la, double xw, double &cz, double &aw, double &fl) { n = yb / yw; + + d = d_factor( f, la ); fl = calculate_fl_from_la_ciecam02( la ); nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); @@ -742,11 +744,18 @@ void Ciecam02::initcam2(double gamu, double yb, double f, double la, double xw, #endif } -void Ciecam02::initcam2float(float gamu, float yb, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, +void Ciecam02::initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, float &cz, float &aw, float &fl) { n = yb / yw; - d = d_factorfloat( f, la ); + + if (pilotd == 2.0) { + d = d_factorfloat( f, la ); + } else { + d = pilotd; + } + + // d = d_factorfloat( f, la ); fl = calculate_fl_from_la_ciecam02float( la ); nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); cz = 1.48f + sqrt( n ); diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index a551b2504..2e6e18295 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -108,7 +108,7 @@ public: static void initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); - static void initcam2float(float gamu, float yb, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + static void initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, float &cz, float &aw, float &fl); static void xyz2jchqms_ciecam02( double &J, double &C, double &h, diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 53813f6e4..f4fc7f734 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -26,12 +26,12 @@ namespace { - // "ceil" rounding - template - constexpr T skips(T a, T b) - { - return a / b + static_cast(a % b); - } +// "ceil" rounding +template +constexpr T skips (T a, T b) +{ + return a / b + static_cast (a % b); +} } @@ -41,15 +41,15 @@ namespace rtengine extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) - : PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), - cropImg(nullptr), cbuf_real(nullptr), cshmap(nullptr), transCrop(nullptr), cieCrop(nullptr), cbuffer(nullptr), - updating(false), newUpdatePending(false), skip(10), - cropx(0), cropy(0), cropw(-1), croph(-1), - trafx(0), trafy(0), trafw(-1), trafh(-1), - rqcropx(0), rqcropy(0), rqcropw(-1), rqcroph(-1), - borderRequested(32), upperBorder(0), leftBorder(0), - cropAllocated(false), - cropImageListener(nullptr), parent(parent), isDetailWindow(isDetailWindow) + : PipetteBuffer (editDataProvider), origCrop (nullptr), laboCrop (nullptr), labnCrop (nullptr), + cropImg (nullptr), cbuf_real (nullptr), cshmap (nullptr), transCrop (nullptr), cieCrop (nullptr), cbuffer (nullptr), + updating (false), newUpdatePending (false), skip (10), + cropx (0), cropy (0), cropw (-1), croph (-1), + trafx (0), trafy (0), trafw (-1), trafh (-1), + rqcropx (0), rqcropy (0), rqcropw (-1), rqcroph (-1), + borderRequested (32), upperBorder (0), leftBorder (0), + cropAllocated (false), + cropImageListener (nullptr), parent (parent), isDetailWindow (isDetailWindow) { parent->crops.push_back (this); } @@ -57,7 +57,7 @@ Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool Crop::~Crop () { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); std::vector::iterator i = std::find (parent->crops.begin(), parent->crops.end(), this); @@ -65,14 +65,14 @@ Crop::~Crop () parent->crops.erase (i); } - MyMutex::MyLock processingLock(parent->mProcessing); + MyMutex::MyLock processingLock (parent->mProcessing); freeAll (); } void Crop::destroy () { - MyMutex::MyLock lock(cropMutex); - MyMutex::MyLock processingLock(parent->mProcessing); + MyMutex::MyLock lock (cropMutex); + MyMutex::MyLock processingLock (parent->mProcessing); freeAll(); } @@ -80,7 +80,7 @@ void Crop::setListener (DetailedCropListener* il) { // We can make reads in the IF, because the mProcessing lock is only needed for change if (cropImageListener != il) { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); cropImageListener = il; } } @@ -95,9 +95,9 @@ EditUniqueID Crop::getCurrEditID() * Delete the edit image buffer if there's no subscriber anymore. * If allocation has to be done, it is deferred to Crop::update */ -void Crop::setEditSubscriber(EditSubscriber* newSubscriber) +void Crop::setEditSubscriber (EditSubscriber* newSubscriber) { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); // At this point, editCrop.dataProvider->currSubscriber is the old subscriber EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; @@ -123,13 +123,13 @@ void Crop::setEditSubscriber(EditSubscriber* newSubscriber) bool Crop::hasListener() { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); return cropImageListener; } void Crop::update (int todo) { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); ProcParams& params = parent->params; // CropGUIListener* cropgl; @@ -169,9 +169,9 @@ void Crop::update (int todo) bool needstransform = parent->ipf.needsTransform(); if (todo & (M_INIT | M_LINDENOISE)) { - MyMutex::MyLock lock(parent->minit); // Also used in improccoord + MyMutex::MyLock lock (parent->minit); // Also used in improccoord - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); if (!needsinitupdate) { setCropSizes (rqcropx, rqcropy, rqcropw, rqcroph, skip, true); @@ -186,17 +186,17 @@ void Crop::update (int todo) float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// - params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); + params.dirpyrDenoise.getCurves (noiseLCurve, noiseCCurve); int tilesize; int overlap; - if(settings->leveldnti == 0) { + if (settings->leveldnti == 0) { tilesize = 1024; overlap = 128; } - if(settings->leveldnti == 1) { + if (settings->leveldnti == 1) { tilesize = 768; overlap = 96; } @@ -217,35 +217,35 @@ void Crop::update (int todo) int *centerTile_X = new int [numtiles_W]; int *centerTile_Y = new int [numtiles_H]; - for(int cX = 0; cX < numtiles_W; cX++) { + for (int cX = 0; cX < numtiles_W; cX++) { centerTile_X[cX] = tileWskip / 2 + tileWskip * cX; } - for(int cY = 0; cY < numtiles_H; cY++) { + for (int cY = 0; cY < numtiles_H; cY++) { centerTile_Y[cY] = tileHskip / 2 + tileHskip * cY; } - if(settings->leveldnautsimpl == 1) { - if(params.dirpyrDenoise.Cmethod == "MAN" || params.dirpyrDenoise.Cmethod == "PON" ) { + if (settings->leveldnautsimpl == 1) { + if (params.dirpyrDenoise.Cmethod == "MAN" || params.dirpyrDenoise.Cmethod == "PON" ) { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); } } else { - if(params.dirpyrDenoise.C2method == "MANU") { + if (params.dirpyrDenoise.C2method == "MANU") { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); } } - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PRE") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "PREV")) { + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PRE") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "PREV")) { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); - if((!isDetailWindow) && parent->adnListener && skip == 1 && params.dirpyrDenoise.enabled) { + if ((!isDetailWindow) && parent->adnListener && skip == 1 && params.dirpyrDenoise.enabled) { float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } @@ -256,16 +256,16 @@ void Crop::update (int todo) int poscenterX = 0; int poscenterY = 0; - for(int cc = 0; cc < numtiles_W; cc++) { - if(abs(centerTile_X[cc] - CenterPreview_X) < minimuX) { - minimuX = abs(centerTile_X[cc] - CenterPreview_X); + for (int cc = 0; cc < numtiles_W; cc++) { + if (abs (centerTile_X[cc] - CenterPreview_X) < minimuX) { + minimuX = abs (centerTile_X[cc] - CenterPreview_X); poscenterX = cc; } } - for(int cc = 0; cc < numtiles_H; cc++) { - if(abs(centerTile_Y[cc] - CenterPreview_Y) < minimuY) { - minimuY = abs(centerTile_Y[cc] - CenterPreview_Y); + for (int cc = 0; cc < numtiles_H; cc++) { + if (abs (centerTile_Y[cc] - CenterPreview_Y) < minimuY) { + minimuY = abs (centerTile_Y[cc] - CenterPreview_Y); poscenterY = cc; } } @@ -273,20 +273,20 @@ void Crop::update (int todo) // printf("TileCX=%d TileCY=%d prevX=%d prevY=%d \n",centerTile_X[poscenterX],centerTile_Y[poscenterY],CenterPreview_X,CenterPreview_Y); int crW; - if(settings->leveldnv == 0) { + if (settings->leveldnv == 0) { crW = 100; } - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int((tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); } - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; } @@ -308,7 +308,7 @@ void Crop::update (int todo) adjustr = 1.f / 1.2f; } - if(parent->adnListener) { + if (parent->adnListener) { parent->adnListener->noiseTilePrev (centerTile_X[poscenterX], centerTile_Y[poscenterY], CenterPreview_X, CenterPreview_Y, crW, trafw * skip); } @@ -325,15 +325,15 @@ void Crop::update (int todo) int H = origCrop->getHeight(); Imagefloat *provicalc = new Imagefloat ((W + 1) / 2, (H + 1) / 2); //for denoise curves - for(int ii = 0; ii < H; ii += 2) { - for(int jj = 0; jj < W; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCrop->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCrop->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCrop->b(ii, jj); + for (int ii = 0; ii < H; ii += 2) { + for (int jj = 0; jj < W; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCrop->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCrop->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCrop->b (ii, jj); } } - parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (provicalc, params.icm, parent->currWB); //for denoise luminance curve float maxr = 0.f; float maxb = 0.f; @@ -347,19 +347,19 @@ void Crop::update (int todo) maxblueaut = 0.f; minredaut = 0.f; minblueaut = 0.f; - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); - parent->ipf.RGB_denoise_info(origCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); + parent->ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + parent->ipf.RGB_denoise_info (origCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); // printf("redy=%f skin=%f pcskin=%f\n",redyel, skinc,nsknc); // printf("DCROP skip=%d cha=%4.0f Nb=%d red=%4.0f bl=%4.0f redM=%4.0f bluM=%4.0f L=%4.0f sigL=%4.0f Ch=%4.0f Si=%4.0f\n",skip, chaut,Nb, redaut,blueaut, maxredaut, maxblueaut, lumema, sigma_L, chromina, sigma); float multip = 1.f; - if(!parent->imgsrc->isRAW()) { + if (!parent->imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good for gamma=1 } - float maxmax = max(maxredaut, maxblueaut); + float maxmax = max (maxredaut, maxblueaut); float delta; int mode = 0; // float redyel, skinc, nsknc; @@ -367,18 +367,18 @@ void Crop::update (int todo) parent->ipf.calcautodn_info (chaut, delta, Nb, levaut, maxmax, lumema, chromina, mode, lissage, redyel, skinc, nsknc); - if(maxredaut > maxblueaut) { + if (maxredaut > maxblueaut) { // maxr=(maxredaut-chaut)/((autoNRmax*multip*adjustr)/2.f); maxr = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minblueaut <= minredaut && minblueaut < chaut) { + if (minblueaut <= minredaut && minblueaut < chaut) { maxb = (-chaut + minblueaut) / (autoNRmax * multip * adjustr * lowdenoise); } } else { // maxb=(maxblueaut-chaut)/((autoNRmax*multip*adjustr)/2.f); maxb = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minredaut <= minblueaut && minredaut < chaut) { + if (minredaut <= minblueaut && minredaut < chaut) { maxr = (-chaut + minredaut) / (autoNRmax * multip * adjustr * lowdenoise); } }//maxb mxr - empirical evaluation red / blue @@ -387,31 +387,31 @@ void Crop::update (int todo) params.dirpyrDenoise.chroma = chaut / (autoNR * multip * adjustr * lowdenoise); params.dirpyrDenoise.redchro = maxr; params.dirpyrDenoise.bluechro = maxb; - parent->adnListener->chromaChanged(params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); + parent->adnListener->chromaChanged (params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); delete provicalc; } } - if(skip == 1 && params.dirpyrDenoise.enabled && !parent->denoiseInfoStore.valid && ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO"))) { + if (skip == 1 && params.dirpyrDenoise.enabled && !parent->denoiseInfoStore.valid && ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO"))) { MyTime t1aue, t2aue; t1aue.set(); int crW = 100; // settings->leveldnv == 0 int crH = 100; // settings->leveldnv == 0 - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; crH = 250; } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int((tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); } - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; crH = tileHskip - 10; } @@ -419,13 +419,13 @@ void Crop::update (int todo) float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + parent->ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); int Nb[9]; #ifdef _OPENMP #pragma omp parallel @@ -448,26 +448,26 @@ void Crop::update (int todo) #pragma omp for schedule(dynamic) collapse(2) nowait #endif - for(int wcr = 0; wcr <= 2; wcr++) { - for(int hcr = 0; hcr <= 2; hcr++) { - PreviewProps ppP (coordW[wcr] , coordH[hcr], crW, crH, 1); + for (int wcr = 0; wcr <= 2; wcr++) { + for (int hcr = 0; hcr <= 2; hcr++) { + PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1); parent->imgsrc->getImage (parent->currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw ); // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); } } - parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (provicalc, params.icm, parent->currWB); //for denoise luminance curve float pondcorrec = 1.0f; float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; int nb = 0; - parent->ipf.RGB_denoise_info(origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + parent->ipf.RGB_denoise_info (origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); //printf("DCROP skip=%d cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f\n",skip, chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema); Nb[hcr * 3 + wcr] = nb; @@ -506,7 +506,7 @@ void Crop::update (int todo) float multip = 1.f; - if(!parent->imgsrc->isRAW()) { + if (!parent->imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 } @@ -533,15 +533,15 @@ void Crop::update (int todo) int lissage = settings->leveldnliss; for (int k = 0; k < 9; k++) { - float maxmax = max(parent->denoiseInfoStore.max_r[k], parent->denoiseInfoStore.max_b[k]); + float maxmax = max (parent->denoiseInfoStore.max_r[k], parent->denoiseInfoStore.max_b[k]); parent->ipf.calcautodn_info (parent->denoiseInfoStore.ch_M[k], delta[k], Nb[k], levaut, maxmax, lumL[k], chromC[k], mode, lissage, ry[k], sk[k], pcsk[k]); // printf("ch_M=%f delta=%f\n",ch_M[k], delta[k]); } for (int k = 0; k < 9; k++) { - if(parent->denoiseInfoStore.max_r[k] > parent->denoiseInfoStore.max_b[k]) { + if (parent->denoiseInfoStore.max_r[k] > parent->denoiseInfoStore.max_b[k]) { Max_R[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - Min_B[k] = -(parent->denoiseInfoStore.ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); + Min_B[k] = - (parent->denoiseInfoStore.ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); Max_B[k] = 0.f; Min_R[k] = 0.f; } else { @@ -560,19 +560,19 @@ void Crop::update (int todo) MinRMoy += Min_R[k]; MinBMoy += Min_B[k]; - if(Max_R[k] > MaxR) { + if (Max_R[k] > MaxR) { MaxR = Max_R[k]; } - if(Max_B[k] > MaxB) { + if (Max_B[k] > MaxB) { MaxB = Max_B[k]; } - if(Min_R[k] < MinR) { + if (Min_R[k] < MinR) { MinR = Min_R[k]; } - if(Min_B[k] < MinB) { + if (Min_B[k] < MinB) { MinB = Min_B[k]; } } @@ -583,7 +583,7 @@ void Crop::update (int todo) MinBMoy /= 9; MinRMoy /= 9; - if(MaxR > MaxB) { + if (MaxR > MaxB) { maxr = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev //maxb=MinB; maxb = MinBMoy + (MinB - MinBMoy) * 0.66f; @@ -597,55 +597,56 @@ void Crop::update (int todo) params.dirpyrDenoise.redchro = maxr; params.dirpyrDenoise.bluechro = maxb; parent->denoiseInfoStore.valid = true; - if(parent->adnListener) { - parent->adnListener->chromaChanged(params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); + + if (parent->adnListener) { + parent->adnListener->chromaChanged (params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); } if (settings->verbose) { t2aue.set(); - printf("Info denoise auto performed in %d usec:\n", t2aue.etime(t1aue)); + printf ("Info denoise auto performed in %d usec:\n", t2aue.etime (t1aue)); } //end evaluate noise } // if(params.dirpyrDenoise.Cmethod=="AUT" || params.dirpyrDenoise.Cmethod=="PON") {//reinit origCrop after Auto - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { //reinit origCrop after Auto + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { //reinit origCrop after Auto PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); } DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; - if(params.dirpyrDenoise.Lmethod == "CUR") { - if(noiseLCurve) { + if (params.dirpyrDenoise.Lmethod == "CUR") { + if (noiseLCurve) { denoiseParams.luma = 0.5f; //very small value to init process - select curve or slider } else { denoiseParams.luma = 0.0f; } - } else if(denoiseParams.Lmethod == "SLI") { + } else if (denoiseParams.Lmethod == "SLI") { noiseLCurve.Reset(); } - if((noiseLCurve || noiseCCurve ) && skip == 1 && denoiseParams.enabled) { //only allocate memory if enabled and skip + if ((noiseLCurve || noiseCCurve ) && skip == 1 && denoiseParams.enabled) { //only allocate memory if enabled and skip // we only need image reduced to 1/4 here int W = origCrop->getWidth(); int H = origCrop->getHeight(); calclum = new Imagefloat ((W + 1) / 2, (H + 1) / 2); //for denoise curves - for(int ii = 0; ii < H; ii += 2) { - for(int jj = 0; jj < W; jj += 2) { - calclum->r(ii >> 1, jj >> 1) = origCrop->r(ii, jj); - calclum->g(ii >> 1, jj >> 1) = origCrop->g(ii, jj); - calclum->b(ii >> 1, jj >> 1) = origCrop->b(ii, jj); + for (int ii = 0; ii < H; ii += 2) { + for (int jj = 0; jj < W; jj += 2) { + calclum->r (ii >> 1, jj >> 1) = origCrop->r (ii, jj); + calclum->g (ii >> 1, jj >> 1) = origCrop->g (ii, jj); + calclum->b (ii >> 1, jj >> 1) = origCrop->b (ii, jj); } } - parent->imgsrc->convertColorSpace(calclum, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (calclum, params.icm, parent->currWB); //for denoise luminance curve } - if(skip != 1) if(parent->adnListener) { - parent->adnListener->noiseChanged(0.f, 0.f); + if (skip != 1) if (parent->adnListener) { + parent->adnListener->noiseChanged (0.f, 0.f); } if (todo & M_LINDENOISE) { @@ -653,26 +654,26 @@ void Crop::update (int todo) int kall = 0; float chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi; - parent->ipf.RGB_denoise(kall, origCrop, origCrop, calclum, parent->denoiseInfoStore.ch_M, parent->denoiseInfoStore.max_r, parent->denoiseInfoStore.max_b, parent->imgsrc->isRAW(), /*Roffset,*/ denoiseParams, parent->imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); + parent->ipf.RGB_denoise (kall, origCrop, origCrop, calclum, parent->denoiseInfoStore.ch_M, parent->denoiseInfoStore.max_r, parent->denoiseInfoStore.max_b, parent->imgsrc->isRAW(), /*Roffset,*/ denoiseParams, parent->imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); if (parent->adnListener) { - parent->adnListener->noiseChanged(nresi, highresi); + parent->adnListener->noiseChanged (nresi, highresi); } if (settings->leveldnautsimpl == 1) { if ((denoiseParams.Cmethod == "AUT" || denoiseParams.Cmethod == "PRE") && (parent->adnListener)) { // force display value of sliders - parent->adnListener->chromaChanged(denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); + parent->adnListener->chromaChanged (denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); } } else { - if((denoiseParams.C2method == "AUTO" || denoiseParams.C2method == "PREV") && (parent->adnListener)) { // force display value of sliders - parent->adnListener->chromaChanged(denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); + if ((denoiseParams.C2method == "AUTO" || denoiseParams.C2method == "PREV") && (parent->adnListener)) { // force display value of sliders + parent->adnListener->chromaChanged (denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); } } } } - parent->imgsrc->convertColorSpace(origCrop, params.icm, parent->currWB); + parent->imgsrc->convertColorSpace (origCrop, params.icm, parent->currWB); delete [] min_r; delete [] min_b; @@ -687,7 +688,7 @@ void Crop::update (int todo) } // has to be called after setCropSizes! Tools prior to this point can't handle the Edit mechanism, but that shouldn't be a problem. - createBuffer(cropw, croph); + createBuffer (cropw, croph); // transform if (needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) { @@ -696,13 +697,14 @@ void Crop::update (int todo) } if (needstransform) - parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, skips(parent->fw, skip), skips(parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), + parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, skips (parent->fw, skip), skips (parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), parent->imgsrc->getMetaData()->getFocusDist(), parent->imgsrc->getMetaData()->getFNumber(), parent->imgsrc->getRotateDegree(), false); - else - baseCrop->copyData(transCrop); + else { + baseCrop->copyData (transCrop); + } if (transCrop) { baseCrop = transCrop; @@ -719,29 +721,29 @@ void Crop::update (int todo) const int W = baseCrop->getWidth(); const int H = baseCrop->getHeight(); - LabImage labcbdl(W, H); - parent->ipf.rgb2lab(*baseCrop, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + parent->ipf.rgb2lab (*baseCrop, labcbdl, params.icm.working); parent->ipf.dirpyrequalizer (&labcbdl, skip); - parent->ipf.lab2rgb(labcbdl, *baseCrop, params.icm.working); + parent->ipf.lab2rgb (labcbdl, *baseCrop, params.icm.working); } // blurmap for shadow & highlights if ((todo & M_BLURMAP) && params.sh.enabled) { - double radius = sqrt (double(skips(parent->fw, skip) * skips(parent->fw, skip) + skips(parent->fh, skip) * skips(parent->fh, skip))) / 2.0; + double radius = sqrt (double (skips (parent->fw, skip) * skips (parent->fw, skip) + skips (parent->fh, skip) * skips (parent->fh, skip))) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { shradius *= radius / 1800.0; } - if(!cshmap) { + if (!cshmap) { cshmap = new SHMap (cropw, croph, true); } cshmap->update (baseCrop, shradius, parent->ipf.lumimul, params.sh.hq, skip); - if(parent->shmap->min_f < 65535.f) { // don't call forceStat with wrong values + if (parent->shmap->min_f < 65535.f) { // don't call forceStat with wrong values cshmap->forceStat (parent->shmap->max_f, parent->shmap->min_f, parent->shmap->avg); } } @@ -763,11 +765,11 @@ void Crop::update (int todo) if (todo & M_RGBCURVE) { double rrm, ggm, bbm; DCPProfile::ApplyState as; - DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, parent->currWB, as); + DCPProfile *dcpProf = parent->imgsrc->getDCP (params.icm, parent->currWB, as); LUTu histToneCurve; parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, - params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit , parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, + params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit, parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm, parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve); } @@ -791,7 +793,7 @@ void Crop::update (int todo) // apply luminance operations if (todo & (M_LUMINANCE + M_COLOR)) { //I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here. - labnCrop->CopyFrom(laboCrop); + labnCrop->CopyFrom (laboCrop); //parent->ipf.luminanceCurve (labnCrop, labnCrop, parent->lumacurve); @@ -808,24 +810,24 @@ void Crop::update (int todo) parent->ipf.chromiLuminanceCurve (this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); parent->ipf.vibrance (labnCrop); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - parent->ipf.EPDToneMap(labnCrop, 5, skip); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + parent->ipf.EPDToneMap (labnCrop, 5, skip); } //parent->ipf.EPDToneMap(labnCrop, 5, 1); //Go with much fewer than normal iterates for fast redisplay. // for all treatments Defringe, Sharpening, Contrast detail , Microcontrast they are activated if "CIECAM" function are disabled if (skip == 1) { - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { parent->ipf.impulsedenoise (labnCrop); } - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled) ) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled) ) { parent->ipf.defringe (labnCrop); } parent->ipf.MLsharpen (labnCrop); - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { parent->ipf.MLmicrocontrast (labnCrop); parent->ipf.sharpening (labnCrop, (float**)cbuffer, params.sharpening); } @@ -834,46 +836,46 @@ void Crop::update (int todo) // if (skip==1) { WaveletParams WaveParams = params.wavelet; - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled))) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled))) { parent->ipf.dirpyrequalizer (labnCrop, skip); // parent->ipf.Lanczoslab (labnCrop,labnCrop , 1.f/skip); } } int kall = 0; - int minwin = min(labnCrop->W, labnCrop->H); + int minwin = min (labnCrop->W, labnCrop->H); int maxlevelcrop = 10; // if(cp.mul[9]!=0)maxlevelcrop=10; // adap maximum level wavelet to size of crop - if(minwin * skip < 1024) { + if (minwin * skip < 1024) { maxlevelcrop = 9; //sampling wavelet 512 } - if(minwin * skip < 512) { + if (minwin * skip < 512) { maxlevelcrop = 8; //sampling wavelet 256 } - if(minwin * skip < 256) { + if (minwin * skip < 256) { maxlevelcrop = 7; //sampling 128 } - if(minwin * skip < 128) { + if (minwin * skip < 128) { maxlevelcrop = 6; } - if(minwin < 64) { + if (minwin < 64) { maxlevelcrop = 5; } int realtile; - if(params.wavelet.Tilesmethod == "big") { + if (params.wavelet.Tilesmethod == "big") { realtile = 22; } - if(params.wavelet.Tilesmethod == "lit") { + if (params.wavelet.Tilesmethod == "lit") { realtile = 12; } @@ -885,32 +887,32 @@ void Crop::update (int todo) parent->ipf.Tile_calc (tilesize, overlap, kall, labnCrop->W, labnCrop->H, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); //now we have tile dimensions, overlaps //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - int minsizetile = min(tilewidth, tileheight); + int minsizetile = min (tilewidth, tileheight); int maxlev2 = 10; - if(minsizetile < 1024 && maxlevelcrop == 10) { + if (minsizetile < 1024 && maxlevelcrop == 10) { maxlev2 = 9; } - if(minsizetile < 512) { + if (minsizetile < 512) { maxlev2 = 8; } - if(minsizetile < 256) { + if (minsizetile < 256) { maxlev2 = 7; } - if(minsizetile < 128) { + if (minsizetile < 128) { maxlev2 = 6; } - int maxL = min(maxlev2, maxlevelcrop); + int maxL = min (maxlev2, maxlevelcrop); - if(parent->awavListener) { - parent->awavListener->wavChanged(float(maxL)); + if (parent->awavListener) { + parent->awavListener->wavChanged (float (maxL)); } - if((params.wavelet.enabled)) { + if ((params.wavelet.enabled)) { WavCurve wavCLVCurve; WavOpacityCurveRG waOpacityCurveRG; WavOpacityCurveBY waOpacityCurveBY; @@ -919,35 +921,35 @@ void Crop::update (int todo) LUTf wavclCurve; LUTu dummy; - params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); + params.wavelet.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); - parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, wavcontlutili, skip); + parent->ipf.ip_wavelet (labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, wavcontlutili, skip); } // } // } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { float fnum = parent->imgsrc->getMetaData()->getFNumber (); // F number float fiso = parent->imgsrc->getMetaData()->getISOSpeed () ; // ISO float fspeed = parent->imgsrc->getMetaData()->getShutterSpeed () ; // Speed double fcomp = parent->imgsrc->getMetaData()->getExpComp (); // Compensation +/- double adap; // Scene's luminosity adaptation factor - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong adap = 2000.; } else { - double E_V = fcomp + log2 (double((fnum * fnum) / fspeed / (fiso / 100.f))); + double E_V = fcomp + log2 (double ((fnum * fnum) / fspeed / (fiso / 100.f))); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = pow(2., E_V - 3.); // cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = pow (2., E_V - 3.); // cd / m2 // end calculation adaptation scene luminosity } int begh = 0, endh = labnCrop->H; bool execsharp = false; - if(skip == 1) { + if (skip == 1) { execsharp = true; } @@ -955,10 +957,10 @@ void Crop::update (int todo) cieCrop = new CieImage (cropw, croph); } - if(settings->ciecamfloat) { - float d; // not used after this block - parent->ipf.ciecam_02float (cieCrop, float(adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, 1); + if (settings->ciecamfloat) { + float d, dj; // not used after this block + parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, 1); } else { double dd; // not used after this block @@ -1074,13 +1076,15 @@ void Crop::freeAll () } -namespace { +namespace +{ -bool check_need_larger_crop_for_lcp_distortion(int fw, int fh, int x, int y, int w, int h, const ProcParams ¶ms) +bool check_need_larger_crop_for_lcp_distortion (int fw, int fh, int x, int y, int w, int h, const ProcParams ¶ms) { if (x == 0 && y == 0 && w == fw && h == fh) { return false; } + return (params.lensProf.lcpFile.length() > 0 && params.lensProf.useDist); } @@ -1110,12 +1114,12 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte rqcroph = rch; // store and set requested crop size - int rqx1 = LIM(rqcropx, 0, parent->fullw - 1); - int rqy1 = LIM(rqcropy, 0, parent->fullh - 1); + int rqx1 = LIM (rqcropx, 0, parent->fullw - 1); + int rqy1 = LIM (rqcropy, 0, parent->fullh - 1); int rqx2 = rqx1 + rqcropw - 1; int rqy2 = rqy1 + rqcroph - 1; - rqx2 = LIM(rqx2, 0, parent->fullw - 1); - rqy2 = LIM(rqy2, 0, parent->fullh - 1); + rqx2 = LIM (rqx2, 0, parent->fullw - 1); + rqy2 = LIM (rqy2, 0, parent->fullh - 1); this->skip = skip; @@ -1125,10 +1129,10 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte int bx2 = rqx2 + skip * borderRequested; int by2 = rqy2 + skip * borderRequested; // clip it to fit into image area - bx1 = LIM(bx1, 0, parent->fullw - 1); - by1 = LIM(by1, 0, parent->fullh - 1); - bx2 = LIM(bx2, 0, parent->fullw - 1); - by2 = LIM(by2, 0, parent->fullh - 1); + bx1 = LIM (bx1, 0, parent->fullw - 1); + by1 = LIM (by1, 0, parent->fullh - 1); + bx2 = LIM (bx2, 0, parent->fullw - 1); + by2 = LIM (by2, 0, parent->fullh - 1); int bw = bx2 - bx1 + 1; int bh = by2 - by1 + 1; @@ -1142,34 +1146,39 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte parent->ipf.transCoord (parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh); - if (check_need_larger_crop_for_lcp_distortion(parent->fw, parent->fh, orx, ory, orw, orh, parent->params)) { + if (check_need_larger_crop_for_lcp_distortion (parent->fw, parent->fh, orx, ory, orw, orh, parent->params)) { // TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise - int dW = int(double(parent->fw) * 0.15 / (2 * skip)); - int dH = int(double(parent->fh) * 0.15 / (2 * skip)); + int dW = int (double (parent->fw) * 0.15 / (2 * skip)); + int dH = int (double (parent->fh) * 0.15 / (2 * skip)); int x1 = orx - dW; int x2 = orx + orw + dW; int y1 = ory - dH; int y2 = ory + orh + dH; + if (x1 < 0) { x2 += -x1; x1 = 0; } + if (x2 > parent->fw) { x1 -= x2 - parent->fw; x2 = parent->fw; } + if (y1 < 0) { y2 += -y1; y1 = 0; } + if (y2 > parent->fh) { y1 -= y2 - parent->fh; y2 = parent->fh; } - orx = max(x1, 0); - ory = max(y1, 0); - orw = min(x2 - x1, parent->fw - orx); - orh = min(y2 - y1, parent->fh - ory); + + orx = max (x1, 0); + ory = max (y1, 0); + orw = min (x2 - x1, parent->fw - orx); + orh = min (y2 - y1, parent->fh - ory); } @@ -1180,17 +1189,18 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte trafx = orx; trafy = ory; - int cw = skips(bw, skip); - int ch = skips(bh, skip); + int cw = skips (bw, skip); + int ch = skips (bh, skip); - leftBorder = skips(rqx1 - bx1, skip); - upperBorder = skips(rqy1 - by1, skip); + leftBorder = skips (rqx1 - bx1, skip); + upperBorder = skips (rqy1 - by1, skip); if (settings->verbose) { printf ("setsizes starts (%d, %d, %d, %d, %d, %d)\n", orW, orH, trafw, trafh, cw, ch); } EditType editType = ET_PIPETTE; + if (const auto editProvider = PipetteBuffer::getDataProvider ()) { if (const auto editSubscriber = editProvider->getCurrSubscriber ()) { editType = editSubscriber->getEditingType (); @@ -1208,11 +1218,11 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte origCrop = new Imagefloat; } - origCrop->allocate(trafw, trafh); // Resizing the buffer (optimization) + origCrop->allocate (trafw, trafh); // Resizing the buffer (optimization) // if transCrop doesn't exist yet, it'll be created where necessary if (transCrop) { - transCrop->allocate(cropw, croph); + transCrop->allocate (cropw, croph); } if (laboCrop) { @@ -1231,7 +1241,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte cropImg = new Image8; } - cropImg->allocate(cropw, croph); // Resizing the buffer (optimization) + cropImg->allocate (cropw, croph); // Resizing the buffer (optimization) //cieCrop is only used in Crop::update, it is destroyed now but will be allocated on first use if (cieCrop) { @@ -1253,18 +1263,18 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte } cbuffer = new float*[croph]; - cbuf_real = new float[(croph + 2)*cropw]; + cbuf_real = new float[ (croph + 2)*cropw]; for (int i = 0; i < croph; i++) { cbuffer[i] = cbuf_real + cropw * i + cropw; } - if(params.sh.enabled) { + if (params.sh.enabled) { cshmap = new SHMap (cropw, croph, true); } if (editType == ET_PIPETTE) { - PipetteBuffer::resize(cropw, croph); + PipetteBuffer::resize (cropw, croph); } else if (PipetteBuffer::bufferCreated()) { PipetteBuffer::flush(); } @@ -1352,19 +1362,19 @@ void Crop::fullUpdate () int Crop::get_skip() { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); return skip; } int Crop::getLeftBorder() { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); return leftBorder; } int Crop::getUpperBorder() { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); return upperBorder; } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index e7a611f0b..e3ee91540 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -746,7 +746,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) int begh = 0; int endh = pH; - float d; + float d, dj; bool execsharp = false; if(!ncie) { @@ -766,10 +766,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, 1); + ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, 1); if(params.colorappearance.autodegree && acListener && params.colorappearance.enabled) { - acListener->autoCamChanged(100.*(double)d); + acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); } if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b5e555a1f..d03ceca2c 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1468,7 +1468,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt) { if (params->colorappearance.enabled) { @@ -1630,6 +1630,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const float deg = (params->colorappearance.degree) / 100.0f; const float pilot = params->colorappearance.autodegree ? 2.0f : deg; + const float degout = (params->colorappearance.degreeout) / 100.0f; + const float pilotout = params->colorappearance.autodegreeout ? 2.0f : degout; + //algoritm's params float chr = 0.f; @@ -1860,8 +1863,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float cz, wh, pfl; Ciecam02::initcam1float (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); const float pow1 = pow_F ( 1.64f - pow_F ( 0.29f, n ), 0.73f ); - float nj, dj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2float (gamu, yb2, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + float nj, nbbj, ncbj, czj, awj, flj; + Ciecam02::initcam2float (gamu, yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); const float reccmcz = 1.f / (c2 * czj); const float pow1n = pow_F ( 1.64f - pow_F ( 0.29f, nj ), 0.73f ); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 9167af5be..6f8307141 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -226,7 +226,7 @@ public: void luminanceCurve (LabImage* lold, LabImage* lnew, LUTf &curve); void ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int rtt); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 9e515f55c..5070a9b0d 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -505,6 +505,8 @@ enum ProcEvent { EvCATtempout = 475, EvCATgreenout = 476, EvCATybout = 477, + EvCATDegreeout = 478, + EvCATAutoDegreeout = 479, NUMOFEVENTS diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 93571122f..a16703f5a 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1118,6 +1118,8 @@ void ProcParams::setDefaults () colorappearance.enabled = false; colorappearance.degree = 90; colorappearance.autodegree = true; + colorappearance.degreeout = 90; + colorappearance.autodegreeout = true; colorappearance.surround = "Average"; colorappearance.adaplum = 16; colorappearance.badpixsl = 0; @@ -2058,6 +2060,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Color appearance", "AutoDegree", colorappearance.autodegree); } + if (!pedited || pedited->colorappearance.degreeout) { + keyFile.set_integer ("Color appearance", "Degreeout", colorappearance.degreeout); + } + + if (!pedited || pedited->colorappearance.autodegreeout) { + keyFile.set_boolean ("Color appearance", "AutoDegreeout", colorappearance.autodegreeout); + } + if (!pedited || pedited->colorappearance.surround) { keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); } @@ -4937,6 +4947,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "Degreeout")) { + colorappearance.degreeout = keyFile.get_integer ("Color appearance", "Degreeout"); + + if (pedited) { + pedited->colorappearance.degreeout = true; + } + } + + if (keyFile.has_key ("Color appearance", "AutoDegreeout")) { + colorappearance.autodegreeout = keyFile.get_boolean ("Color appearance", "AutoDegreeout"); + + if (pedited) { + pedited->colorappearance.autodegreeout = true; + } + } + if (keyFile.has_key ("Color appearance", "Surround")) { colorappearance.surround = keyFile.get_string ("Color appearance", "Surround"); @@ -8211,6 +8237,8 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.enabled == other.colorappearance.enabled && colorappearance.degree == other.colorappearance.degree && colorappearance.autodegree == other.colorappearance.autodegree + && colorappearance.degreeout == other.colorappearance.degreeout + && colorappearance.autodegreeout == other.colorappearance.autodegreeout && colorappearance.surround == other.colorappearance.surround && colorappearance.adapscen == other.colorappearance.adapscen && colorappearance.autoadapscen == other.colorappearance.autoadapscen diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 39f6eeaee..1ee5d16df 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -585,6 +585,8 @@ public: bool enabled; int degree; bool autodegree; + int degreeout; + bool autodegreeout; std::vector curve; std::vector curve2; std::vector curve3; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index af3dfafae..0a345d8ac 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -504,7 +504,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { DEMOSAIC, // EvPixelShiftEqualBrightChannel LUMINANCECURVE, // EvCATtempout LUMINANCECURVE, // EvCATgreenout - LUMINANCECURVE // EvCATybout + LUMINANCECURVE, // EvCATybout + LUMINANCECURVE, // EvCATDegreeout + LUMINANCECURVE // EvCATAutoDegreeout }; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 6ab12c026..fb93f8715 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -273,7 +273,7 @@ class AutoCamListener { public : virtual ~AutoCamListener() {} - virtual void autoCamChanged (double ccam) {} + virtual void autoCamChanged (double ccam, double ccamout) {} virtual void adapCamChanged (double cadap) {} }; diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index fd06e940f..41e52a16e 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1260,7 +1260,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei 16); int begh = 0, endh = labView->H; bool execsharp = false; - float d; + float d, dj; float fnum = fnumber;// F number float fiso = iso;// ISO float fspeed = shutter;//speed @@ -1296,7 +1296,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei CAMMean = NAN; CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, rtt); + ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, rtt); delete cieView; } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 2c5d5a10e..cc70823ff 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1122,16 +1122,16 @@ private: if (params.sharpening.enabled) { if(settings->ciecamfloat) { - float d; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1); + float d, dj; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); } } else { if(settings->ciecamfloat) { - float d; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1); + float d, dj; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index af45d50b6..c01b7458f 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -450,6 +450,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Gtk::Image* iblueredL = Gtk::manage (new RTImage ("ajd-wb-bluered1.png")); // Gtk::Image* iblueredR = Gtk::manage (new RTImage ("ajd-wb-bluered2.png")); + degreeout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 100.)); + + if (degreeout->delay < options.adjusterMaxDelay) { + degreeout->delay = options.adjusterMaxDelay; + } + + degreeout->throwOnButtonRelease(); + degreeout->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); + degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); + p3VBox->pack_start (*degreeout); + tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 50, 1, 18)); @@ -514,6 +525,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surroundChanged) ); degree->setAdjusterListener (this); + degreeout->setAdjusterListener (this); adapscen->setAdjusterListener (this); adaplum->setAdjusterListener (this); badpixsl->setAdjusterListener (this); @@ -572,6 +584,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) if (pedited) { degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited); + degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); adaplum->setEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); @@ -595,6 +608,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_inconsistent (!pedited->colorappearance.sharpcie); degree->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegree); + degreeout->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegreeout); adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen); set_inconsistent (multiImage && !pedited->colorappearance.enabled); @@ -697,11 +711,14 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) lastAutoDegree = pp->colorappearance.autodegree; lastAutoAdapscen = pp->colorappearance.autoadapscen; + lastAutoDegreeout = pp->colorappearance.autodegreeout; degree->setValue (pp->colorappearance.degree); degree->setAutoValue (pp->colorappearance.autodegree); adapscen->setValue (pp->colorappearance.adapscen); adapscen->setAutoValue (pp->colorappearance.autoadapscen); + degreeout->setValue (pp->colorappearance.degreeout); + degreeout->setAutoValue (pp->colorappearance.autodegreeout); adaplum->setValue (pp->colorappearance.adaplum); badpixsl->setValue (pp->colorappearance.badpixsl); @@ -737,6 +754,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.degree = degree->getValue (); pp->colorappearance.autodegree = degree->getAutoValue (); + pp->colorappearance.degreeout = degreeout->getValue (); + pp->colorappearance.autodegreeout = degreeout->getAutoValue (); pp->colorappearance.enabled = getEnabled(); pp->colorappearance.adapscen = adapscen->getValue (); pp->colorappearance.autoadapscen = adapscen->getAutoValue (); @@ -792,6 +811,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) if (pedited) { pedited->colorappearance.degree = degree->getEditedState (); + pedited->colorappearance.degreeout = degreeout->getEditedState (); pedited->colorappearance.adapscen = adapscen->getEditedState (); pedited->colorappearance.adaplum = adaplum->getEditedState (); pedited->colorappearance.badpixsl = badpixsl->getEditedState (); @@ -805,6 +825,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.colorh = colorh->getEditedState (); pedited->colorappearance.rstprotection = rstprotection->getEditedState (); pedited->colorappearance.autodegree = !degree->getAutoInconsistent(); + pedited->colorappearance.autodegreeout = !degreeout->getAutoInconsistent(); pedited->colorappearance.autoadapscen = !adapscen->getAutoInconsistent(); pedited->colorappearance.enabled = !get_inconsistent(); pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED"); @@ -1084,6 +1105,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit { degree->setDefault (defParams->colorappearance.degree); + degreeout->setDefault (defParams->colorappearance.degreeout); adapscen->setDefault (defParams->colorappearance.adapscen); adaplum->setDefault (defParams->colorappearance.adaplum); badpixsl->setDefault (defParams->colorappearance.badpixsl); @@ -1102,6 +1124,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit if (pedited) { degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited); + degreeout->setDefaultEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setDefaultEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); adaplum->setDefaultEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setDefaultEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); @@ -1120,6 +1143,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit } else { degree->setDefaultEditedState (Irrelevant); + degreeout->setDefaultEditedState (Irrelevant); adapscen->setDefaultEditedState (Irrelevant); adaplum->setDefaultEditedState (Irrelevant); badpixsl->setDefaultEditedState (Irrelevant); @@ -1139,9 +1163,10 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit } } -void ColorAppearance::autoCamChanged (double ccam) +void ColorAppearance::autoCamChanged (double ccam, double ccamout) { nextCcam = ccam; + nextCcamout = ccamout; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->autoCamComputed_(); @@ -1157,6 +1182,7 @@ bool ColorAppearance::autoCamComputed_ () disableListener (); // degree->setEnabled (true); degree->setValue (nextCcam); + degreeout->setValue (nextCcamout); enableListener (); return false; @@ -1214,6 +1240,8 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) if (listener && (multiImage || getEnabled()) ) { if (a == degree) { listener->panelChanged (EvCATDegree, a->getTextValue()); + } else if (a == degreeout) { + listener->panelChanged (EvCATDegreeout, a->getTextValue()); } else if (a == adapscen) { listener->panelChanged (EvCATAdapscen, a->getTextValue()); } else if (a == adaplum) { @@ -1263,6 +1291,15 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) lastAutoDegree = degree->getAutoValue(); + if (degreeout->getAutoInconsistent()) { + degreeout->setAutoInconsistent (false); + degreeout->setAutoValue (false); + } else if (lastAutoDegreeout) { + degreeout->setAutoInconsistent (true); + } + + lastAutoDegreeout = degreeout->getAutoValue(); + if (adapscen->getAutoInconsistent()) { adapscen->setAutoInconsistent (false); adapscen->setAutoValue (false); @@ -1285,6 +1322,17 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoDegree, M ("GENERAL_DISABLED")); } } + + if (a == degreeout) { + if (degreeout->getAutoInconsistent()) { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_UNCHANGED")); + } else if (degreeout->getAutoValue()) { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_DISABLED")); + } + } + if (a == adapscen) { if (adapscen->getAutoInconsistent()) { @@ -1410,6 +1458,7 @@ void ColorAppearance::setBatchMode (bool batchMode) ToolPanel::setBatchMode (batchMode); degree->showEditedCB (); + degreeout->showEditedCB (); adapscen->showEditedCB (); adaplum->showEditedCB (); badpixsl->showEditedCB (); @@ -1469,6 +1518,7 @@ void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp) { degree->trimValue (pp->colorappearance.degree); + degreeout->trimValue (pp->colorappearance.degreeout); adapscen->trimValue (pp->colorappearance.adapscen); adaplum->trimValue (pp->colorappearance.adaplum); badpixsl->trimValue (pp->colorappearance.badpixsl); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 5f433b556..261d8f9bd 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -57,7 +57,7 @@ public: void datacie_toggled (); void tonecie_toggled (); // void sharpcie_toggled (); - void autoCamChanged (double ccam); + void autoCamChanged (double ccam, double ccamout); bool autoCamComputed_ (); void adapCamChanged (double cadap); bool adapCamComputed_ (); @@ -91,6 +91,7 @@ private: Adjuster* degree; Adjuster* adapscen; Adjuster* adaplum; + Adjuster* degreeout; Adjuster* badpixsl; Adjuster* jlight; Adjuster* qbright; @@ -133,9 +134,10 @@ private: DiagonalCurveEditor* shape; DiagonalCurveEditor* shape2; DiagonalCurveEditor* shape3; - double nextCcam, nextCadap; + double nextCcam, nextCcamout, nextCadap; bool lastAutoDegree; bool lastAutoAdapscen; + bool lastAutoDegreeout; bool lastsurr; bool lastgamut; bool lastdatacie; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index e09b30b24..7b7942203 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -175,6 +175,8 @@ void ParamsEdited::set (bool v) colorappearance.enabled = v; colorappearance.degree = v; colorappearance.autodegree = v; + colorappearance.degreeout = v; + colorappearance.autodegreeout = v; colorappearance.surround = v; colorappearance.adapscen = v; colorappearance.autoadapscen = v; @@ -699,6 +701,8 @@ void ParamsEdited::initFrom (const std::vector colorappearance.enabled = colorappearance.enabled && p.colorappearance.enabled == other.colorappearance.enabled; colorappearance.degree = colorappearance.degree && p.colorappearance.degree == other.colorappearance.degree; colorappearance.autodegree = colorappearance.autodegree && p.colorappearance.autodegree == other.colorappearance.autodegree; + colorappearance.degreeout = colorappearance.degreeout && p.colorappearance.degreeout == other.colorappearance.degreeout; + colorappearance.autodegreeout = colorappearance.autodegreeout && p.colorappearance.autodegreeout == other.colorappearance.autodegreeout; colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround; colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen; colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen; @@ -1711,6 +1715,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.autodegree = mods.colorappearance.autodegree; } + if (colorappearance.degreeout) { + toEdit.colorappearance.degreeout = mods.colorappearance.degreeout; + } + + if (colorappearance.autodegreeout) { + toEdit.colorappearance.autodegreeout = mods.colorappearance.autodegreeout; + } + if (colorappearance.surround) { toEdit.colorappearance.surround = mods.colorappearance.surround; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 1ec6bac6c..7d0ce7fde 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -289,6 +289,8 @@ public: bool enabled; bool degree; bool autodegree; + bool degreeout; + bool autodegreeout; bool autoadapscen; bool surround; bool adapscen; From 5f8555e84c493d85620784305c1338dff5a731f9 Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 10 Aug 2017 17:09:46 +0200 Subject: [PATCH 007/126] Add temp and green for scene --- rtdata/languages/default | 7 ++++- rtengine/improcfun.cc | 26 +++++++++++++---- rtengine/procevents.h | 2 ++ rtengine/procparams.cc | 28 +++++++++++++++++++ rtengine/procparams.h | 2 ++ rtengine/refreshmap.cc | 4 ++- rtgui/colorappearance.cc | 60 ++++++++++++++++++++++++++++++++++++---- rtgui/colorappearance.h | 2 ++ rtgui/paramsedited.cc | 12 ++++++++ rtgui/paramsedited.h | 2 ++ 10 files changed, 133 insertions(+), 12 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 23d12e1be..f4546245e 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -707,6 +707,10 @@ HISTORY_MSG_475;PS - Equalize channel HISTORY_MSG_476;CAM02 - Temp out HISTORY_MSG_477;CAM02 - Green out HISTORY_MSG_478;CAM02 - Yb out +HISTORY_MSG_479;CAM02 - CAT adaptation out +HISTORY_MSG_480;CAM02 - CAT auto out +HISTORY_MSG_481;CAM02 - temp scene +HISTORY_MSG_482;CAM02 - green scene HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -1308,6 +1312,7 @@ TP_COLORAPP_DATACIE;CIECAM02 output histograms in curves TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] TP_COLORAPP_GAMUT;Gamut control (L*a*b*) TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. TP_COLORAPP_HUE;Hue (h) @@ -1319,7 +1324,7 @@ TP_COLORAPP_LABEL_VIEWING;Viewing Conditions TP_COLORAPP_LIGHT;Lightness (J) TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. TP_COLORAPP_MODEL;WP Model -TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. TP_COLORAPP_RSTPRO;Red & skin-tones protection TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. TP_COLORAPP_SHARPCIE;--unused-- diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index d03ceca2c..1429b3b68 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -541,7 +541,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw = 100.0 * Xw; yw = 100.0 * Yw; zw = 100.0 * Zw; - double xw1, yw1, zw1, xw2, yw2, zw2; + double xw1 =0., yw1 = 0., zw1 = 0., xw2 = 0., yw2 = 0., zw2 = 0.; // settings of WB: scene and viewing if (params->colorappearance.wbmodel == "RawT") { @@ -1497,10 +1497,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int double Xw, Zw; float f, nc, yb = 0.f, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; float fl, n, nbb, ncb, aw; //d - float xwd, ywd, zwd; + float xwd, ywd, zwd, xws, yws, zws; int alg = 0; bool algepd = false; double Xwout, Zwout; + double Xwsc, Zwsc; const bool epdEnabled = params->epd.enabled; bool ciedata = (params->colorappearance.datacie && pW != 1) && ! ((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) @@ -1509,6 +1510,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int ColorTemp::temp2mulxyz (params->wb.temperature, params->wb.green, params->wb.method, Xw, Zw); //compute white Xw Yw Zw : white current WB ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); + ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); //viewing condition for surround if (params->colorappearance.surround == "Average") { @@ -1556,6 +1558,12 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xwd = 100.f * Xwout; zwd = 100.f * Zwout; ywd = 100.f / params->colorappearance.greenout;//approximation to simplify + + xws = 100.f * Xwsc; + zws = 100.f * Zwsc; + yws = 100.f / params->colorappearance.greensc;//approximation to simplify + + /* //settings white point of output device - or illuminant viewing if (settings->viewingdevice == 0) { @@ -1841,7 +1849,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw = 100.0f * Xw; yw = 100.0f * Yw; zw = 100.0f * Zw; - float xw1, yw1, zw1, xw2, yw2, zw2; + float xw1 = 0.f, yw1 = 0.f, zw1 = 0.f, xw2 = 0.f, yw2 = 0.f, zw2 = 0.f; // settings of WB: scene and viewing if (params->colorappearance.wbmodel == "RawT") { @@ -1851,14 +1859,22 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else { /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ + } else if(params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } + } else if(params->colorappearance.wbmodel == "free") { + xw1 = xws; // free temp and green + yw1 = yws; + zw1 = zws; + xw2 = xwd; + yw2 = ywd; + zw2 = zwd; + } + float cz, wh, pfl; Ciecam02::initcam1float (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 5070a9b0d..88aaf0e3f 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -507,6 +507,8 @@ enum ProcEvent { EvCATybout = 477, EvCATDegreeout = 478, EvCATAutoDegreeout = 479, + EvCATtempsc = 480, + EvCATgreensc = 481, NUMOFEVENTS diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index a16703f5a..8ed7236cb 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1154,6 +1154,8 @@ void ProcParams::setDefaults () colorappearance.tempout = 5000; colorappearance.greenout = 1.0; colorappearance.ybout = 18; + colorappearance.tempsc = 5000; + colorappearance.greensc = 1.0; impulseDenoise.enabled = false; impulseDenoise.thresh = 50; @@ -2149,6 +2151,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_double ("Color appearance", "Greenout", colorappearance.greenout); } + if (!pedited || pedited->colorappearance.tempsc) { + keyFile.set_integer ("Color appearance", "Tempsc", colorappearance.tempsc); + } + + if (!pedited || pedited->colorappearance.greensc) { + keyFile.set_double ("Color appearance", "Greensc", colorappearance.greensc); + } + if (!pedited || pedited->colorappearance.ybout) { keyFile.set_integer ("Color appearance", "Ybout", colorappearance.ybout); } @@ -5124,6 +5134,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "Tempsc")) { + colorappearance.tempsc = keyFile.get_integer ("Color appearance", "Tempsc"); + + if (pedited) { + pedited->colorappearance.tempsc = true; + } + } + + if (keyFile.has_key ("Color appearance", "Greensc")) { + colorappearance.greensc = keyFile.get_double ("Color appearance", "Greensc"); + + if (pedited) { + pedited->colorappearance.greensc = true; + } + } + if (keyFile.has_key ("Color appearance", "Ybout")) { colorappearance.ybout = keyFile.get_integer ("Color appearance", "Ybout"); @@ -8260,6 +8286,8 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.colorh == other.colorappearance.colorh && colorappearance.tempout == other.colorappearance.tempout && colorappearance.greenout == other.colorappearance.greenout + && colorappearance.tempsc == other.colorappearance.tempsc + && colorappearance.greensc == other.colorappearance.greensc && colorappearance.ybout == other.colorappearance.ybout && impulseDenoise.enabled == other.impulseDenoise.enabled && impulseDenoise.thresh == other.impulseDenoise.thresh diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 1ee5d16df..636308800 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -619,6 +619,8 @@ public: int tempout; int ybout; double greenout; + int tempsc; + double greensc; // bool sharpcie; }; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 0a345d8ac..732e2e05d 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -506,7 +506,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvCATgreenout LUMINANCECURVE, // EvCATybout LUMINANCECURVE, // EvCATDegreeout - LUMINANCECURVE // EvCATAutoDegreeout + LUMINANCECURVE, // EvCATAutoDegreeout + LUMINANCECURVE, // EvCATtempsc + LUMINANCECURVE // EvCATgreensc }; diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index c01b7458f..983ea7552 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -159,10 +159,27 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" wbmodel = Gtk::manage (new MyComboBoxText ()); wbmodel->append (M ("TP_COLORAPP_WBRT")); wbmodel->append (M ("TP_COLORAPP_WBCAM")); + wbmodel->append (M ("TP_COLORAPP_FREE")); + wbmodel->set_active (0); wbmHBox->pack_start (*wbmodel); p1VBox->pack_start (*wbmHBox); + Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + + + tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); + greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); + + tempsc->show(); + greensc->show(); + p1VBox->pack_start (*tempsc); + p1VBox->pack_start (*greensc); + + adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.001, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 if (adapscen->delay < options.adjusterMaxDelay) { @@ -443,10 +460,6 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" adaplum->set_tooltip_markup (M ("TP_COLORAPP_ADAPTVIEWING_TOOLTIP")); p3VBox->pack_start (*adaplum); - Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* igreenL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); // Gtk::Image* iblueredL = Gtk::manage (new RTImage ("ajd-wb-bluered1.png")); // Gtk::Image* iblueredR = Gtk::manage (new RTImage ("ajd-wb-bluered2.png")); @@ -541,6 +554,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempout->setAdjusterListener (this); greenout->setAdjusterListener (this); ybout->setAdjusterListener (this); + tempsc->setAdjusterListener (this); + greensc->setAdjusterListener (this); show_all(); @@ -597,6 +612,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) tempout->setEditedState (pedited->colorappearance.tempout ? Edited : UnEdited); greenout->setEditedState (pedited->colorappearance.greenout ? Edited : UnEdited); ybout->setEditedState (pedited->colorappearance.ybout ? Edited : UnEdited); + tempsc->setEditedState (pedited->colorappearance.tempsc ? Edited : UnEdited); + greensc->setEditedState (pedited->colorappearance.greensc ? Edited : UnEdited); contrast->setEditedState (pedited->colorappearance.contrast ? Edited : UnEdited); qcontrast->setEditedState (pedited->colorappearance.qcontrast ? Edited : UnEdited); colorh->setEditedState (pedited->colorappearance.colorh ? Edited : UnEdited); @@ -654,11 +671,13 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) wbmodelconn.block (true); if (pedited && !pedited->colorappearance.wbmodel) { - wbmodel->set_active (2); + wbmodel->set_active (3); } else if (pp->colorappearance.wbmodel == "RawT") { wbmodel->set_active (0); } else if (pp->colorappearance.wbmodel == "RawTCAT02") { wbmodel->set_active (1); + } else if (pp->colorappearance.wbmodel == "free") { + wbmodel->set_active (2); } wbmodelconn.block (false); @@ -734,6 +753,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) tempout->setValue (pp->colorappearance.tempout); greenout->setValue (pp->colorappearance.greenout); ybout->setValue (pp->colorappearance.ybout); + tempsc->setValue (pp->colorappearance.tempsc); + greensc->setValue (pp->colorappearance.greensc); tcmode3conn.block (false); tcmode2conn.block (false); @@ -782,6 +803,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.tempout = tempout->getValue (); pp->colorappearance.greenout = greenout->getValue (); pp->colorappearance.ybout = ybout->getValue (); + pp->colorappearance.tempsc = tempsc->getValue (); + pp->colorappearance.greensc = greensc->getValue (); int tcMode = toneCurveMode->get_active_row_number(); @@ -846,6 +869,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.tempout = tempout->getEditedState (); pedited->colorappearance.greenout = greenout->getEditedState (); pedited->colorappearance.ybout = ybout->getEditedState (); + pedited->colorappearance.tempsc = tempsc->getEditedState (); + pedited->colorappearance.greensc = greensc->getEditedState (); } @@ -863,6 +888,9 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.wbmodel = "RawT"; } else if (wbmodel->get_active_row_number() == 1) { pp->colorappearance.wbmodel = "RawTCAT02"; + } else if (wbmodel->get_active_row_number() == 2) { + pp->colorappearance.wbmodel = "free"; + } if (algo->get_active_row_number() == 0) { @@ -1121,6 +1149,8 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit tempout->setDefault (defParams->colorappearance.tempout); greenout->setDefault (defParams->colorappearance.greenout); ybout->setDefault (defParams->colorappearance.ybout); + tempsc->setDefault (defParams->colorappearance.tempsc); + greensc->setDefault (defParams->colorappearance.greensc); if (pedited) { degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited); @@ -1140,6 +1170,8 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit tempout->setDefaultEditedState (pedited->colorappearance.tempout ? Edited : UnEdited); greenout->setDefaultEditedState (pedited->colorappearance.greenout ? Edited : UnEdited); ybout->setDefaultEditedState (pedited->colorappearance.ybout ? Edited : UnEdited); + tempsc->setDefaultEditedState (pedited->colorappearance.tempsc ? Edited : UnEdited); + greensc->setDefaultEditedState (pedited->colorappearance.greensc ? Edited : UnEdited); } else { degree->setDefaultEditedState (Irrelevant); @@ -1159,6 +1191,8 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit tempout->setDefaultEditedState (Irrelevant); greenout->setDefaultEditedState (Irrelevant); ybout->setDefaultEditedState (Irrelevant); + tempsc->setDefaultEditedState (Irrelevant); + greensc->setDefaultEditedState (Irrelevant); } } @@ -1272,6 +1306,10 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvCATgreenout, a->getTextValue()); } else if (a == ybout) { listener->panelChanged (EvCATybout, a->getTextValue()); + } else if (a == tempsc) { + listener->panelChanged (EvCATtempsc, a->getTextValue()); + } else if (a == greensc) { + listener->panelChanged (EvCATgreensc, a->getTextValue()); } @@ -1373,6 +1411,14 @@ void ColorAppearance::surroundChanged () void ColorAppearance::wbmodelChanged () { + if (wbmodel->get_active_row_number() == 0 || wbmodel->get_active_row_number() == 1) { + tempsc->hide(); + greensc->hide(); + } + if (wbmodel->get_active_row_number() == 2){ + tempsc->show(); + greensc->show(); + } if (listener && (multiImage || getEnabled()) ) { listener->panelChanged (EvCATMethodWB, wbmodel->get_active_text ()); @@ -1474,6 +1520,8 @@ void ColorAppearance::setBatchMode (bool batchMode) tempout->showEditedCB (); greenout->showEditedCB (); ybout->showEditedCB (); + tempsc->showEditedCB (); + greensc->showEditedCB (); surround->append (M ("GENERAL_UNCHANGED")); wbmodel->append (M ("GENERAL_UNCHANGED")); @@ -1534,5 +1582,7 @@ void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp) tempout->trimValue (pp->colorappearance.tempout); greenout->trimValue (pp->colorappearance.greenout); ybout->trimValue (pp->colorappearance.ybout); + tempsc->trimValue (pp->colorappearance.tempsc); + greensc->trimValue (pp->colorappearance.greensc); } diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 261d8f9bd..f5102be95 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -105,6 +105,8 @@ private: Adjuster* tempout; Adjuster* greenout; Adjuster* ybout; + Adjuster* tempsc; + Adjuster* greensc; MyComboBoxText* toneCurveMode; MyComboBoxText* toneCurveMode2; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 7b7942203..d3e17b810 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -209,6 +209,8 @@ void ParamsEdited::set (bool v) colorappearance.tempout = v; colorappearance.greenout = v; colorappearance.ybout = v; + colorappearance.tempsc = v; + colorappearance.greensc = v; //colorBoost.amount = v; //colorBoost.avoidclip = v; @@ -734,6 +736,8 @@ void ParamsEdited::initFrom (const std::vector colorappearance.tempout = colorappearance.tempout && p.colorappearance.tempout == other.colorappearance.tempout; colorappearance.greenout = colorappearance.greenout && p.colorappearance.greenout == other.colorappearance.greenout; colorappearance.ybout = colorappearance.ybout && p.colorappearance.ybout == other.colorappearance.ybout; + colorappearance.tempsc = colorappearance.tempsc && p.colorappearance.tempsc == other.colorappearance.tempsc; + colorappearance.greensc = colorappearance.greensc && p.colorappearance.greensc == other.colorappearance.greensc; //colorBoost.amount = colorBoost.amount && p.colorBoost.amount == other.colorBoost.amount; //colorBoost.avoidclip = colorBoost.avoidclip && p.colorBoost.avoidclip == other.colorBoost.avoidclip; @@ -1759,6 +1763,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.greenout = mods.colorappearance.greenout; } + if (colorappearance.tempsc) { + toEdit.colorappearance.tempsc = mods.colorappearance.tempsc; + } + + if (colorappearance.greensc) { + toEdit.colorappearance.greensc = mods.colorappearance.greensc; + } + if (colorappearance.ybout) { toEdit.colorappearance.ybout = mods.colorappearance.ybout; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 7d0ce7fde..4c0bcd38e 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -316,6 +316,8 @@ public: bool tempout; bool greenout; bool ybout; + bool tempsc; + bool greensc; }; From 49d61d520954077460b15a795cc269b345897713 Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 11 Aug 2017 08:21:38 +0200 Subject: [PATCH 008/126] Small changes + mode double --- rtdata/languages/default | 8 ++++---- rtengine/ciecam02.cc | 9 +++++++-- rtengine/ciecam02.h | 2 +- rtengine/dcrop.cc | 4 ++-- rtengine/improcfun.cc | 29 ++++++++++++++++++++++++----- rtengine/improcfun.h | 2 +- rtengine/simpleprocess.cc | 8 ++++---- rtgui/colorappearance.cc | 13 +++++++++---- 8 files changed, 52 insertions(+), 23 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index f4546245e..346c96a2d 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -707,10 +707,10 @@ HISTORY_MSG_475;PS - Equalize channel HISTORY_MSG_476;CAM02 - Temp out HISTORY_MSG_477;CAM02 - Green out HISTORY_MSG_478;CAM02 - Yb out -HISTORY_MSG_479;CAM02 - CAT adaptation out -HISTORY_MSG_480;CAM02 - CAT auto out -HISTORY_MSG_481;CAM02 - temp scene -HISTORY_MSG_482;CAM02 - green scene +HISTORY_MSG_479;CAM02 - CAT02 adaptation out +HISTORY_MSG_480;CAM02 - Automatic CAT02 out +HISTORY_MSG_481;CAM02 - Temp scene +HISTORY_MSG_482;CAM02 - Green scene HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index c9053f8bd..5a2c96395 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -724,13 +724,18 @@ void Ciecam02::initcam1float(float gamu, float yb, float pilotd, float f, float #endif } -void Ciecam02::initcam2(double gamu, double yb, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, +void Ciecam02::initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, double &cz, double &aw, double &fl) { n = yb / yw; + if (pilotd == 2.0) { + d = d_factorfloat( f, la ); + } else { + d = pilotd; + } - d = d_factor( f, la ); +// d = d_factor( f, la ); fl = calculate_fl_from_la_ciecam02( la ); nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); cz = 1.48 + sqrt( n ); diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index 2e6e18295..76a7cf5bb 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -102,7 +102,7 @@ public: static void initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); - static void initcam2(double gamu, double yb, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + static void initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, double &cz, double &aw, double &fl); static void initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index f4fc7f734..a93238664 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -962,10 +962,10 @@ void Crop::update (int todo) parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, 1); } else { - double dd; // not used after this block + double dd, dj; // not used after this block parent->ipf.ciecam_02 (cieCrop, adap, begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, 1); + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, dj, 1); } } else { // CIECAM is disbaled, we free up its image buffer to save some space diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 1429b3b68..5d56f01fd 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -210,7 +210,7 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt) { if (params->colorappearance.enabled) { //int lastskip; @@ -264,9 +264,12 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh Yw = 1.0; double Xw, Zw; double Xwout, Zwout; + double Xwsc, Zwsc; + double f, c, nc, yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; double fl, n, nbb, ncb, aw; double xwd = 0., ywd, zwd = 0.; + double xws, yws, zws; int alg = 0; bool algepd = false; float sum = 0.f; @@ -275,6 +278,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh ColorTemp::temp2mulxyz (params->wb.temperature, params->wb.green, params->wb.method, Xw, Zw); //compute white Xw Yw Zw : white current WB ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); + ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); //viewing condition for surround if (params->colorappearance.surround == "Average") { @@ -362,6 +366,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh zwd = 100. * Zwout; ywd = 100. / params->colorappearance.greenout;//approximation to simplify + xws = 100. * Xwsc; + zws = 100. * Zwsc; + yws = 100. / params->colorappearance.greensc;//approximation to simplify + /* //settings mean Luminance Y of output device or viewing if (settings->viewingdevicegrey == 0) { @@ -397,6 +405,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double deg = (params->colorappearance.degree) / 100.0; double pilot = params->colorappearance.autodegree ? 2.0 : deg; + + const float degout = (params->colorappearance.degreeout) / 100.0; + const float pilotout = params->colorappearance.autodegreeout ? 2.0 : degout; + //algoritm's params float jli = params->colorappearance.jlight; float chr = params->colorappearance.chroma; @@ -551,19 +563,26 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else { /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ + } else if(params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } + }else if(params->colorappearance.wbmodel == "free") { + xw1 = xws; // free temp and green + yw1 = yws; + zw1 = zws; + xw2 = xwd; + yw2 = ywd; + zw2 = zwd; + } double cz, wh, pfl; Ciecam02::initcam1 (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); - double nj, dj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2 (gamu, yb2, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + double nj, nbbj, ncbj, czj, awj, flj; + Ciecam02::initcam2 (gamu, yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 6f8307141..5ef287139 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -229,7 +229,7 @@ public: LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt); void chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve); void vibrance (LabImage* lab);//Jacques' vibrance void colorCurve (LabImage* lold, LabImage* lnew); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index cc70823ff..d72a69bab 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1125,16 +1125,16 @@ private: float d, dj; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { - double dd; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); + double dd, dj; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); } } else { if(settings->ciecamfloat) { float d, dj; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { - double dd; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); + double dd, dj; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); } } } diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 983ea7552..ddf120c1a 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -171,8 +171,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); - greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); + tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); + greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenL, igreenR)); tempsc->show(); greensc->show(); @@ -474,8 +474,13 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p3VBox->pack_start (*degreeout); - tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); - greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + + tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); + greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 50, 1, 18)); tempout->show(); From be82e1bde28fa0253b283da542a2cf50218acd2a Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 13 Aug 2017 13:07:39 +0200 Subject: [PATCH 009/126] Some changes requested by Elle --- rtdata/languages/default | 10 ++- rtengine/dcrop.cc | 4 +- rtengine/improccoordinator.cc | 10 +-- rtengine/improcfun.cc | 15 ++-- rtengine/improcfun.h | 2 +- rtengine/procevents.h | 2 + rtengine/procparams.cc | 28 +++++++ rtengine/procparams.h | 2 + rtengine/refreshmap.cc | 4 +- rtengine/rtengine.h | 2 +- rtengine/rtthumbnail.cc | 4 +- rtengine/simpleprocess.cc | 8 +- rtgui/colorappearance.cc | 136 ++++++++++++++++++++++++++++++++-- rtgui/colorappearance.h | 14 +++- rtgui/paramsedited.cc | 12 +++ rtgui/paramsedited.h | 2 + 16 files changed, 223 insertions(+), 32 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 346c96a2d..a4b2d0442 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1276,9 +1276,9 @@ TP_COARSETRAF_TOOLTIP_HFLIP;Flip horizontally. TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Editor Tabs Mode,\nAlt-[ - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. -TP_COLORAPP_ADAPTSCENE;Scene luminosity +TP_COLORAPP_ADAPTSCENE;Scene absolute luminance TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) +TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. TP_COLORAPP_ALGO;Algorithm @@ -1325,6 +1325,8 @@ TP_COLORAPP_LIGHT;Lightness (J) TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. TP_COLORAPP_MODEL;WP Model TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +TP_COLORAPP_NEUTRAL;Reset +TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values TP_COLORAPP_RSTPRO;Red & skin-tones protection TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. TP_COLORAPP_SHARPCIE;--unused-- @@ -1349,7 +1351,9 @@ TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] TP_COLORAPP_WBRT;WB [RT] + [output] -TP_COLORAPP_YB;Yb (mean luminance) +TP_COLORAPP_YB;Yb%(mean luminance) +TP_COLORAPP_YBSCENE;Yb%(mean luminance) +TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance TP_COLORTONING_AB;o C/L TP_COLORTONING_AUTOSAT;Automatic TP_COLORTONING_BALANCE;Balance diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index a93238664..441c7a47d 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -958,9 +958,9 @@ void Crop::update (int todo) } if (settings->ciecamfloat) { - float d, dj; // not used after this block + float d, dj, yb; // not used after this block parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, 1); + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, yb, 1); } else { double dd, dj; // not used after this block diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index e3ee91540..f63b6ba48 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -746,7 +746,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) int begh = 0; int endh = pH; - float d, dj; + float d, dj, yb; bool execsharp = false; if(!ncie) { @@ -766,14 +766,14 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, 1); + ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1); - if(params.colorappearance.autodegree && acListener && params.colorappearance.enabled) { + if((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) { acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); } - if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { - acListener->adapCamChanged(adap); //real value of adapt scene luminosity + if((params.colorappearance.autoadapscen || params.colorappearance.autoybscen) && acListener && params.colorappearance.enabled) { + acListener->adapCamChanged(adap, (int) yb); //real value of adapt scene luminosity and Yb scene } readyphase++; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 5d56f01fd..dadf0cd2b 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1487,7 +1487,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt) { if (params->colorappearance.enabled) { @@ -1514,7 +1514,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Yw; Yw = 1.0; double Xw, Zw; - float f, nc, yb = 0.f, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; + float f, nc, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; float fl, n, nbb, ncb, aw; //d float xwd, ywd, zwd, xws, yws, zws; int alg = 0; @@ -1834,7 +1834,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //evaluate lightness, contrast } - if (settings->viewinggreySc == 0) { //auto + + + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0f; } else if (mean < 30.f) { @@ -1858,8 +1862,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } else { yb = 90.0f; } - } else if (settings->viewinggreySc == 1) { - yb = 18.0f; //fixed +// } else if (settings->viewinggreySc == 1) { + } else { + yb = (float) params->colorappearance.ybscen; } const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 5ef287139..115046067 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -226,7 +226,7 @@ public: void luminanceCurve (LabImage* lold, LabImage* lnew, LUTf &curve); void ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 88aaf0e3f..cf7f50704 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -509,6 +509,8 @@ enum ProcEvent { EvCATAutoDegreeout = 479, EvCATtempsc = 480, EvCATgreensc = 481, + EvCATybscen = 482, + EvCATAutoyb = 483, NUMOFEVENTS diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 071732243..fa97d5f7d 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1159,6 +1159,8 @@ void ProcParams::setDefaults () colorappearance.badpixsl = 0; colorappearance.adapscen = 2000.0; colorappearance.autoadapscen = true; + colorappearance.ybscen = 18; + colorappearance.autoybscen = true; colorappearance.algo = "No"; colorappearance.wbmodel = "RawT"; colorappearance.jlight = 0.0; @@ -2169,6 +2171,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Color appearance", "AutoAdapscen", colorappearance.autoadapscen); } + if (!pedited || pedited->colorappearance.ybscen) { + keyFile.set_integer ("Color appearance", "YbScene", colorappearance.ybscen); + } + + if (!pedited || pedited->colorappearance.autoybscen) { + keyFile.set_boolean ("Color appearance", "Autoybscen", colorappearance.autoybscen); + } + if (!pedited || pedited->colorappearance.surrsource) { keyFile.set_boolean ("Color appearance", "SurrSource", colorappearance.surrsource); } @@ -5136,6 +5146,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "YbScene")) { + colorappearance.ybscen = keyFile.get_integer ("Color appearance", "YbScene"); + + if (pedited) { + pedited->colorappearance.ybscen = true; + } + } + + if (keyFile.has_key ("Color appearance", "Autoybscen")) { + colorappearance.autoybscen = keyFile.get_boolean ("Color appearance", "Autoybscen"); + + if (pedited) { + pedited->colorappearance.autoybscen = true; + } + } + if (keyFile.has_key ("Color appearance", "SurrSource")) { colorappearance.surrsource = keyFile.get_boolean ("Color appearance", "SurrSource"); @@ -8302,6 +8328,8 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.surround == other.colorappearance.surround && colorappearance.adapscen == other.colorappearance.adapscen && colorappearance.autoadapscen == other.colorappearance.autoadapscen + && colorappearance.ybscen == other.colorappearance.ybscen + && colorappearance.autoybscen == other.colorappearance.autoybscen && colorappearance.adaplum == other.colorappearance.adaplum && colorappearance.badpixsl == other.colorappearance.badpixsl && colorappearance.wbmodel == other.colorappearance.wbmodel diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 636308800..405609823 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -597,6 +597,8 @@ public: Glib::ustring surround; double adapscen; bool autoadapscen; + int ybscen; + bool autoybscen; double adaplum; int badpixsl; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 732e2e05d..5400a2e47 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -508,7 +508,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvCATDegreeout LUMINANCECURVE, // EvCATAutoDegreeout LUMINANCECURVE, // EvCATtempsc - LUMINANCECURVE // EvCATgreensc + LUMINANCECURVE, // EvCATgreensc + LUMINANCECURVE, // EvCATybscen + LUMINANCECURVE // EvCATAutoyb }; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index fb93f8715..6678ac1fd 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -274,7 +274,7 @@ class AutoCamListener public : virtual ~AutoCamListener() {} virtual void autoCamChanged (double ccam, double ccamout) {} - virtual void adapCamChanged (double cadap) {} + virtual void adapCamChanged (double cadap, int ybscn) {} }; class AutoChromaListener diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 41e52a16e..4388b6184 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1260,7 +1260,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei 16); int begh = 0, endh = labView->H; bool execsharp = false; - float d, dj; + float d, dj, yb; float fnum = fnumber;// F number float fiso = iso;// ISO float fspeed = shutter;//speed @@ -1296,7 +1296,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei CAMMean = NAN; CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, rtt); + ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, yb, rtt); delete cieView; } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index d72a69bab..de13cfc0e 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1122,16 +1122,16 @@ private: if (params.sharpening.enabled) { if(settings->ciecamfloat) { - float d, dj; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); + float d, dj, yb; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); } } else { if(settings->ciecamfloat) { - float d, dj; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); + float d, dj, yb; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index ddf120c1a..95caa1450 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -191,6 +191,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" adapscen->set_tooltip_markup (M ("TP_COLORAPP_ADAPTSCENE_TOOLTIP")); p1VBox->pack_start (*adapscen); + ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18)); + + if (ybscen->delay < options.adjusterMaxDelay) { + ybscen->delay = options.adjusterMaxDelay; + } + + ybscen->throwOnButtonRelease(); + ybscen->addAutoButton (M ("TP_COLORAPP_ADAP_AUTO_TOOLTIP")); + ybscen->set_tooltip_markup (M ("TP_COLORAPP_YBSCENE_TOOLTIP")); + p1VBox->pack_start (*ybscen); + p1Frame->add (*p1VBox); pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -199,12 +210,19 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Process 1 frame + + expadjust = Gtk::manage(new MyExpander(false, M ("TP_COLORAPP_LABEL_CAM02"))); + setExpandAlignProperties (expadjust, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expadjust->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ColorAppearance::foldAllButMe), expadjust) ); +/* Gtk::Frame *p2Frame; // Vertical box container for the content of the Process 1 frame Gtk::VBox *p2VBox; p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); p2Frame->set_label_align (0.025, 0.5); +*/ + Gtk::VBox *p2VBox; p2VBox = Gtk::manage ( new Gtk::VBox()); p2VBox->set_spacing (2); @@ -429,10 +447,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" - p2Frame->add (*p2VBox); +// p2Frame->add (*p2VBox); + expadjust->add (*p2VBox, false); + expadjust->setLevel(2); + pack_start (*expadjust); - - pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); +// pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -450,7 +470,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p3VBox = Gtk::manage ( new Gtk::VBox()); p3VBox->set_spacing (2); - adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 1000., 0.1, 16.)); + adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); if (adaplum->delay < options.adjusterMaxDelay) { adaplum->delay = options.adjusterMaxDelay; @@ -481,7 +501,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); - ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 50, 1, 18)); + ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); tempout->show(); greenout->show(); @@ -533,6 +553,21 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" badpixsl->throwOnButtonRelease(); badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP")); pack_start (*badpixsl, Gtk::PACK_SHRINK); + + + //reset button + neutral = Gtk::manage (new Gtk::Button (M ("TP_COLORAPP_NEUTRAL"))); + setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); + setExpandAlignProperties (resetImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + neutral->set_image (*resetImg); + neutral->set_tooltip_text (M ("TP_COLORAPP_NEUTRAL_TIP")); + neutralconn = neutral->signal_pressed().connect ( sigc::mem_fun (*this, &ColorAppearance::neutral_pressed) ); + neutral->show(); + + //------------- + + pack_start (*neutral); // ------------------------ Listening events @@ -545,6 +580,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degree->setAdjusterListener (this); degreeout->setAdjusterListener (this); adapscen->setAdjusterListener (this); + ybscen->setAdjusterListener (this); adaplum->setAdjusterListener (this); badpixsl->setAdjusterListener (this); jlight->setAdjusterListener (this); @@ -575,7 +611,58 @@ ColorAppearance::~ColorAppearance () delete curveEditorG3; } +void ColorAppearance::foldAllButMe (GdkEventButton* event, MyExpander *expander) +{ + if (event->button == 3) { + expadjust->set_expanded(expadjust == expander); + } +} +void ColorAppearance::writeOptions(std::vector &tpOpen) +{ + tpOpen.push_back (expadjust->get_expanded ()); +} + +void ColorAppearance::updateToolState(std::vector &tpOpen) +{ + if(tpOpen.size() >= 1) { + expadjust->set_expanded(tpOpen.at(0)); + } +} + +void ColorAppearance::neutral_pressed () +{ + jlight->resetValue (false); + qbright->resetValue (false); + chroma->resetValue (false); + schroma->resetValue (false); + mchroma->resetValue (false); + rstprotection->resetValue (false); + contrast->resetValue (false); + qcontrast->resetValue (false); + colorh->resetValue (false); + tempout->resetValue (false); + greenout->resetValue (false); + ybout->resetValue (false); + tempsc->resetValue (false); + greensc->resetValue (false); + badpixsl->resetValue (false); + wbmodel->set_active (0); + toneCurveMode->set_active (0); + toneCurveMode2->set_active (0); + toneCurveMode3->set_active (0); + shape->reset(); + shape2->reset(); + shape3->reset(); + degree->setAutoValue (true); + degree->resetValue (false); + adapscen->resetValue (false); + adapscen->setAutoValue (true); + degreeout->resetValue (false); + degreeout->setAutoValue (true); + ybscen->resetValue (false); + ybscen->setAutoValue (true); +} bool ColorAppearance::bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) { @@ -606,6 +693,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited); degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); + ybscen->setEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited); adaplum->setEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); jlight->setEditedState (pedited->colorappearance.jlight ? Edited : UnEdited); @@ -632,6 +720,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) degree->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegree); degreeout->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegreeout); adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen); + ybscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoybscen); set_inconsistent (multiImage && !pedited->colorappearance.enabled); shape->setUnChanged (!pedited->colorappearance.curve); @@ -736,6 +825,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) lastAutoDegree = pp->colorappearance.autodegree; lastAutoAdapscen = pp->colorappearance.autoadapscen; lastAutoDegreeout = pp->colorappearance.autodegreeout; + lastAutoybscen = pp->colorappearance.autoybscen; degree->setValue (pp->colorappearance.degree); degree->setAutoValue (pp->colorappearance.autodegree); @@ -743,6 +833,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) adapscen->setAutoValue (pp->colorappearance.autoadapscen); degreeout->setValue (pp->colorappearance.degreeout); degreeout->setAutoValue (pp->colorappearance.autodegreeout); + ybscen->setValue (pp->colorappearance.ybscen); + ybscen->setAutoValue (pp->colorappearance.autoybscen); adaplum->setValue (pp->colorappearance.adaplum); badpixsl->setValue (pp->colorappearance.badpixsl); @@ -785,6 +877,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.enabled = getEnabled(); pp->colorappearance.adapscen = adapscen->getValue (); pp->colorappearance.autoadapscen = adapscen->getAutoValue (); + pp->colorappearance.ybscen = ybscen->getValue (); + pp->colorappearance.autoybscen = ybscen->getAutoValue (); pp->colorappearance.adaplum = adaplum->getValue (); pp->colorappearance.badpixsl = badpixsl->getValue (); pp->colorappearance.jlight = jlight->getValue (); @@ -842,6 +936,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.degreeout = degreeout->getEditedState (); pedited->colorappearance.adapscen = adapscen->getEditedState (); pedited->colorappearance.adaplum = adaplum->getEditedState (); + pedited->colorappearance.ybscen = ybscen->getEditedState (); pedited->colorappearance.badpixsl = badpixsl->getEditedState (); pedited->colorappearance.jlight = jlight->getEditedState (); pedited->colorappearance.qbright = qbright->getEditedState (); @@ -855,6 +950,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.autodegree = !degree->getAutoInconsistent(); pedited->colorappearance.autodegreeout = !degreeout->getAutoInconsistent(); pedited->colorappearance.autoadapscen = !adapscen->getAutoInconsistent(); + pedited->colorappearance.autoybscen = !ybscen->getAutoInconsistent(); pedited->colorappearance.enabled = !get_inconsistent(); pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED"); @@ -1140,6 +1236,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit degree->setDefault (defParams->colorappearance.degree); degreeout->setDefault (defParams->colorappearance.degreeout); adapscen->setDefault (defParams->colorappearance.adapscen); + ybscen->setDefault (defParams->colorappearance.ybscen); adaplum->setDefault (defParams->colorappearance.adaplum); badpixsl->setDefault (defParams->colorappearance.badpixsl); jlight->setDefault (defParams->colorappearance.jlight); @@ -1161,6 +1258,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited); degreeout->setDefaultEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setDefaultEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); + ybscen->setDefaultEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited); adaplum->setDefaultEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setDefaultEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); jlight->setDefaultEditedState (pedited->colorappearance.jlight ? Edited : UnEdited); @@ -1182,6 +1280,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit degree->setDefaultEditedState (Irrelevant); degreeout->setDefaultEditedState (Irrelevant); adapscen->setDefaultEditedState (Irrelevant); + ybscen->setDefaultEditedState (Irrelevant); adaplum->setDefaultEditedState (Irrelevant); badpixsl->setDefaultEditedState (Irrelevant); jlight->setDefaultEditedState (Irrelevant); @@ -1227,9 +1326,10 @@ bool ColorAppearance::autoCamComputed_ () return false; } -void ColorAppearance::adapCamChanged (double cadap) +void ColorAppearance::adapCamChanged (double cadap, int ybsc) { nextCadap = cadap; + nextYbscn = ybsc; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->adapCamComputed_(); @@ -1245,6 +1345,7 @@ bool ColorAppearance::adapCamComputed_ () disableListener (); // degree->setEnabled (true); adapscen->setValue (nextCadap); + ybscen->setValue (nextYbscn); enableListener (); return false; @@ -1283,6 +1384,8 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvCATDegreeout, a->getTextValue()); } else if (a == adapscen) { listener->panelChanged (EvCATAdapscen, a->getTextValue()); + } else if (a == ybscen) { + listener->panelChanged (EvCATybscen, a->getTextValue()); } else if (a == adaplum) { listener->panelChanged (EvCATAdapLum, a->getTextValue()); } else if (a == badpixsl) { @@ -1352,6 +1455,15 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) lastAutoAdapscen = adapscen->getAutoValue(); + if (ybscen->getAutoInconsistent()) { + ybscen->setAutoInconsistent (false); + ybscen->setAutoValue (false); + } else if (lastAutoybscen) { + ybscen->setAutoInconsistent (true); + } + + lastAutoybscen = ybscen->getAutoValue(); + } if (listener && (multiImage || getEnabled()) ) { @@ -1387,6 +1499,16 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) } } + if (a == ybscen) { + if (ybscen->getAutoInconsistent()) { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_UNCHANGED")); + } else if (ybscen->getAutoValue()) { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_DISABLED")); + } + } + } } @@ -1512,6 +1634,7 @@ void ColorAppearance::setBatchMode (bool batchMode) degreeout->showEditedCB (); adapscen->showEditedCB (); adaplum->showEditedCB (); + ybscen->showEditedCB (); badpixsl->showEditedCB (); jlight->showEditedCB (); qbright->showEditedCB (); @@ -1573,6 +1696,7 @@ void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp) degree->trimValue (pp->colorappearance.degree); degreeout->trimValue (pp->colorappearance.degreeout); adapscen->trimValue (pp->colorappearance.adapscen); + ybscen->trimValue (pp->colorappearance.ybscen); adaplum->trimValue (pp->colorappearance.adaplum); badpixsl->trimValue (pp->colorappearance.badpixsl); jlight->trimValue (pp->colorappearance.jlight); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index f5102be95..9c2a84d67 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -59,7 +59,7 @@ public: // void sharpcie_toggled (); void autoCamChanged (double ccam, double ccamout); bool autoCamComputed_ (); - void adapCamChanged (double cadap); + void adapCamChanged (double cadap, int ybscn); bool adapCamComputed_ (); void curveChanged (CurveEditor* ce); @@ -69,6 +69,7 @@ public: bool curveMode2Changed_ (); void curveMode3Changed (); bool curveMode3Changed_ (); + void neutral_pressed (); void expandCurve (bool isExpanded); bool isCurveExpanded (); @@ -78,10 +79,13 @@ public: void trimValues (rtengine::procparams::ProcParams* pp); void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI); virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller); + void updateToolState (std::vector &tpOpen); + void writeOptions (std::vector &tpOpen); private: bool bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); bool srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); + void foldAllButMe (GdkEventButton* event, MyExpander *expander); Glib::RefPtr bgTTips; Glib::RefPtr srTTips; @@ -90,6 +94,7 @@ private: Adjuster* degree; Adjuster* adapscen; + Adjuster* ybscen; Adjuster* adaplum; Adjuster* degreeout; Adjuster* badpixsl; @@ -108,6 +113,8 @@ private: Adjuster* tempsc; Adjuster* greensc; + MyExpander* expadjust; + MyComboBoxText* toneCurveMode; MyComboBoxText* toneCurveMode2; MyComboBoxText* toneCurveMode3; @@ -119,6 +126,7 @@ private: Gtk::CheckButton* datacie; Gtk::CheckButton* tonecie; // Gtk::CheckButton* sharpcie; + Gtk::Button* neutral; MyComboBoxText* surround; sigc::connection surroundconn; @@ -128,7 +136,7 @@ private: sigc::connection algoconn; sigc::connection surrconn; sigc::connection gamutconn, datacieconn, tonecieconn /*,badpixconn , sharpcieconn*/; - sigc::connection tcmodeconn, tcmode2conn, tcmode3conn; + sigc::connection tcmodeconn, tcmode2conn, tcmode3conn, neutralconn; CurveEditorGroup* curveEditorG; CurveEditorGroup* curveEditorG2; CurveEditorGroup* curveEditorG3; @@ -137,9 +145,11 @@ private: DiagonalCurveEditor* shape2; DiagonalCurveEditor* shape3; double nextCcam, nextCcamout, nextCadap; + int nextYbscn; bool lastAutoDegree; bool lastAutoAdapscen; bool lastAutoDegreeout; + bool lastAutoybscen; bool lastsurr; bool lastgamut; bool lastdatacie; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index d3e17b810..6de9cbb0c 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -180,6 +180,8 @@ void ParamsEdited::set (bool v) colorappearance.surround = v; colorappearance.adapscen = v; colorappearance.autoadapscen = v; + colorappearance.ybscen = v; + colorappearance.autoybscen = v; colorappearance.adaplum = v; colorappearance.badpixsl = v; colorappearance.wbmodel = v; @@ -708,6 +710,8 @@ void ParamsEdited::initFrom (const std::vector colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround; colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen; colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen; + colorappearance.ybscen = colorappearance.ybscen && p.colorappearance.ybscen == other.colorappearance.ybscen; + colorappearance.autoybscen = colorappearance.autoybscen && p.colorappearance.autoybscen == other.colorappearance.autoybscen; colorappearance.adaplum = colorappearance.adaplum && p.colorappearance.adaplum == other.colorappearance.adaplum; colorappearance.badpixsl = colorappearance.badpixsl && p.colorappearance.badpixsl == other.colorappearance.badpixsl; colorappearance.wbmodel = colorappearance.wbmodel && p.colorappearance.wbmodel == other.colorappearance.wbmodel; @@ -1739,6 +1743,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.adapscen = mods.colorappearance.adapscen; } + if (colorappearance.autoybscen) { + toEdit.colorappearance.autoybscen = mods.colorappearance.autoybscen; + } + + if (colorappearance.ybscen) { + toEdit.colorappearance.ybscen = mods.colorappearance.ybscen; + } + if (colorappearance.adaplum) { toEdit.colorappearance.adaplum = dontforceSet && options.baBehav[ADDSET_CAT_ADAPTVIEWING] ? toEdit.colorappearance.adaplum + mods.colorappearance.adaplum : mods.colorappearance.adaplum; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 4c0bcd38e..ef32bea63 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -292,9 +292,11 @@ public: bool degreeout; bool autodegreeout; bool autoadapscen; + bool autoybscen; bool surround; bool adapscen; bool adaplum; + bool ybscen; bool badpixsl; bool wbmodel; bool algo; From 0bb824e2c1a98edd8fb35ef335a90231ba3f43c6 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 14 Aug 2017 08:21:35 +0200 Subject: [PATCH 010/126] Other changes for Elle --- rtdata/languages/default | 1 + rtengine/dcrop.cc | 4 +- rtengine/improccoordinator.cc | 8 ++- rtengine/improcfun.cc | 70 ++++++++++++++------ rtengine/improcfun.h | 2 +- rtengine/procparams.cc | 14 ++++ rtengine/procparams.h | 1 + rtengine/rtengine.h | 4 +- rtengine/simpleprocess.cc | 8 +-- rtgui/colorappearance.cc | 119 +++++++++++++++++++++++++++++----- rtgui/colorappearance.h | 7 +- rtgui/paramsedited.cc | 6 ++ rtgui/paramsedited.h | 1 + 13 files changed, 199 insertions(+), 46 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index a4b2d0442..0a99ae040 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1347,6 +1347,7 @@ TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode TP_COLORAPP_TCMODE_LIGHTNESS;Lightness TP_COLORAPP_TCMODE_SATUR;Saturation +TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5001\nD55 temp=5500\nD65 temp=6504\nD75 temp=7500 TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 441c7a47d..df75e7a0e 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -962,10 +962,10 @@ void Crop::update (int todo) parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, yb, 1); } else { - double dd, dj; // not used after this block + double dd, dj, yb; // not used after this block parent->ipf.ciecam_02 (cieCrop, adap, begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, dj, 1); + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, dj, yb, 1); } } else { // CIECAM is disbaled, we free up its image buffer to save some space diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index f63b6ba48..d288a23c1 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -772,10 +772,14 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); } - if((params.colorappearance.autoadapscen || params.colorappearance.autoybscen) && acListener && params.colorappearance.enabled) { - acListener->adapCamChanged(adap, (int) yb); //real value of adapt scene luminosity and Yb scene + if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { + acListener->adapCamChanged(adap); //real value of adapt scene } + if(params.colorappearance.autoybscen && acListener && params.colorappearance.enabled) { + acListener->ybCamChanged((int) yb); //real value Yb scene + } + readyphase++; } else { // CIECAM is disabled, we free up its image buffer to save some space diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index dadf0cd2b..f67ba3660 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -210,7 +210,7 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, double &yb, int rtt) { if (params->colorappearance.enabled) { //int lastskip; @@ -266,7 +266,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double Xwout, Zwout; double Xwsc, Zwsc; - double f, c, nc, yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; + double f = 0., c = 0., nc = 0., yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; double fl, n, nbb, ncb, aw; double xwd = 0., ywd, zwd = 0.; double xws, yws, zws; @@ -280,36 +280,50 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); - //viewing condition for surround - if (params->colorappearance.surround == "Average") { + //viewing condition for surrsrc + if (params->colorappearance.surrsrc == "Average") { f = 1.00; c = 0.69; nc = 1.00; + } else if (params->colorappearance.surrsrc == "Dim") { + f = 0.9; + c = 0.59; + nc = 0.9; + } else if (params->colorappearance.surrsrc == "Dark") { + f = 0.8; + c = 0.525; + nc = 0.8; + } else if (params->colorappearance.surrsrc == "ExtremelyDark") { + f = 0.8; + c = 0.41; + nc = 0.8; + } + + + //viewing condition for surround + if (params->colorappearance.surround == "Average") { f2 = 1.0, c2 = 0.69, nc2 = 1.0; } else if (params->colorappearance.surround == "Dim") { f2 = 0.9; c2 = 0.59; nc2 = 0.9; - f = 1.0, c = 0.69, nc = 1.0; } else if (params->colorappearance.surround == "Dark") { f2 = 0.8; c2 = 0.525; nc2 = 0.8; - f = 1.0, c = 0.69, nc = 1.0; } else if (params->colorappearance.surround == "ExtremelyDark") { f2 = 0.8; c2 = 0.41; nc2 = 0.8; - f = 1.0, c = 0.69, nc = 1.0; } - +/* //scene condition for surround if (params->colorappearance.surrsource) { f = 0.85; // if user => source image has surround very dark c = 0.55; nc = 0.85; } - +*/ //with which algorithme if (params->colorappearance.algo == "JC") { alg = 0; @@ -513,7 +527,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } } - if (settings->viewinggreySc == 0) { //auto + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0; } else if (mean < 30.f) { @@ -537,7 +553,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } else { yb = 90.0; } - } + } else { + yb = params->colorappearance.ybscen; + } if (settings->viewinggreySc == 1) { yb = 18.0; @@ -1514,7 +1532,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Yw; Yw = 1.0; double Xw, Zw; - float f, nc, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; + float f = 0.f, nc = 0.f, la, c = 0.f, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; float fl, n, nbb, ncb, aw; //d float xwd, ywd, zwd, xws, yws, zws; int alg = 0; @@ -1531,36 +1549,50 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); - //viewing condition for surround - if (params->colorappearance.surround == "Average") { + //viewing condition for surrsrc + if (params->colorappearance.surrsrc == "Average") { f = 1.00f; c = 0.69f; nc = 1.00f; + } else if (params->colorappearance.surrsrc == "Dim") { + f = 0.9f; + c = 0.59f; + nc = 0.9f; + } else if (params->colorappearance.surrsrc == "Dark") { + f = 0.8f; + c = 0.525f; + nc = 0.8f; + } else if (params->colorappearance.surrsrc == "ExtremelyDark") { + f = 0.8f; + c = 0.41f; + nc = 0.8f; + } + + + //viewing condition for surround + if (params->colorappearance.surround == "Average") { f2 = 1.0f, c2 = 0.69f, nc2 = 1.0f; } else if (params->colorappearance.surround == "Dim") { f2 = 0.9f; c2 = 0.59f; nc2 = 0.9f; - f = 1.0f, c = 0.69f, nc = 1.0f; } else if (params->colorappearance.surround == "Dark") { f2 = 0.8f; c2 = 0.525f; nc2 = 0.8f; - f = 1.0f, c = 0.69f, nc = 1.0f; } else if (params->colorappearance.surround == "ExtremelyDark") { f2 = 0.8f; c2 = 0.41f; nc2 = 0.8f; - f = 1.0f, c = 0.69f, nc = 1.0f; } - +/* //scene condition for surround if (params->colorappearance.surrsource) { f = 0.85f; // if user => source image has surround very dark c = 0.55f; nc = 0.85f; } - +*/ //with which algorithm if (params->colorappearance.algo == "JC") { alg = 0; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 115046067..d9cd17ef5 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -229,7 +229,7 @@ public: LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, double &yb, int rtt); void chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve); void vibrance (LabImage* lab);//Jacques' vibrance void colorCurve (LabImage* lold, LabImage* lnew); diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index fa97d5f7d..6114dc1b5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1155,6 +1155,7 @@ void ProcParams::setDefaults () colorappearance.degreeout = 90; colorappearance.autodegreeout = true; colorappearance.surround = "Average"; + colorappearance.surrsrc = "Average"; colorappearance.adaplum = 16; colorappearance.badpixsl = 0; colorappearance.adapscen = 2000.0; @@ -2110,6 +2111,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); } + if (!pedited || pedited->colorappearance.surrsrc) { + keyFile.set_string ("Color appearance", "Surrsrc", colorappearance.surrsrc); + } + // if (!pedited || pedited->colorappearance.backgrd) keyFile.set_integer ("Color appearance", "Background", colorappearance.backgrd); if (!pedited || pedited->colorappearance.adaplum) { keyFile.set_double ("Color appearance", "AdaptLum", colorappearance.adaplum); @@ -5025,6 +5030,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "Surrsrc")) { + colorappearance.surrsrc = keyFile.get_string ("Color appearance", "Surrsrc"); + + if (pedited) { + pedited->colorappearance.surrsrc = true; + } + } + // if (keyFile.has_key ("Color appearance", "Background")) {colorappearance.backgrd = keyFile.get_integer ("Color appearance", "Background"); if (pedited) pedited->colorappearance.backgrd = true; } if (keyFile.has_key ("Color appearance", "AdaptLum")) { colorappearance.adaplum = keyFile.get_double ("Color appearance", "AdaptLum"); @@ -8326,6 +8339,7 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.degreeout == other.colorappearance.degreeout && colorappearance.autodegreeout == other.colorappearance.autodegreeout && colorappearance.surround == other.colorappearance.surround + && colorappearance.surrsrc == other.colorappearance.surrsrc && colorappearance.adapscen == other.colorappearance.adapscen && colorappearance.autoadapscen == other.colorappearance.autoadapscen && colorappearance.ybscen == other.colorappearance.ybscen diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 405609823..53561ce16 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -595,6 +595,7 @@ public: eCTCModeId curveMode3; Glib::ustring surround; + Glib::ustring surrsrc; double adapscen; bool autoadapscen; int ybscen; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 6678ac1fd..cd4cd4942 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -274,7 +274,9 @@ class AutoCamListener public : virtual ~AutoCamListener() {} virtual void autoCamChanged (double ccam, double ccamout) {} - virtual void adapCamChanged (double cadap, int ybscn) {} + virtual void adapCamChanged (double cadap) {} + virtual void ybCamChanged (int yb) {} + }; class AutoChromaListener diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index de13cfc0e..9d5daa936 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1125,16 +1125,16 @@ private: float d, dj, yb; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { - double dd, dj; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); + double dd, dj, yb; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); } } else { if(settings->ciecamfloat) { float d, dj, yb; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { - double dd, dj; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); + double dd, dj, yb; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); } } } diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 95caa1450..91172cf6a 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -147,9 +147,25 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degree->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p1VBox->pack_start (*degree); - surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); - surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); - p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); + // surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); + // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); + + + Gtk::HBox* surrHBox1 = Gtk::manage (new Gtk::HBox ()); + surrHBox1->set_spacing (2); + surrHBox1->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); + Gtk::Label* surrLabel1 = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); + surrHBox1->pack_start (*surrLabel1, Gtk::PACK_SHRINK); + surrsrc = Gtk::manage (new MyComboBoxText ()); + surrsrc->append (M ("TP_COLORAPP_SURROUND_AVER")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_DIM")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_DARK")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_EXDARK")); + surrsrc->set_active (0); + surrHBox1->pack_start (*surrsrc); + p1VBox->pack_start (*surrHBox1); + + // p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); Gtk::HBox* wbmHBox = Gtk::manage (new Gtk::HBox ()); wbmHBox->set_spacing (2); @@ -173,6 +189,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenL, igreenR)); + tempsc->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); tempsc->show(); greensc->show(); @@ -502,6 +519,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); + tempout->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); tempout->show(); greenout->show(); @@ -572,10 +590,11 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // ------------------------ Listening events - surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); + // surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); wbmodelconn = wbmodel->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::wbmodelChanged) ); algoconn = algo->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::algoChanged) ); surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surroundChanged) ); + surrsrcconn = surrsrc->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsrcChanged) ); degree->setAdjusterListener (this); degreeout->setAdjusterListener (this); @@ -654,6 +673,9 @@ void ColorAppearance::neutral_pressed () shape->reset(); shape2->reset(); shape3->reset(); + gamutconn.block (true); + gamut->set_active (true); + gamutconn.block (false); degree->setAutoValue (true); degree->resetValue (false); adapscen->resetValue (false); @@ -710,7 +732,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) contrast->setEditedState (pedited->colorappearance.contrast ? Edited : UnEdited); qcontrast->setEditedState (pedited->colorappearance.qcontrast ? Edited : UnEdited); colorh->setEditedState (pedited->colorappearance.colorh ? Edited : UnEdited); - surrsource->set_inconsistent (!pedited->colorappearance.surrsource); +// surrsource->set_inconsistent (!pedited->colorappearance.surrsource); gamut->set_inconsistent (!pedited->colorappearance.gamut); // badpix->set_inconsistent (!pedited->colorappearance.badpix); datacie->set_inconsistent (!pedited->colorappearance.datacie); @@ -744,6 +766,25 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) setEnabled (pp->colorappearance.enabled); + surrsrcconn.block (true); + + if (pedited && !pedited->colorappearance.surrsrc) { + surrsrc->set_active (4); + } else if (pp->colorappearance.surrsrc == "Average") { + surrsrc->set_active (0); + } else if (pp->colorappearance.surrsrc == "Dim") { + surrsrc->set_active (1); + } else if (pp->colorappearance.surrsrc == "Dark") { + surrsrc->set_active (2); + } else if (pp->colorappearance.surrsrc == "ExtremelyDark") { + surrsrc->set_active (3); + } + + surrsrcconn.block (false); + // Have to be manually called to handle initial state update + surrsrcChanged(); + + surroundconn.block (true); if (pedited && !pedited->colorappearance.surround) { @@ -762,6 +803,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update surroundChanged(); + + wbmodelconn.block (true); if (pedited && !pedited->colorappearance.wbmodel) { @@ -796,9 +839,9 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update algoChanged(); - surrconn.block (true); - surrsource->set_active (pp->colorappearance.surrsource); - surrconn.block (false); + // surrconn.block (true); + // surrsource->set_active (pp->colorappearance.surrsource); + // surrconn.block (false); gamutconn.block (true); gamut->set_active (pp->colorappearance.gamut); gamutconn.block (false); @@ -815,7 +858,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_active (pp->colorappearance.sharpcie); // sharpcieconn.block (false); - lastsurr = pp->colorappearance.surrsource; + // lastsurr = pp->colorappearance.surrsource; lastgamut = pp->colorappearance.gamut; // lastbadpix=pp->colorappearance.badpix; lastdatacie = pp->colorappearance.datacie; @@ -890,7 +933,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.qcontrast = qcontrast->getValue (); pp->colorappearance.colorh = colorh->getValue (); pp->colorappearance.rstprotection = rstprotection->getValue (); - pp->colorappearance.surrsource = surrsource->get_active(); + // pp->colorappearance.surrsource = surrsource->get_active(); pp->colorappearance.gamut = gamut->get_active(); // pp->colorappearance.badpix = badpix->get_active(); pp->colorappearance.datacie = datacie->get_active(); @@ -953,9 +996,10 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.autoybscen = !ybscen->getAutoInconsistent(); pedited->colorappearance.enabled = !get_inconsistent(); pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->colorappearance.surrsrc = surrsrc->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.algo = algo->get_active_text() != M ("GENERAL_UNCHANGED"); - pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); + // pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); pedited->colorappearance.gamut = !gamut->get_inconsistent(); // pedited->colorappearance.badpix = !badpix->get_inconsistent(); pedited->colorappearance.datacie = !datacie->get_inconsistent(); @@ -975,6 +1019,17 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) } + if (surrsrc->get_active_row_number() == 0) { + pp->colorappearance.surrsrc = "Average"; + } else if (surrsrc->get_active_row_number() == 1) { + pp->colorappearance.surrsrc = "Dim"; + } else if (surrsrc->get_active_row_number() == 2) { + pp->colorappearance.surrsrc = "Dark"; + } else if (surrsrc->get_active_row_number() == 3) { + pp->colorappearance.surrsrc = "ExtremelyDark"; + } + + if (surround->get_active_row_number() == 0) { pp->colorappearance.surround = "Average"; } else if (surround->get_active_row_number() == 1) { @@ -1079,7 +1134,7 @@ bool ColorAppearance::curveMode3Changed_ () return false; } - +/* void ColorAppearance::surrsource_toggled () { @@ -1104,7 +1159,7 @@ void ColorAppearance::surrsource_toggled () } } } - +*/ void ColorAppearance::gamut_toggled () { @@ -1326,10 +1381,9 @@ bool ColorAppearance::autoCamComputed_ () return false; } -void ColorAppearance::adapCamChanged (double cadap, int ybsc) +void ColorAppearance::adapCamChanged (double cadap) { nextCadap = cadap; - nextYbscn = ybsc; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->adapCamComputed_(); @@ -1345,12 +1399,35 @@ bool ColorAppearance::adapCamComputed_ () disableListener (); // degree->setEnabled (true); adapscen->setValue (nextCadap); - ybscen->setValue (nextYbscn); +// ybscen->setValue (nextYbscn); enableListener (); return false; } +void ColorAppearance::ybCamChanged (int ybsc) +{ + nextYbscn = ybsc; + + const auto func = [] (gpointer data) -> gboolean { + static_cast (data)->ybCamComputed_(); + return FALSE; + }; + + idle_register.add (func, this); +} + +bool ColorAppearance::ybCamComputed_ () +{ + + disableListener (); +// degree->setEnabled (true); +// adapscen->setValue (nextCadap); + ybscen->setValue (nextYbscn); + enableListener (); + + return false; +} void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { @@ -1528,6 +1605,15 @@ void ColorAppearance::enabledChanged () } } +void ColorAppearance::surrsrcChanged () +{ + + if (listener && (multiImage || getEnabled()) ) { + listener->panelChanged (EvCATsurr, surrsrc->get_active_text ()); + } +} + + void ColorAppearance::surroundChanged () { @@ -1652,6 +1738,7 @@ void ColorAppearance::setBatchMode (bool batchMode) greensc->showEditedCB (); surround->append (M ("GENERAL_UNCHANGED")); + surrsrc->append (M ("GENERAL_UNCHANGED")); wbmodel->append (M ("GENERAL_UNCHANGED")); algo->append (M ("GENERAL_UNCHANGED")); toneCurveMode->append (M ("GENERAL_UNCHANGED")); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 9c2a84d67..4afed28cb 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -49,6 +49,7 @@ public: // void adjusterAdapToggled (Adjuster* a, bool newval); void enabledChanged (); void surroundChanged (); + void surrsrcChanged (); void wbmodelChanged (); void algoChanged (); void surrsource_toggled (); @@ -59,8 +60,10 @@ public: // void sharpcie_toggled (); void autoCamChanged (double ccam, double ccamout); bool autoCamComputed_ (); - void adapCamChanged (double cadap, int ybscn); + void adapCamChanged (double cadap); bool adapCamComputed_ (); + void ybCamChanged (int yb); + bool ybCamComputed_ (); void curveChanged (CurveEditor* ce); void curveMode1Changed (); @@ -127,6 +130,8 @@ private: Gtk::CheckButton* tonecie; // Gtk::CheckButton* sharpcie; Gtk::Button* neutral; + MyComboBoxText* surrsrc; + sigc::connection surrsrcconn; MyComboBoxText* surround; sigc::connection surroundconn; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 6de9cbb0c..eb0b77085 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -178,6 +178,7 @@ void ParamsEdited::set (bool v) colorappearance.degreeout = v; colorappearance.autodegreeout = v; colorappearance.surround = v; + colorappearance.surrsrc = v; colorappearance.adapscen = v; colorappearance.autoadapscen = v; colorappearance.ybscen = v; @@ -708,6 +709,7 @@ void ParamsEdited::initFrom (const std::vector colorappearance.degreeout = colorappearance.degreeout && p.colorappearance.degreeout == other.colorappearance.degreeout; colorappearance.autodegreeout = colorappearance.autodegreeout && p.colorappearance.autodegreeout == other.colorappearance.autodegreeout; colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround; + colorappearance.surrsrc = colorappearance.surrsrc && p.colorappearance.surrsrc == other.colorappearance.surrsrc; colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen; colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen; colorappearance.ybscen = colorappearance.ybscen && p.colorappearance.ybscen == other.colorappearance.ybscen; @@ -1735,6 +1737,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.surround = mods.colorappearance.surround; } + if (colorappearance.surrsrc) { + toEdit.colorappearance.surrsrc = mods.colorappearance.surrsrc; + } + if (colorappearance.autoadapscen) { toEdit.colorappearance.autoadapscen = mods.colorappearance.autoadapscen; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index ef32bea63..35e3c80b8 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -294,6 +294,7 @@ public: bool autoadapscen; bool autoybscen; bool surround; + bool surrsrc; bool adapscen; bool adaplum; bool ybscen; From 0c7b59ece877d60eb9c4943ba5d29cd0eb444420 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 14 Aug 2017 17:49:11 +0200 Subject: [PATCH 011/126] Suppress ciecam options --- rtdata/languages/default | 2 +- rtgui/options.cc | 8 ++++---- rtgui/preferences.cc | 12 ++++++------ rtgui/preferences.h | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 0a99ae040..bdd1c9c3b 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1347,7 +1347,7 @@ TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode TP_COLORAPP_TCMODE_LIGHTNESS;Lightness TP_COLORAPP_TCMODE_SATUR;Saturation -TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5001\nD55 temp=5500\nD65 temp=6504\nD75 temp=7500 +TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] diff --git a/rtgui/options.cc b/rtgui/options.cc index 9ee4b7538..7293a3a63 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -642,7 +642,7 @@ void Options::setDefaults () #endif // rtSettings.viewingdevice = 0; // rtSettings.viewingdevicegrey = 3; - rtSettings.viewinggreySc = 1; + // rtSettings.viewinggreySc = 1; rtSettings.leveldnv = 2; rtSettings.leveldnti = 0; rtSettings.leveldnaut = 0; @@ -1557,11 +1557,11 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); } */ - +/* if (keyFile.has_key ("Color Management", "greySc")) { rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); } - +*/ if (keyFile.has_key ("Color Management", "CBDLArtif")) { rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif"); } @@ -2133,7 +2133,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); //keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); //keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); - keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); +// keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index bac6a08d1..3caff71c3 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -878,14 +878,14 @@ Gtk::Widget* Preferences::getColorManagementPanel () grey->append (M("PREFERENCES_GREY30")); grey->append (M("PREFERENCES_GREY40")); */ - +/* Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); greySc = Gtk::manage (new Gtk::ComboBoxText ()); setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); greySc->append (M ("PREFERENCES_GREYSCA")); greySc->append (M ("PREFERENCES_GREYSC18")); - +*/ Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) ); setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); @@ -900,8 +900,8 @@ Gtk::Widget* Preferences::getColorManagementPanel () colo->attach (*greylab, 0, 2, 1, 1); colo->attach (*grey, 1, 2, 1, 1); */ - colo->attach (*greySclab, 0, 3, 1, 1); - colo->attach (*greySc, 1, 3, 1, 1); +// colo->attach (*greySclab, 0, 3, 1, 1); +// colo->attach (*greySc, 1, 3, 1, 1); cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CIEART_LABEL"))); setExpandAlignProperties (cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); colo->attach (*cbciecamfloat, 0, 4, 2, 1); @@ -1716,7 +1716,7 @@ void Preferences::storePreferences () moptions.rtSettings.iccDirectory = iccDir->get_filename (); // moptions.rtSettings.viewingdevice = view->get_active_row_number (); // moptions.rtSettings.viewingdevicegrey = grey->get_active_row_number (); - moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); +// moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); // moptions.rtSettings.autocielab = cbAutocielab->get_active (); moptions.rtSettings.ciecamfloat = cbciecamfloat->get_active (); moptions.rtSettings.HistogramWorking = ckbHistogramWorking->get_active (); @@ -1876,7 +1876,7 @@ void Preferences::fillPreferences () // view->set_active (moptions.rtSettings.viewingdevice); // grey->set_active (moptions.rtSettings.viewingdevicegrey); - greySc->set_active (moptions.rtSettings.viewinggreySc); +// greySc->set_active (moptions.rtSettings.viewinggreySc); dnv->set_active (moptions.rtSettings.leveldnv); dnti->set_active (moptions.rtSettings.leveldnti); dnliss->set_active (moptions.rtSettings.leveldnliss); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index d392082bb..1a86c64a9 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -122,9 +122,9 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::SpinButton* panFactor; Gtk::CheckButton* rememberZoomPanCheckbutton; - Gtk::ComboBoxText* view; - Gtk::ComboBoxText* grey; - Gtk::ComboBoxText* greySc; + // Gtk::ComboBoxText* view; +// Gtk::ComboBoxText* grey; +// Gtk::ComboBoxText* greySc; Gtk::ComboBoxText* dnv; Gtk::ComboBoxText* dnti; Gtk::ComboBoxText* dnaut; From 411b7b59751032fc17e8b353d682a434dcf0d3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Mon, 14 Aug 2017 21:52:01 +0200 Subject: [PATCH 012/126] Fix wrong rounding in `PreviewWindow` (fixes #3773) --- rtgui/previewwindow.cc | 2 +- rtgui/previewwindow.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/previewwindow.cc b/rtgui/previewwindow.cc index 015c30d4c..cd4e0c75c 100644 --- a/rtgui/previewwindow.cc +++ b/rtgui/previewwindow.cc @@ -216,7 +216,7 @@ bool PreviewWindow::on_motion_notify_event (GdkEventMotion* event) CursorShape newType = cursor_type; if (isMoving) { - mainCropWin->remoteMove ((int)((event->x - (double)press_x) / zoom), (int)((event->y - (double)press_y) / zoom)); + mainCropWin->remoteMove ((event->x - press_x) / zoom, (event->y - press_y) / zoom); press_x = event->x; press_y = event->y; } else if (inside) { diff --git a/rtgui/previewwindow.h b/rtgui/previewwindow.h index a7b286202..f50411170 100644 --- a/rtgui/previewwindow.h +++ b/rtgui/previewwindow.h @@ -36,7 +36,7 @@ private: ImageArea* imageArea; int imgX, imgY, imgW, imgH; double zoom; - int press_x, press_y; + double press_x, press_y; bool isMoving; bool needsUpdate; CursorShape cursor_type; From 986bbaa2cf65e0d6413203c7ef3a21cbbf42cb9f Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 15 Aug 2017 08:44:35 +0200 Subject: [PATCH 013/126] Change behavior sliders La --- rtgui/colorappearance.cc | 103 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 5 deletions(-) diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 91172cf6a..98f5d0ecc 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -27,6 +27,9 @@ #define MINGREEN0 0.8 #define MAXGREEN0 1.2 +#define MINLA0 0.01 +#define MAXLA0 16384 +#define CENTERLA0 500 using namespace rtengine; using namespace rtengine::procparams; @@ -59,6 +62,90 @@ static double wbSlider2Temp (double sval) return temp; } +static double wbSlider2la (double sval) +{ + + // slider range: 0 - 10000 + double la; + + if (sval <= 500) { + // linear below center-temp + la= MINLA0 + (sval / 500.0) * (CENTERLA0 - MINLA0); + } else { + const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); + double x = (sval - 500) / 500; // x 0..1 + double y = x * slope + (1.0 - slope) * pow (x, 4.0); + //double y = pow(x, 4.0); + la = CENTERLA0 + y * (MAXLA0 - CENTERLA0); + } + + if (la < MINLA0) { + la = MINLA0; + } + + if (la > MAXLA0) { + la = MAXLA0; + } + + return la; +} + +static double wbla2Slider (double la) +{ + + double sval; + + if (la <= CENTERLA0) { + sval = ((la - MINLA0) / (CENTERLA0 - MINLA0)) * 500.0; + } else { + const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); + const double y = (la - CENTERLA0) / (MAXLA0 - CENTERLA0); + double x = pow (y, 0.25); // rough guess of x, will be a little lower + double k = 0.1; + bool add = true; + + // the y=f(x) function is a mess to invert, therefore we have this trial-refinement loop instead. + // from tests, worst case is about 20 iterations, ie no problem + for (;;) { + double y1 = x * slope + (1.0 - slope) * pow (x, 4.0); + + if (500 * fabs (y1 - y) < 0.1) { + break; + } + + if (y1 < y) { + if (!add) { + k /= 2; + } + + x += k; + add = true; + } else { + if (add) { + k /= 2; + } + + x -= k; + add = false; + } + } + + sval = 500.0 + x * 500.0; + } + + if (sval < 0) { + sval = 0; + } + + if (sval > 16384.) { + sval = 16384.; + } + + return sval; +} + + + static double wbTemp2Slider (double temp) { @@ -197,7 +284,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p1VBox->pack_start (*greensc); - adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.001, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 + // adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 + adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adapscen->delay < options.adjusterMaxDelay) { adapscen->delay = options.adjusterMaxDelay; @@ -486,8 +574,13 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p3VBox = Gtk::manage ( new Gtk::VBox()); p3VBox->set_spacing (2); - - adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); + + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + // adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); + adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adaplum->delay < options.adjusterMaxDelay) { adaplum->delay = options.adjusterMaxDelay; @@ -510,12 +603,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degreeout->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p3VBox->pack_start (*degreeout); - +/* Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - +*/ tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); From f63b1f5e9ab45e26fa7feae9d5dec04825c27f00 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 15 Aug 2017 19:34:41 +0200 Subject: [PATCH 014/126] Renamed TooWaGrey-ExtraBright to TooWaGrey - Average Surround --- ...ght-GTK3-20_.css => TooWaGrey - Average Surround-GTK3-20_.css} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename rtdata/themes/{TooWaGrey-ExtraBright-GTK3-20_.css => TooWaGrey - Average Surround-GTK3-20_.css} (100%) diff --git a/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css b/rtdata/themes/TooWaGrey - Average Surround-GTK3-20_.css similarity index 100% rename from rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css rename to rtdata/themes/TooWaGrey - Average Surround-GTK3-20_.css From d6cc8d300b693f4cb0cfaaada1ef02d5e8c3bbea Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 15 Aug 2017 19:51:04 +0200 Subject: [PATCH 015/126] Renamed TooWaBlue theme variants --- ...WaBlue-Bright-GTK3-20_.css => TooWaBlue - Bright-GTK3-20_.css} | 0 ...{TooWaBlue-Dark-GTK3-20_.css => TooWaBlue - Dark-GTK3-20_.css} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename rtdata/themes/{TooWaBlue-Bright-GTK3-20_.css => TooWaBlue - Bright-GTK3-20_.css} (100%) rename rtdata/themes/{TooWaBlue-Dark-GTK3-20_.css => TooWaBlue - Dark-GTK3-20_.css} (100%) diff --git a/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css b/rtdata/themes/TooWaBlue - Bright-GTK3-20_.css similarity index 100% rename from rtdata/themes/TooWaBlue-Bright-GTK3-20_.css rename to rtdata/themes/TooWaBlue - Bright-GTK3-20_.css diff --git a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css b/rtdata/themes/TooWaBlue - Dark-GTK3-20_.css similarity index 100% rename from rtdata/themes/TooWaBlue-Dark-GTK3-20_.css rename to rtdata/themes/TooWaBlue - Dark-GTK3-20_.css From da4630ef221609919956e6f7f9376240f2cabb94 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 15 Aug 2017 20:08:41 +0200 Subject: [PATCH 016/126] Removed "Default" from "Default Language" and "Default Theme", regenerated translations. --- rtdata/languages/Catala | 18 +++++++++++++----- rtdata/languages/Chinese (Simplified) | 16 ++++++++++++---- rtdata/languages/Chinese (Traditional) | 18 +++++++++++++----- rtdata/languages/Czech | 16 ++++++++++++++-- rtdata/languages/Dansk | 18 +++++++++++++----- rtdata/languages/Deutsch | 16 ++++++++++++++-- rtdata/languages/English (UK) | 18 +++++++++++++----- rtdata/languages/English (US) | 18 +++++++++++++----- rtdata/languages/Espanol | 12 ++++++++++-- rtdata/languages/Euskara | 18 +++++++++++++----- rtdata/languages/Francais | 16 ++++++++++++++-- rtdata/languages/Greek | 18 +++++++++++++----- rtdata/languages/Hebrew | 18 +++++++++++++----- rtdata/languages/Italiano | 12 ++++++++++-- rtdata/languages/Japanese | 12 ++++++++++-- rtdata/languages/Latvian | 18 +++++++++++++----- rtdata/languages/Magyar | 18 +++++++++++++----- rtdata/languages/Nederlands | 12 ++++++++++-- rtdata/languages/Norsk BM | 18 +++++++++++++----- rtdata/languages/Polish | 12 ++++++++++-- rtdata/languages/Polish (Latin Characters) | 12 ++++++++++-- rtdata/languages/Portugues (Brasil) | 18 +++++++++++++----- rtdata/languages/Russian | 14 +++++++++++--- rtdata/languages/Serbian (Cyrilic Characters) | 12 ++++++++++-- rtdata/languages/Serbian (Latin Characters) | 12 ++++++++++-- rtdata/languages/Slovak | 18 +++++++++++++----- rtdata/languages/Suomi | 18 +++++++++++++----- rtdata/languages/Swedish | 12 ++++++++++-- rtdata/languages/Turkish | 18 +++++++++++++----- rtdata/languages/default | 12 ++++++------ rtgui/preferences.cc | 4 ++-- 31 files changed, 358 insertions(+), 114 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 2f8093799..19d1ac3b2 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -518,8 +518,6 @@ PREFERENCES_DARKFRAMESHOTS;trets PREFERENCES_DARKFRAMETEMPLATES;plantilles PREFERENCES_DATEFORMAT;Format de data PREFERENCES_DATEFORMATHINT;Podeu fer servir les següents cadenes formatades:\n%y : any\n%m : mes\n%d : dia\n\nPer exemple, el format de data hongarès és:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Idioma per omissió -PREFERENCES_DEFAULTTHEME;Tema per omissió PREFERENCES_DIRDARKFRAMES;Carpeta de marcs foscos PREFERENCES_DIRHOME;directori home PREFERENCES_DIRLAST;Últim directori usat @@ -966,6 +964,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1018,6 +1017,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !GENERAL_AUTO;Automatic !GENERAL_CLOSE;Close !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_174;CIECAM02 @@ -1305,6 +1305,9 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1398,7 +1401,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1415,7 +1419,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1428,6 +1433,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1469,6 +1475,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1602,7 +1609,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1627,6 +1634,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index c726095bb..4a9120abb 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -417,8 +417,6 @@ PREFERENCES_D60;6000K PREFERENCES_D65;6500K PREFERENCES_DATEFORMAT;日期格式 PREFERENCES_DATEFORMATHINT;可以使用下列控制符:\n%y : 年\n%m : 月h\n%d : 日\n\n例如,中文日期格式:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;缺省语言 -PREFERENCES_DEFAULTTHEME;默认主题 PREFERENCES_DIRHOME;用户文件路径 PREFERENCES_DIRLAST;上次访问路径 PREFERENCES_DIROTHER;其他 @@ -797,6 +795,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !CURVEEDITOR_PARAMETRIC;Parametric !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -878,6 +877,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -1223,6 +1223,9 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1331,6 +1334,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DARKFRAME;Dark-Frame !PREFERENCES_DARKFRAMEFOUND;Found !PREFERENCES_DARKFRAMESHOTS;shots @@ -1354,7 +1358,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1369,6 +1374,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1431,6 +1437,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1540,7 +1547,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_LABEL_SCENE;Scene Conditions !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1559,6 +1566,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index 24b6aed27..e2d457c14 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -253,8 +253,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;高光提示 PREFERENCES_DATEFORMAT;日期格式 PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;預設語言 -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;用戶檔路徑 PREFERENCES_DIRLAST;上次訪問路徑 PREFERENCES_DIROTHER;其他 @@ -457,6 +455,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -582,6 +581,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !GENERAL_NONE;None !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -963,6 +963,9 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1134,7 +1137,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1163,7 +1167,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1178,6 +1183,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1243,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1403,7 +1410,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1428,6 +1435,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 7b64b64dc..d9646626c 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -1001,8 +1001,6 @@ PREFERENCES_DATEFORMAT;Formát data PREFERENCES_DATEFORMATHINT;Lze použít následující formátovací řetězce:\n%y\t- rok (year)\n%m\t- měsíc (month)\n%d\t- den (day)\n\nNapříklad český formát data:\n%d. %m. %y PREFERENCES_DAUB_LABEL;Použít D6 Daubechiesové vlnky namísto D4 PREFERENCES_DAUB_TOOLTIP;Nástroje Redukce šumu a Úrovně vlnky používají Daubechiesové mateřskou vlnku. Pokud místo D4 vyberete D6 zvýší se počet ortogonálních Daubechiesové koeficientů a pravděpodobně zvýší kvalitu úrovní malého měřítka. Není zde rozdíl ve spotřebě paměti nebo délce zpracování. -PREFERENCES_DEFAULTLANG;Výchozí jazyk -PREFERENCES_DEFAULTTHEME;Výchozí vzhled PREFERENCES_DIRDARKFRAMES;Složka tmavých snímků PREFERENCES_DIRHOME;Domovská složka PREFERENCES_DIRLAST;Poslední navštívená složka @@ -2167,3 +2165,17 @@ ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit obrázek obrazovce\nZkratka: f ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 710b92b0e..fc4451910 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maksimal miniaturehøjde PREFERENCES_CLIPPINGIND;Indikator for udbrændte områder PREFERENCES_DATEFORMAT;Datoformat PREFERENCES_DATEFORMATHINT;Du kan bruge følgende formatindstillinger:\n%y : år\n%m : måned\n%d : dag\n\nDet typiske datoformat i danmark er:\n%d/%m/%y -PREFERENCES_DEFAULTLANG;Sprog -PREFERENCES_DEFAULTTHEME;Tema PREFERENCES_DIRHOME;Standardmappe PREFERENCES_DIRLAST;Sidst anvendte mappe PREFERENCES_DIROTHER;Andet @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 79b976185..48218cc8d 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -1021,8 +1021,6 @@ PREFERENCES_DATEFORMAT;Format PREFERENCES_DATEFORMATHINT;Die folgenden Variablen können verwendet werden:\n%y : Jahr\n%m : Monat\n%d : Tag\n\nBeispiele:\n%d.%m.%y (übliche deutsche Datumsschreibweise)\n%y-%m-%d (Datumsformat nach ISO 8601 und EN 28601) PREFERENCES_DAUB_LABEL;Benutze Daubechies D6-Wavelets anstatt D4 PREFERENCES_DAUB_TOOLTIP;Rauschreduzierung und Waveletebenen verwenden ein Debauchies Mutter-Wavelet. Wenn Sie D6 statt D4 wählen, erhöhen Sie die Anzahl der orthogonalen Daubechies-Koeffizienten, was die Qualität bei niedrigen Ebenen verbessern kann. Es gibt keinen Unterschied zwischen D4 und D6 im Speicherverbrauch oder in der Verarbeitungszeit. -PREFERENCES_DEFAULTLANG;Sprache für Menüs und Dialoge -PREFERENCES_DEFAULTTHEME;Oberflächendesign PREFERENCES_DIRDARKFRAMES;Dunkelbild-Verzeichnis PREFERENCES_DIRHOME;Benutzer-Verzeichnis PREFERENCES_DIRLAST;Zuletzt geöffnetes Verzeichnis @@ -2187,3 +2185,17 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen\nTaste: f ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: + ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index a9baed7ed..de265b960 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -58,7 +58,6 @@ TP_COLORAPP_CHROMA_M_TOOLTIP;Colourfulness in CIECAM02 differs from L*a*b* and R TP_COLORAPP_CURVEEDITOR3;Colour curve TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Adjust either chroma, saturation or colourfulness.\n\nShows the histogram of chromaticity (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of C, s or M after CIECAM02.\n\nC, s and M are not shown in the main histogram panel.\nFor final output refer to the main histogram panel. TP_COLORAPP_LABEL;CIE Colour Appearance Model 2002 -TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Colour Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Colour Management. TP_COLORAPP_SURROUND_TOOLTIP;Changes tones and colours 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_TCMODE_COLORF;Colourfulness TP_COLORTONING_COLOR;Colour @@ -141,6 +140,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !CURVEEDITOR_TOOLTIPSAVE;Save current curve. !CURVEEDITOR_TYPE;Type: !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -334,6 +334,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !GENERAL_SAVE;Save !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -786,6 +787,9 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1023,7 +1027,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1035,8 +1040,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -!PREFERENCES_DEFAULTLANG;Default Language -!PREFERENCES_DEFAULTTHEME;Default Theme !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_DIRHOME;Home directory !PREFERENCES_DIRLAST;Last visited directory @@ -1068,7 +1071,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1087,6 +1091,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_INTENT_PERCEPTUAL;Perceptual !PREFERENCES_INTENT_SATURATION;Saturation !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1172,6 +1177,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_TAB_IMPROC;Image Processing !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1359,6 +1365,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1381,6 +1388,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index d768da5e7..2f32e4419 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -37,6 +37,7 @@ !CURVEEDITOR_TOOLTIPSAVE;Save current curve. !CURVEEDITOR_TYPE;Type: !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -235,6 +236,7 @@ !GENERAL_SAVE;Save !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -705,6 +707,9 @@ !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -953,7 +958,8 @@ !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -965,8 +971,6 @@ !PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -!PREFERENCES_DEFAULTLANG;Default Language -!PREFERENCES_DEFAULTTHEME;Default Theme !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_DIRHOME;Home directory !PREFERENCES_DIRLAST;Last visited directory @@ -998,7 +1002,8 @@ !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1020,6 +1025,7 @@ !PREFERENCES_INTENT_RELATIVE;Relative Colorimetric !PREFERENCES_INTENT_SATURATION;Saturation !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1111,6 +1117,7 @@ !PREFERENCES_TAB_IMPROC;Image Processing !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1315,7 +1322,7 @@ !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1340,6 +1347,7 @@ !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 9d7e4a78c..057c30f88 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -765,8 +765,6 @@ PREFERENCES_DARKFRAMESHOTS;disparos PREFERENCES_DARKFRAMETEMPLATES;plantillas PREFERENCES_DATEFORMAT;Formato de fecha PREFERENCES_DATEFORMATHINT;Puede usar las siguientes variables :\n%y : año\n%m : mes\n%d : dia\n\nPor ejemplo, la fecha en formato Húngaro es: \n%y/%m/%d -PREFERENCES_DEFAULTLANG;Idioma predeterminado -PREFERENCES_DEFAULTTHEME;Tema predeterminado PREFERENCES_DIRDARKFRAMES;Carpeta con las Tomas Negras PREFERENCES_DIRHOME;Carpeta de usuario PREFERENCES_DIRLAST;Última carpeta visitada @@ -1507,6 +1505,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1536,6 +1535,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1698,6 +1698,9 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1760,11 +1763,13 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1772,6 +1777,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1809,6 +1815,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1826,6 +1833,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index af995e34e..bc7f738f4 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Itzal/argi moztuen adierazlea PREFERENCES_DATEFORMAT;Data formatua PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Hizkuntza -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;Etxe karpeta PREFERENCES_DIRLAST;Azkena ikusitako karpeta PREFERENCES_DIROTHER;Besterik @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 65cf503eb..9d9f32b3b 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -962,8 +962,6 @@ PREFERENCES_DATEFORMAT;Format PREFERENCES_DATEFORMATHINT;Vous pouvez utiliser les paramètres de chaînes formatées suivants:\n%y : année\n%m : mois\n%d : jour\n\nPar exemple, le format de date française est:\n%d/%m/%y PREFERENCES_DAUB_LABEL;Utiliser les ondelettes de Daubechies D6 au lieu de D4 PREFERENCES_DAUB_TOOLTIP;Les outils de Réduction de Bruit et de Niveaux d'Ondelettes utilisent une ondelette de Debauchie mère. Si vous choisissez D6 au lieu de D4 vous augmentez le nombre de coéf. orthogonaux de Daubechies et augmentez probablement la qualité des niveaux de taille moyenne. Il n'y a pas de différence de consommation mémoire ou de temps de traitement entre les deux. -PREFERENCES_DEFAULTLANG;Langue par défaut -PREFERENCES_DEFAULTTHEME;Thème par défaut PREFERENCES_DIRDARKFRAMES;Dossier des images de Trame Noire PREFERENCES_DIRHOME;Racine de mes documents personnels PREFERENCES_DIRLAST;Dernier dossier visité @@ -2129,3 +2127,17 @@ ZOOMPANEL_ZOOMFITSCREEN;Affiche l'image entière\nRaccourci: f ZOOMPANEL_ZOOMIN;Zoom Avant\nRaccourci: + ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 9b9ef809f..ec127d7cd 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Ένδειξη ψαλιδίσματος PREFERENCES_DATEFORMAT;Διάταξη ημερομηνίας PREFERENCES_DATEFORMATHINT;YΜπορείτε να χρησιμοποιήσετε τις εξής εντολές μορφοποίησης:\n%y : χρονολογία\n%m : μήνας\n%d : ημέρα\n\nΓια παράδειγμα, η μορφοποίηση ημερομηνίας στην Ελλάδα είναι:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Προεπιλεγμένη γλώσσα -PREFERENCES_DEFAULTTHEME;Προεπιλεγμένο θέμα PREFERENCES_DIRHOME;Τοποθεσία "Home" PREFERENCES_DIRLAST;Τελευταία τοποθεσία που χρησιμοποιήθηκε PREFERENCES_DIROTHER;Άλλο @@ -448,6 +446,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -577,6 +576,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -958,6 +958,9 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1131,7 +1134,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1160,7 +1164,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1175,6 +1180,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1240,6 +1246,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1400,7 +1407,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1425,6 +1432,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index 7a310e3af..9dc402fd7 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;סימון קיצוץ PREFERENCES_DATEFORMAT;צורת תאריך PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;שפה ברירת המחדל -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;תיקיית הבית PREFERENCES_DIRLAST;תיקיה האחרונה שביקרתי בה PREFERENCES_DIROTHER;אחר @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index d6e441796..d26005bfa 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -667,8 +667,6 @@ PREFERENCES_DARKFRAMESHOTS;fotogrammi PREFERENCES_DARKFRAMETEMPLATES;modelli PREFERENCES_DATEFORMAT;Formato della data PREFERENCES_DATEFORMATHINT;Puoi usare le seguenti stringhe di formattazione:\n%y : anno\n%m : mese\n%d : giorno\n\nPer esempio, il formato italiano per la data è:\n%d/%m/%y -PREFERENCES_DEFAULTLANG;Lingua predefinita -PREFERENCES_DEFAULTTHEME;Tema predefinito PREFERENCES_DIRDARKFRAMES;Cartella dei fotogrammi di fondo (Dark Frame) PREFERENCES_DIRHOME;Cartella personale dell'utente (home directory) PREFERENCES_DIRLAST;Ultima cartella visitata @@ -1338,6 +1336,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1366,6 +1365,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_256;NR - Median type !HISTORY_MSG_257;Color Toning @@ -1571,6 +1571,9 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1630,12 +1633,14 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1643,6 +1648,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1680,6 +1686,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1697,6 +1704,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 74249d80d..1ce714311 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -889,8 +889,6 @@ PREFERENCES_DATEFORMAT;日付の形式 PREFERENCES_DATEFORMATHINT;次の書式を使用することができます:\n%y : 年\n%m : 月\n%d : 日\n\n例として, ハンガリアン記法の日付:\n%y/%m/%d PREFERENCES_DAUB_LABEL;ドビッシー関数のタイプ D4の代わりにD6を使う PREFERENCES_DAUB_TOOLTIP;ノイズ低減とウェーブレットのレベルツールはマザーウェーブレットにドビッシーを使っています。このタイプでD4の代わりにD6を選択すると、直交系であるドビッシーの係数が増えるので、恐らくスケールの小さいレベルは質が向上するでしょう。タイプを変えても処理時間やメモリー使用量に影響はありません。 -PREFERENCES_DEFAULTLANG;デフォルトの言語 -PREFERENCES_DEFAULTTHEME;デフォルトテーマ PREFERENCES_DIRDARKFRAMES;ダークフレーム・ディレクトリ PREFERENCES_DIRHOME;ホーム・ディレクトリ PREFERENCES_DIRLAST;最近参照したディレクトリ @@ -1877,6 +1875,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1895,6 +1894,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !GENERAL_APPLY;Apply !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius @@ -1949,6 +1949,9 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1983,6 +1986,9 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language !PREFERENCES_MONINTENT;Default rendering intent !PREFERENCES_MONITOR;Monitor !PREFERENCES_MONPROFILE;Default color profile @@ -1997,6 +2003,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. @@ -2007,6 +2014,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_DIRPYRDENOISE_3X3;3×3 !TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft !TP_DIRPYRDENOISE_5X5;5×5 diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index f65d66ad4..c0ee7ec5f 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Keša maksimālais sīktēla augstums PREFERENCES_CLIPPINGIND;Cirpšanas pazīme PREFERENCES_DATEFORMAT;Datuma formāts PREFERENCES_DATEFORMATHINT;Jūs varat lietot šāduas formatēšanas parametrus:\n%y : gads\n%m : mēnesis\n%d : diena\n\nPiemēram, ungāru datuma formāts ir:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Noklusētā valoda -PREFERENCES_DEFAULTTHEME;Noklusētā tēma PREFERENCES_DIRHOME;Mājas mape PREFERENCES_DIRLAST;Pēdējā lietotā mape PREFERENCES_DIROTHER;Cita @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index ed93eeb98..557c31685 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -499,8 +499,6 @@ PREFERENCES_DARKFRAMESHOTS;kép PREFERENCES_DARKFRAMETEMPLATES;sablonok PREFERENCES_DATEFORMAT;Dátumformátum PREFERENCES_DATEFORMATHINT;A következő jeleket lehet használni:\n%y : év\n%m : hónap\n%d : nap\n\nPéldául a magyar dátumformátum:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Alapértelmezett nyelv -PREFERENCES_DEFAULTTHEME;Alapértelmezett kinézet PREFERENCES_DIRDARKFRAMES;Dark frame könyvtára PREFERENCES_DIRHOME;Saját könyvtár PREFERENCES_DIRLAST;Utoljára látogatott könyvtár @@ -881,6 +879,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -939,6 +938,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !GENERAL_CLOSE;Close !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. !HISTORY_MSG_166;Exposure - Reset @@ -1234,6 +1234,9 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1334,7 +1337,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1351,7 +1355,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1364,6 +1369,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1406,6 +1412,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1553,7 +1560,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1578,6 +1585,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 737b8e252..2963f835f 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -974,8 +974,6 @@ PREFERENCES_DATEFORMAT;Datumformaat PREFERENCES_DATEFORMATHINT;U kunt de volgende formaten gebruiken:\n%y : jaar\n%m : maand\n%d : dag\n\nHet Nederlandse datumformaat is bijvoorbeeld:\n%d/%m/%y PREFERENCES_DAUB_LABEL;Gebruik Daubechies D6 wavelets in plaats van D4 PREFERENCES_DAUB_TOOLTIP;De Ruisonderdrukking en Wavelet niveaus gebruiken de Debauchies moeder wavelet. Als je D6 gebruikt in plaats van D4 vergroot het aantal orthogonale Daubechies coëfficiënten en dit verbeterd waarschijnlijk de kwaliteit van de lage niveaus. -PREFERENCES_DEFAULTLANG;Standaardtaal -PREFERENCES_DEFAULTTHEME;Standaardthema PREFERENCES_DIRDARKFRAMES;Map met donkerframes PREFERENCES_DIRHOME;Standaardmap PREFERENCES_DIRLAST;Laatst bezochte map @@ -2141,11 +2139,21 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language !PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file !PREFERENCES_PROFILESAVELOCATION;Processing profile saving location +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) !TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel !TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 1291fd772..12f9ce694 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maksimal Thumbnail Høyde PREFERENCES_CLIPPINGIND;Markerings-indikasjon PREFERENCES_DATEFORMAT;Datoformat PREFERENCES_DATEFORMATHINT;Du kan bruke følgende formattering:\n%y : år\n%m : måned\n%d : dag\n\nF. eks. er ungarsk datoformat:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Programspråk -PREFERENCES_DEFAULTTHEME;Standard tema PREFERENCES_DIRHOME;Hjemmemappe PREFERENCES_DIRLAST;Sidste besøkte mappe PREFERENCES_DIROTHER;Annen @@ -448,6 +446,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -577,6 +576,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -958,6 +958,9 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1131,7 +1134,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1160,7 +1164,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1175,6 +1180,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1240,6 +1246,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1400,7 +1407,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1425,6 +1432,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 8b770dfcf..4ca9931d4 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -720,8 +720,6 @@ PREFERENCES_DARKFRAMESHOTS;zdjęć(ia) PREFERENCES_DARKFRAMETEMPLATES;szablonów(ny) PREFERENCES_DATEFORMAT;Format daty PREFERENCES_DATEFORMATHINT;Dozwolone są następujące kody formatujące:\n%y - rok\n%m - miesiąc\n%d - dzień\n\nNa przykład według standardu ISO 8601 format daty wygląda następująco:\n%y-%m-%d -PREFERENCES_DEFAULTLANG;Domyślny język -PREFERENCES_DEFAULTTHEME;Domyślny temat PREFERENCES_DIRDARKFRAMES;Katalog z czarnymi klatkami PREFERENCES_DIRHOME;Katalog domowy PREFERENCES_DIRLAST;Ostatnio odwiedzony katalog @@ -1465,6 +1463,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1493,6 +1492,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1655,6 +1655,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1708,11 +1711,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1720,6 +1725,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1757,6 +1763,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1774,6 +1781,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 00b50d4a4..53f4593b8 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -720,8 +720,6 @@ PREFERENCES_DARKFRAMESHOTS;zdjec(ia) PREFERENCES_DARKFRAMETEMPLATES;szablonow(ny) PREFERENCES_DATEFORMAT;Format daty PREFERENCES_DATEFORMATHINT;Dozwolone sa nastepujace kody formatujace:\n%y - rok\n%m - miesiac\n%d - dzien\n\nNa przyklad wedlug standardu ISO 8601 format daty wyglada nastepujaco:\n%y-%m-%d -PREFERENCES_DEFAULTLANG;Domyslny jezyk -PREFERENCES_DEFAULTTHEME;Domyslny temat PREFERENCES_DIRDARKFRAMES;Katalog z czarnymi klatkami PREFERENCES_DIRHOME;Katalog domowy PREFERENCES_DIRLAST;Ostatnio odwiedzony katalog @@ -1465,6 +1463,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1493,6 +1492,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1655,6 +1655,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1708,11 +1711,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1720,6 +1725,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1757,6 +1763,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1774,6 +1781,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index 93a0f5b9e..3f1416110 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Tamanho máximo das miniaturas PREFERENCES_CLIPPINGIND;Recortando indicação PREFERENCES_DATEFORMAT;Formato de data PREFERENCES_DATEFORMATHINT;Você pode usar as seguintes formatações:\n%a : ano\n%m : mês\n%d : dia\n\nPor exemplo, o formato de data húngaro é:\n%a/%m/%d -PREFERENCES_DEFAULTLANG;Idioma padrão -PREFERENCES_DEFAULTTHEME;Tema padrão PREFERENCES_DIRHOME;Directory inicial PREFERENCES_DIRLAST;Último directory visitado PREFERENCES_DIROTHER;Outro @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index e04f36fe7..e8e120883 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -651,8 +651,6 @@ PREFERENCES_DARKFRAMESHOTS;снимков PREFERENCES_DARKFRAMETEMPLATES;шаблонов PREFERENCES_DATEFORMAT;Формат даты PREFERENCES_DATEFORMATHINT;Вы можете использовать следующие элементы форматирования:\n%y: год\n%m: месяц\n%d: день\n\nНапример, венгерский формат даты такой:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Язык по умолчанию -PREFERENCES_DEFAULTTHEME;Тема по умолчанию PREFERENCES_DIRDARKFRAMES;Каталог размещения темновых кадров PREFERENCES_DIRHOME;Домашний каталог PREFERENCES_DIRLAST;Последний каталог @@ -1274,6 +1272,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1305,6 +1304,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts @@ -1514,6 +1514,9 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1584,12 +1587,14 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1599,6 +1604,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1637,6 +1643,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1668,7 +1675,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SURROUND;Surround @@ -1691,6 +1698,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 35b317a09..be9d945e4 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -637,8 +637,6 @@ PREFERENCES_DARKFRAMESHOTS;снимака PREFERENCES_DARKFRAMETEMPLATES;шаблони PREFERENCES_DATEFORMAT;Формат датума PREFERENCES_DATEFORMATHINT;Можете задати следеће формате:\n%y :година\n%m : месец\n%d : дан\n\nУ Србији се највише користи:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Језик програма -PREFERENCES_DEFAULTTHEME;Тема програма PREFERENCES_DIRDARKFRAMES;Директоријум тамног кадра PREFERENCES_DIRHOME;Лични директоријум PREFERENCES_DIRLAST;Последњи директоријум @@ -1296,6 +1294,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1339,6 +1338,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts !HISTORY_MSG_254;CbDL - Skin hue @@ -1547,6 +1547,9 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1616,12 +1619,14 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1631,6 +1636,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1669,6 +1675,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1689,6 +1696,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index 136125eb2..6cfde941a 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -637,8 +637,6 @@ PREFERENCES_DARKFRAMESHOTS;snimaka PREFERENCES_DARKFRAMETEMPLATES;šabloni PREFERENCES_DATEFORMAT;Format datuma PREFERENCES_DATEFORMATHINT;Možete zadati sledeće formate:\n%y :godina\n%m : mesec\n%d : dan\n\nU Srbiji se najviše koristi:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Jezik programa -PREFERENCES_DEFAULTTHEME;Tema programa PREFERENCES_DIRDARKFRAMES;Direktorijum tamnog kadra PREFERENCES_DIRHOME;Lični direktorijum PREFERENCES_DIRLAST;Poslednji direktorijum @@ -1296,6 +1294,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1339,6 +1338,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts !HISTORY_MSG_254;CbDL - Skin hue @@ -1547,6 +1547,9 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1616,12 +1619,14 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1631,6 +1636,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1669,6 +1675,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1689,6 +1696,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 326608fb1..747ec5af5 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -288,8 +288,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximálna výška zmenšenín PREFERENCES_CLIPPINGIND;Indikácia orezu PREFERENCES_DATEFORMAT;Formát dátumu PREFERENCES_DATEFORMATHINT;Môžete použiť nasledujúce formátovacie reťazce:\n%y : rok\n%m : mesiac\n%d : deň\n\nNapríklad, slovenský formát je:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Predvolený jazyk -PREFERENCES_DEFAULTTHEME;Predvolený vzhľad PREFERENCES_DIRHOME;Domovský adresár PREFERENCES_DIRLAST;Posledný navštívený adresár PREFERENCES_DIROTHER;Iný @@ -530,6 +528,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !CURVEEDITOR_MINMAXCPOINTS;Equalizer !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -650,6 +649,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !GENERAL_NONE;None !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -1021,6 +1021,9 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1182,7 +1185,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1210,7 +1214,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1225,6 +1230,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1284,6 +1290,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1440,7 +1447,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1465,6 +1472,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 78ea992cb..ed92a41a8 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Suurin esikatselukuvan korkeus PREFERENCES_CLIPPINGIND;Leikkautuminen PREFERENCES_DATEFORMAT;Päivämäärän muoto PREFERENCES_DATEFORMATHINT;Voit käyttää seuraavia komentoja:\n%y : vuosi\n%m : kuukausi\n%d : päivä\n\nEsimerkiksi, pp.kk.vvvv:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Oletuskieli -PREFERENCES_DEFAULTTHEME;Oletusteema PREFERENCES_DIRHOME;Kotihakemisto PREFERENCES_DIRLAST;Viimeksi käytetty hakemisto PREFERENCES_DIROTHER;Muu @@ -450,6 +448,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -579,6 +578,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -960,6 +960,9 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1133,7 +1136,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1162,7 +1166,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1177,6 +1182,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1242,6 +1248,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index a2fd6d0d7..7c14dca46 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -878,8 +878,6 @@ PREFERENCES_DATEFORMAT;Datumformat PREFERENCES_DATEFORMATHINT;Du kan använda följande format:\n%y: år\n%m: månad\n%d: dag\n\nTill exempel är det svenska datumformatet:\n%y-%m-%d PREFERENCES_DAUB_LABEL;Använd Daubechies D6-wavelets istället för D4 PREFERENCES_DAUB_TOOLTIP;Brusreduceringen och wavelet-verktyget använder en Debauchies moder-wavelet. Om du väljer D6 istället för D4 ökas antalet ortogonala Daubechies-koefficienter och troligtvis ökas också kvaliteten på de småskaliga nivåerna. Det blir ingen skillnad i minnesanvändning eller beräkningstid. -PREFERENCES_DEFAULTLANG;Förvalt språk -PREFERENCES_DEFAULTTHEME;Förvalt tema PREFERENCES_DIRDARKFRAMES;Katalog för svartbilder PREFERENCES_DIRHOME;Hemkatalog PREFERENCES_DIRLAST;Senaste besökta katalog @@ -1888,6 +1886,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !CURVEEDITOR_AXIS_LEFT_TAN;LT: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1903,6 +1902,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. !EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !FILEBROWSER_RESETDEFAULTPROFILE;Reset to default +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_257;Color Toning !HISTORY_MSG_288;Flat Field - Clip control !HISTORY_MSG_289;Flat Field - Clip control - Auto @@ -1942,6 +1942,9 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1974,7 +1977,10 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LISS;Auto multi-zone smoothing !PREFERENCES_MONINTENT;Default rendering intent !PREFERENCES_MONITOR;Monitor @@ -1987,8 +1993,10 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PROFILEPANEL_PDYNAMIC;Dynamic !TP_CBDL_METHOD;Process located +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Chroma opacity as a function of luminance oC=f(L) !TP_COLORTONING_LABEL;Color Toning !TP_COLORTONING_METHOD_TOOLTIP;"L*a*b* blending", "RGB sliders" and "RGB curves" use interpolated color blending.\n"Color balance (Shadows/Midtones/Highlights)" and "Saturation 2 colors" use direct colors.\n\nThe Black-and-White tool can be enabled when using any color toning method, which allows for color toning. diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index fd29ae6be..5d260d926 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Kırpma gösterme PREFERENCES_DATEFORMAT;Tarih biçimi PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Varsayılan dil -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;Kullanıcı dizini PREFERENCES_DIRLAST;Son gidilen dizin PREFERENCES_DIROTHER;Diğer @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Isı !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Isı !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1400,7 +1407,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1425,6 +1432,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/default b/rtdata/languages/default index 23d12e1be..d2857496c 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -36,6 +36,7 @@ CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. CURVEEDITOR_TOOLTIPSAVE;Save current curve. CURVEEDITOR_TYPE;Type: DIRBROWSER_FOLDERS;Folders +DONT_SHOW_AGAIN;Don't show this message again. DYNPROFILEEDITOR_DELETE;Delete DYNPROFILEEDITOR_EDIT;Edit DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -234,6 +235,7 @@ GENERAL_PORTRAIT;Portrait GENERAL_SAVE;Save GENERAL_UNCHANGED;(Unchanged) GENERAL_WARNING;Warning +GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -955,8 +957,8 @@ PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID PREFERENCES_CUSTPROFBUILDPATH;Executable path PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -PREFERENCES_D50_OLD;5000K PREFERENCES_D50;Settings in main menu +PREFERENCES_D50_OLD;5000K PREFERENCES_D55;5500K PREFERENCES_D60;6000K PREFERENCES_D65;6500K @@ -968,8 +970,6 @@ PREFERENCES_DATEFORMAT;Date format PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -PREFERENCES_DEFAULTLANG;Default Language -PREFERENCES_DEFAULTTHEME;Default Theme PREFERENCES_DIRDARKFRAMES;Dark-frames directory PREFERENCES_DIRHOME;Home directory PREFERENCES_DIRLAST;Last visited directory @@ -1001,8 +1001,8 @@ PREFERENCES_GREY;Output device's Yb luminance (%) PREFERENCES_GREY05;Yb=05 CIE L#30 PREFERENCES_GREY10;Yb=10 CIE L#40 PREFERENCES_GREY15;Yb=15 CIE L#45 -PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 PREFERENCES_GREY18;Settings in main menu +PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 PREFERENCES_GREY23;Yb=23 CIE L#55 PREFERENCES_GREY30;Yb=30 CIE L#60 PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1024,6 +1024,7 @@ PREFERENCES_INTENT_PERCEPTUAL;Perceptual PREFERENCES_INTENT_RELATIVE;Relative Colorimetric PREFERENCES_INTENT_SATURATION;Saturation PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +PREFERENCES_LANG;Language PREFERENCES_LANGAUTODETECT;Use system language PREFERENCES_LEVAUTDN;Denoising level PREFERENCES_LEVDN;Cell size @@ -1115,6 +1116,7 @@ PREFERENCES_TAB_GENERAL;General PREFERENCES_TAB_IMPROC;Image Processing PREFERENCES_TAB_PERFORMANCE;Performance & Quality PREFERENCES_TAB_SOUND;Sounds +PREFERENCES_THEME;Theme PREFERENCES_TIMAX;High PREFERENCES_TINB;Number of tiles PREFERENCES_TISTD;Standard @@ -2135,5 +2137,3 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f ZOOMPANEL_ZOOMFITSCREEN;Fit whole image to screen\nShortcut: f ZOOMPANEL_ZOOMIN;Zoom In\nShortcut: + ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: - -GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. -DONT_SHOW_AGAIN;Don't show this message again. diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index bac6a08d1..700b91110 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -992,7 +992,7 @@ Gtk::Widget* Preferences::getGeneralPanel () // --------------------------------------------- - Gtk::Frame* flang = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTLANG")) ); + Gtk::Frame* flang = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_LANG")) ); setExpandAlignProperties (flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* langGrid = Gtk::manage ( new Gtk::Grid() ); langGrid->set_column_spacing (4); @@ -1027,7 +1027,7 @@ Gtk::Widget* Preferences::getGeneralPanel () // --------------------------------------------- - Gtk::Frame* ftheme = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTTHEME")) ); + Gtk::Frame* ftheme = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_THEME")) ); setExpandAlignProperties (ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* themeGrid = Gtk::manage ( new Gtk::Grid() ); themeGrid->set_column_spacing (4); From 4429b6f5f5513aad7664699da8bd1612a9dbe7d3 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 16 Aug 2017 12:06:53 +0200 Subject: [PATCH 017/126] Added checked-state color for curve buttons to distinguish them from non-checked curve buttons, #4019 --- rtdata/themes/RawTherapee-GTK3-20_.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index c1768f913..f661198af 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -187,24 +187,37 @@ button { min-width: 5px; background-image: linear-gradient(#343434, #2E2E2E, #292929); } + +/* Curve mode buttons and drop-downs */ +button:checked.Left, button:checked.Left + button { + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: #585858; +} + button.flat { background-image: none; } + button.flat:checked { background-image: linear-gradient(#343434, #2E2E2E, #292929); } + checkbutton > check { background-image: linear-gradient(#343434, #2E2E2E, #292929); } + radiobutton > radio { background-image: linear-gradient(#343434, #2E2E2E, #292929); } + button:hover , button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio { background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3)); } + button.popupbutton-arrow { min-width: 18px; } + /* Save, Cancel, OK ... buttons */ .dialog-action-area button { min-height: 24px; From db17c68f1e8eaecaf1ea331b97cc707fb848e009 Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 17 Aug 2017 09:38:27 +0200 Subject: [PATCH 018/126] Format with astyle 3. changed files --- rtengine/ciecam02.cc | 630 +++++++++++++++---------------- rtengine/ciecam02.h | 126 +++---- rtengine/improccoordinator.cc | 380 +++++++++---------- rtengine/improccoordinator.h | 6 +- rtengine/improcfun.cc | 97 ++--- rtengine/improcfun.h | 112 +++--- rtengine/procparams.cc | 16 +- rtengine/rtengine.h | 16 +- rtengine/rtthumbnail.cc | 686 +++++++++++++++++----------------- rtengine/simpleprocess.cc | 493 ++++++++++++------------ rtgui/colorappearance.cc | 221 +++++------ rtgui/colorappearance.h | 4 +- rtgui/paramsedited.cc | 8 +- 13 files changed, 1419 insertions(+), 1376 deletions(-) diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index 5a2c96395..488093060 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -39,10 +39,10 @@ namespace rtengine extern const Settings* settings; #endif -void Ciecam02::curvecolor(double satind, double satval, double &sres, double parsat) +void Ciecam02::curvecolor (double satind, double satval, double &sres, double parsat) { if (satind >= 0.0) { - sres = (1. - (satind) / 100.) * satval + (satind) / 100.*(1. - SQR(SQR(1. - min(satval, 1.0)))); + sres = (1. - (satind) / 100.) * satval + (satind) / 100.* (1. - SQR (SQR (1. - min (satval, 1.0)))); if (sres > parsat) { sres = parsat; @@ -58,17 +58,17 @@ void Ciecam02::curvecolor(double satind, double satval, double &sres, double par } } -void Ciecam02::curvecolorfloat(float satind, float satval, float &sres, float parsat) +void Ciecam02::curvecolorfloat (float satind, float satval, float &sres, float parsat) { if (satind > 0.f) { if (satval >= 1.f) { // The calculation below goes wrong direction when satval > 1 sres = satval; } else { - sres = (1.f - (satind) / 100.f) * satval + (satind) / 100.f * (1.f - SQR(SQR(1.f - min(satval, 1.0f)))); + sres = (1.f - (satind) / 100.f) * satval + (satind) / 100.f * (1.f - SQR (SQR (1.f - min (satval, 1.0f)))); } if (sres > parsat) { - sres = max(parsat, satval); + sres = max (parsat, satval); } } else if (satind < 0.f) { sres = satval * (1.f + (satind) / 100.f); @@ -79,35 +79,35 @@ void Ciecam02::curvecolorfloat(float satind, float satval, float &sres, float pa void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & histogram ) { - LUTf dcurve(65536, 0); + LUTf dcurve (65536, 0); int skip = 1; // check if brightness curve is needed if (br > 0.00001 || br < -0.00001) { std::vector brightcurvePoints; - brightcurvePoints.resize(9); - brightcurvePoints.at(0) = double(DCT_NURBS); + brightcurvePoints.resize (9); + brightcurvePoints.at (0) = double (DCT_NURBS); - brightcurvePoints.at(1) = 0.; // black point. Value in [0 ; 1] range - brightcurvePoints.at(2) = 0.; // black point. Value in [0 ; 1] range + brightcurvePoints.at (1) = 0.; // black point. Value in [0 ; 1] range + brightcurvePoints.at (2) = 0.; // black point. Value in [0 ; 1] range if (br > 0) { - brightcurvePoints.at(3) = 0.1; // toe point - brightcurvePoints.at(4) = 0.1 + br / 150.0; //value at toe point + brightcurvePoints.at (3) = 0.1; // toe point + brightcurvePoints.at (4) = 0.1 + br / 150.0; //value at toe point - brightcurvePoints.at(5) = 0.7; // shoulder point - brightcurvePoints.at(6) = min(1.0, 0.7 + br / 300.0); //value at shoulder point + brightcurvePoints.at (5) = 0.7; // shoulder point + brightcurvePoints.at (6) = min (1.0, 0.7 + br / 300.0); //value at shoulder point } else { - brightcurvePoints.at(3) = 0.1 - br / 150.0; // toe point - brightcurvePoints.at(4) = 0.1; // value at toe point + brightcurvePoints.at (3) = 0.1 - br / 150.0; // toe point + brightcurvePoints.at (4) = 0.1; // value at toe point - brightcurvePoints.at(5) = min(1.0, 0.7 - br / 300.0); // shoulder point - brightcurvePoints.at(6) = 0.7; // value at shoulder point + brightcurvePoints.at (5) = min (1.0, 0.7 - br / 300.0); // shoulder point + brightcurvePoints.at (6) = 0.7; // value at shoulder point } - brightcurvePoints.at(7) = 1.; // white point - brightcurvePoints.at(8) = 1.; // value at white point + brightcurvePoints.at (7) = 1.; // white point + brightcurvePoints.at (8) = 1.; // value at white point DiagonalCurve* brightcurve = new DiagonalCurve (brightcurvePoints, CURVES_MIN_POLY_POINTS / skip); @@ -121,7 +121,7 @@ void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & val = brightcurve->getVal (val); // store result in a temporary array - dcurve[i] = CLIPD(val); + dcurve[i] = CLIPD (val); } delete brightcurve; @@ -149,20 +149,20 @@ void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & avg /= sum; std::vector contrastcurvePoints; - contrastcurvePoints.resize(9); - contrastcurvePoints.at(0) = double(DCT_NURBS); + contrastcurvePoints.resize (9); + contrastcurvePoints.at (0) = double (DCT_NURBS); - contrastcurvePoints.at(1) = 0.; // black point. Value in [0 ; 1] range - contrastcurvePoints.at(2) = 0.; // black point. Value in [0 ; 1] range + contrastcurvePoints.at (1) = 0.; // black point. Value in [0 ; 1] range + contrastcurvePoints.at (2) = 0.; // black point. Value in [0 ; 1] range - contrastcurvePoints.at(3) = avg - avg * (0.6 - contr / 250.0); // toe point - contrastcurvePoints.at(4) = avg - avg * (0.6 + contr / 250.0); // value at toe point + contrastcurvePoints.at (3) = avg - avg * (0.6 - contr / 250.0); // toe point + contrastcurvePoints.at (4) = avg - avg * (0.6 + contr / 250.0); // value at toe point - contrastcurvePoints.at(5) = avg + (1 - avg) * (0.6 - contr / 250.0); // shoulder point - contrastcurvePoints.at(6) = avg + (1 - avg) * (0.6 + contr / 250.0); // value at shoulder point + contrastcurvePoints.at (5) = avg + (1 - avg) * (0.6 - contr / 250.0); // shoulder point + contrastcurvePoints.at (6) = avg + (1 - avg) * (0.6 + contr / 250.0); // value at shoulder point - contrastcurvePoints.at(7) = 1.; // white point - contrastcurvePoints.at(8) = 1.; // value at white point + contrastcurvePoints.at (7) = 1.; // white point + contrastcurvePoints.at (8) = 1.; // value at white point DiagonalCurve* contrastcurve = new DiagonalCurve (contrastcurvePoints, CURVES_MIN_POLY_POINTS / skip); @@ -186,8 +186,8 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf // check if brightness curve is needed if (br > 0.00001f || br < -0.00001f) { - std::vector brightcurvePoints(9); - brightcurvePoints[0] = double(DCT_NURBS); + std::vector brightcurvePoints (9); + brightcurvePoints[0] = double (DCT_NURBS); brightcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range brightcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range @@ -197,19 +197,19 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf brightcurvePoints[4] = 0.1f + br / 150.0f; //value at toe point brightcurvePoints[5] = 0.7f; // shoulder point - brightcurvePoints[6] = min(1.0f, 0.7f + br / 300.0f); //value at shoulder point + brightcurvePoints[6] = min (1.0f, 0.7f + br / 300.0f); //value at shoulder point } else { brightcurvePoints[3] = 0.1f - br / 150.0f; // toe point brightcurvePoints[4] = 0.1f; // value at toe point - brightcurvePoints[5] = min(1.0f, 0.7f - br / 300.0f); // shoulder point + brightcurvePoints[5] = min (1.0f, 0.7f - br / 300.0f); // shoulder point brightcurvePoints[6] = 0.7f; // value at shoulder point } brightcurvePoints[7] = 1.f; // white point brightcurvePoints[8] = 1.f; // value at white point - DiagonalCurve brightcurve(brightcurvePoints, CURVES_MIN_POLY_POINTS); + DiagonalCurve brightcurve (brightcurvePoints, CURVES_MIN_POLY_POINTS); // Applying brightness curve for (int i = 0; i < 32768; i++) { @@ -221,12 +221,12 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf val = brightcurve.getVal (val); // store result - outCurve[i] = CLIPD(val); + outCurve[i] = CLIPD (val); } } else { // set the identity curve - outCurve.makeIdentity(32767.f); + outCurve.makeIdentity (32767.f); } @@ -242,9 +242,9 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf } avg /= sum; - std::vector contrastcurvePoints(9); + std::vector contrastcurvePoints (9); - contrastcurvePoints[0] = double(DCT_NURBS); + contrastcurvePoints[0] = double (DCT_NURBS); contrastcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range contrastcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range @@ -258,11 +258,11 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf contrastcurvePoints[7] = 1.f; // white point contrastcurvePoints[8] = 1.f; // value at white point - DiagonalCurve contrastcurve(contrastcurvePoints, CURVES_MIN_POLY_POINTS); + DiagonalCurve contrastcurve (contrastcurvePoints, CURVES_MIN_POLY_POINTS); // apply contrast enhancement for (int i = 0; i < 32768; i++) { - outCurve[i] = contrastcurve.getVal(outCurve[i]); + outCurve[i] = contrastcurve.getVal (outCurve[i]); } } @@ -295,17 +295,17 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf * */ -double Ciecam02::d_factor( double f, double la ) +double Ciecam02::d_factor ( double f, double la ) { - return f * (1.0 - ((1.0 / 3.6) * exp((-la - 42.0) / 92.0))); + return f * (1.0 - ((1.0 / 3.6) * exp ((-la - 42.0) / 92.0))); } -float Ciecam02::d_factorfloat( float f, float la ) +float Ciecam02::d_factorfloat ( float f, float la ) { - return f * (1.0f - ((1.0f / 3.6f) * xexpf((-la - 42.0f) / 92.0f))); + return f * (1.0f - ((1.0f / 3.6f) * xexpf ((-la - 42.0f) / 92.0f))); } -double Ciecam02::calculate_fl_from_la_ciecam02( double la ) +double Ciecam02::calculate_fl_from_la_ciecam02 ( double la ) { double la5 = la * 5.0; double k = 1.0 / (la5 + 1.0); @@ -314,10 +314,10 @@ double Ciecam02::calculate_fl_from_la_ciecam02( double la ) k = k * k; k = k * k; - return (0.2 * k * la5) + (0.1 * (1.0 - k) * (1.0 - k) * std::cbrt(la5)); + return (0.2 * k * la5) + (0.1 * (1.0 - k) * (1.0 - k) * std::cbrt (la5)); } -float Ciecam02::calculate_fl_from_la_ciecam02float( float la ) +float Ciecam02::calculate_fl_from_la_ciecam02float ( float la ) { float la5 = la * 5.0f; float k = 1.0f / (la5 + 1.0f); @@ -326,66 +326,66 @@ float Ciecam02::calculate_fl_from_la_ciecam02float( float la ) k = k * k; k = k * k; - return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt(la5)); + return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt (la5)); } -double Ciecam02::achromatic_response_to_white( double x, double y, double z, double d, double fl, double nbb, int gamu ) +double Ciecam02::achromatic_response_to_white ( double x, double y, double z, double d, double fl, double nbb, int gamu ) { double r, g, b; double rc, gc, bc; double rp, gp, bp; double rpa, gpa, bpa; gamu = 1; - xyz_to_cat02( r, g, b, x, y, z, gamu ); + xyz_to_cat02 ( r, g, b, x, y, z, gamu ); rc = r * (((y * d) / r) + (1.0 - d)); gc = g * (((y * d) / g) + (1.0 - d)); bc = b * (((y * d) / b) + (1.0 - d)); - cat02_to_hpe( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpe ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0); - gp = MAXR(gp, 0.0); - bp = MAXR(bp, 0.0); + rp = MAXR (rp, 0.0); + gp = MAXR (gp, 0.0); + bp = MAXR (bp, 0.0); } - rpa = nonlinear_adaptation( rp, fl ); - gpa = nonlinear_adaptation( gp, fl ); - bpa = nonlinear_adaptation( bp, fl ); + rpa = nonlinear_adaptation ( rp, fl ); + gpa = nonlinear_adaptation ( gp, fl ); + bpa = nonlinear_adaptation ( bp, fl ); return ((2.0 * rpa) + gpa + ((1.0 / 20.0) * bpa) - 0.305) * nbb; } -float Ciecam02::achromatic_response_to_whitefloat( float x, float y, float z, float d, float fl, float nbb, int gamu ) +float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int gamu ) { float r, g, b; float rc, gc, bc; float rp, gp, bp; float rpa, gpa, bpa; gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); rc = r * (((y * d) / r) + (1.0f - d)); gc = g * (((y * d) / g) + (1.0f - d)); bc = b * (((y * d) / b) + (1.0f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); return ((2.0f * rpa) + gpa + ((1.0f / 20.0f) * bpa) - 0.305f) * nbb; } -void Ciecam02::xyz_to_cat02( double &r, double &g, double &b, double x, double y, double z, int gamu ) +void Ciecam02::xyz_to_cat02 ( double &r, double &g, double &b, double x, double y, double z, int gamu ) { gamu = 1; @@ -403,7 +403,7 @@ void Ciecam02::xyz_to_cat02( double &r, double &g, double &b, double x, double y } } -void Ciecam02::xyz_to_cat02float( float &r, float &g, float &b, float x, float y, float z, int gamu ) +void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int gamu ) { gamu = 1; @@ -421,16 +421,16 @@ void Ciecam02::xyz_to_cat02float( float &r, float &g, float &b, float x, float y } } #ifdef __SSE2__ -void Ciecam02::xyz_to_cat02float( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ) +void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ) { //gamut correction M.H.Brill S.Susstrunk - r = ( F2V(1.007245f) * x) + (F2V(0.011136f) * y) - (F2V(0.018381f) * z);//Changjun Li - g = (F2V(-0.318061f) * x) + (F2V(1.314589f) * y) + (F2V(0.003471f) * z); + r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li + g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z); b = z; } #endif -void Ciecam02::cat02_to_xyz( double &x, double &y, double &z, double r, double g, double b, int gamu ) +void Ciecam02::cat02_to_xyz ( double &x, double &y, double &z, double r, double g, double b, int gamu ) { gamu = 1; @@ -448,7 +448,7 @@ void Ciecam02::cat02_to_xyz( double &x, double &y, double &z, double r, double g } } -void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b, int gamu ) +void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int gamu ) { gamu = 1; @@ -466,16 +466,16 @@ void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g } } #ifdef __SSE2__ -void Ciecam02::cat02_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) { //gamut correction M.H.Brill S.Susstrunk - x = ( F2V(0.99015849f) * r) - (F2V(0.00838772f) * g) + (F2V(0.018229217f) * b); //Changjun Li - y = ( F2V(0.239565979f) * r) + (F2V(0.758664642f) * g) + (F2V(0.001770137f) * b); + x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li + y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b); z = b; } #endif -void Ciecam02::hpe_to_xyz( double &x, double &y, double &z, double r, double g, double b ) +void Ciecam02::hpe_to_xyz ( double &x, double &y, double &z, double r, double g, double b ) { x = (1.910197 * r) - (1.112124 * g) + (0.201908 * b); y = (0.370950 * r) + (0.629054 * g) - (0.000008 * b); @@ -483,22 +483,22 @@ void Ciecam02::hpe_to_xyz( double &x, double &y, double &z, double r, double g, } -void Ciecam02::hpe_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b ) +void Ciecam02::hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ) { x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b); y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b); z = b; } #ifdef __SSE2__ -void Ciecam02::hpe_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) { - x = (F2V(1.910197f) * r) - (F2V(1.112124f) * g) + (F2V(0.201908f) * b); - y = (F2V(0.370950f) * r) + (F2V(0.629054f) * g) - (F2V(0.000008f) * b); + x = (F2V (1.910197f) * r) - (F2V (1.112124f) * g) + (F2V (0.201908f) * b); + y = (F2V (0.370950f) * r) + (F2V (0.629054f) * g) - (F2V (0.000008f) * b); z = b; } #endif -void Ciecam02::cat02_to_hpe( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ) +void Ciecam02::cat02_to_hpe ( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ) { gamu = 1; @@ -513,7 +513,7 @@ void Ciecam02::cat02_to_hpe( double &rh, double &gh, double &bh, double r, doubl } } -void Ciecam02::cat02_to_hpefloat( float &rh, float &gh, float &bh, float r, float g, float b, int gamu ) +void Ciecam02::cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int gamu ) { gamu = 1; @@ -529,16 +529,16 @@ void Ciecam02::cat02_to_hpefloat( float &rh, float &gh, float &bh, float r, floa } #ifdef __SSE2__ -void Ciecam02::cat02_to_hpefloat( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b) +void Ciecam02::cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b) { //Changjun Li - rh = ( F2V(0.550930835f) * r) + (F2V(0.519435987f) * g) - ( F2V(0.070356303f) * b); - gh = ( F2V(0.055954056f) * r) + (F2V(0.89973132f) * g) + (F2V(0.044315524f) * b); + rh = ( F2V (0.550930835f) * r) + (F2V (0.519435987f) * g) - ( F2V (0.070356303f) * b); + gh = ( F2V (0.055954056f) * r) + (F2V (0.89973132f) * g) + (F2V (0.044315524f) * b); bh = b; } #endif -void Ciecam02::Aab_to_rgb( double &r, double &g, double &b, double A, double aa, double bb, double nbb ) +void Ciecam02::Aab_to_rgb ( double &r, double &g, double &b, double A, double aa, double bb, double nbb ) { double x = (A / nbb) + 0.305; @@ -550,7 +550,7 @@ void Ciecam02::Aab_to_rgb( double &r, double &g, double &b, double A, double aa, b = (0.32787 * x) - (0.15681 * aa) - (4.49038 * bb); } -void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb ) +void Ciecam02::Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb ) { float x = (A / nbb) + 0.305f; @@ -562,28 +562,28 @@ void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, b = (0.32787f * x) - (0.15681f * aa) - (4.49038f * bb); } #ifdef __SSE2__ -void Ciecam02::Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ) +void Ciecam02::Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ) { - vfloat c1 = F2V(0.32787f) * ((A / nbb) + F2V(0.305f)); + vfloat c1 = F2V (0.32787f) * ((A / nbb) + F2V (0.305f)); /* c1 c2 c3 */ - r = c1 + (F2V(0.32145f) * aa) + (F2V(0.20527f) * bb); + r = c1 + (F2V (0.32145f) * aa) + (F2V (0.20527f) * bb); /* c1 c4 c5 */ - g = c1 - (F2V(0.63507f) * aa) - (F2V(0.18603f) * bb); + g = c1 - (F2V (0.63507f) * aa) - (F2V (0.18603f) * bb); /* c1 c6 c7 */ - b = c1 - (F2V(0.15681f) * aa) - (F2V(4.49038f) * bb); + b = c1 - (F2V (0.15681f) * aa) - (F2V (4.49038f) * bb); } #endif -void Ciecam02::calculate_ab( double &aa, double &bb, double h, double e, double t, double nbb, double a ) +void Ciecam02::calculate_ab ( double &aa, double &bb, double h, double e, double t, double nbb, double a ) { double hrad = (h * rtengine::RT_PI) / 180.0; - double sinh = sin( hrad ); - double cosh = cos( hrad ); + double sinh = sin ( hrad ); + double cosh = cos ( hrad ); double x = (a / nbb) + 0.305; double p3 = 21.0 / 20.0; - if ( fabs( sinh ) >= fabs( cosh ) ) { + if ( fabs ( sinh ) >= fabs ( cosh ) ) { bb = ((0.32787 * x) * (2.0 + p3)) / ((e / (t * sinh)) - // ((0.32145 - 0.63507 - (p3 * 0.15681)) * (cosh / sinh)) - @@ -603,24 +603,24 @@ void Ciecam02::calculate_ab( double &aa, double &bb, double h, double e, double bb = (aa * sinh) / cosh; } } -void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a ) +void Ciecam02::calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a ) { - float2 sincosval = xsincosf((h * rtengine::RT_PI) / 180.0f); + float2 sincosval = xsincosf ((h * rtengine::RT_PI) / 180.0f); float sinh = sincosval.x; float cosh = sincosval.y; float x = (a / nbb) + 0.305f; float p3 = 1.05f; - bool swapValues = fabs( sinh ) > fabs( cosh ); + bool swapValues = fabs ( sinh ) > fabs ( cosh ); if (swapValues) { - std::swap(sinh, cosh); + std::swap (sinh, cosh); } float c1 = 1.f; float c2 = sinh / cosh; if (swapValues) { - std::swap(c1, c2); + std::swap (c1, c2); } float div = ((e / (t * cosh)) - (-0.31362f - (p3 * 0.15681f)) * c1 - ((0.01924f - (p3 * 4.49038f)) * (c2))); @@ -629,7 +629,7 @@ void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float // Additionally it seems useful to limit the minimum value of div // I limited it, but I'm sure the actual limit is not the best one - if (signf(div) != signf(cosh) || fabsf(div) <= fabsf(cosh) * 2.f) { + if (signf (div) != signf (cosh) || fabsf (div) <= fabsf (cosh) * 2.f) { div = cosh * 2.f; } @@ -637,146 +637,146 @@ void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float bb = (aa * sinh) / cosh; if (swapValues) { - std::swap(aa, bb); + std::swap (aa, bb); } } #ifdef __SSE2__ -void Ciecam02::calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ) +void Ciecam02::calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ) { - vfloat2 sincosval = xsincosf((h * F2V(rtengine::RT_PI)) / F2V(180.0f)); + vfloat2 sincosval = xsincosf ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)); vfloat sinh = sincosval.x; vfloat cosh = sincosval.y; - vfloat x = (a / nbb) + F2V(0.305f); - vfloat p3 = F2V(1.05f); - vmask swapMask = vmaskf_gt(vabsf(sinh), vabsf(cosh)); - vswap(swapMask, sinh, cosh); - vfloat c1 = F2V(1.f); + vfloat x = (a / nbb) + F2V (0.305f); + vfloat p3 = F2V (1.05f); + vmask swapMask = vmaskf_gt (vabsf (sinh), vabsf (cosh)); + vswap (swapMask, sinh, cosh); + vfloat c1 = F2V (1.f); vfloat c2 = sinh / cosh; - vswap(swapMask, c1, c2); + vswap (swapMask, c1, c2); - vfloat div = ((e / (t * cosh)) - (F2V(-0.31362f) - (p3 * F2V(0.15681f))) * c1 - ((F2V(0.01924f) - (p3 * F2V(4.49038f))) * (c2))); + vfloat div = ((e / (t * cosh)) - (F2V (-0.31362f) - (p3 * F2V (0.15681f))) * c1 - ((F2V (0.01924f) - (p3 * F2V (4.49038f))) * (c2))); // for large values of t the above calculation can change its sign which results in a hue shift of 180 degree // so we have to check the sign to avoid this shift. // Additionally it seems useful to limit the minimum value of div // I limited it, but I'm sure the actual limit is not the best one - vmask limitMask = vmaskf_neq(vsignf(div), vsignf(cosh)); - limitMask = vorm(limitMask, vmaskf_le(vabsf(div), vabsf(cosh) * F2V(2.f))); - div = vself(limitMask, cosh * F2V(2.f), div); + vmask limitMask = vmaskf_neq (vsignf (div), vsignf (cosh)); + limitMask = vorm (limitMask, vmaskf_le (vabsf (div), vabsf (cosh) * F2V (2.f))); + div = vself (limitMask, cosh * F2V (2.f), div); - aa = ((F2V(0.32787f) * x) * (F2V(2.0f) + p3)) / div; + aa = ((F2V (0.32787f) * x) * (F2V (2.0f) + p3)) / div; bb = (aa * sinh) / cosh; - vswap(swapMask, aa, bb); + vswap (swapMask, aa, bb); } #endif -void Ciecam02::initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &wh, double &pfl, double &fl, double &c) +void Ciecam02::initcam1 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &wh, double &pfl, double &fl, double &c) { n = yb / yw; if (pilotd == 2.0) { - d = d_factor( f, la ); + d = d_factor ( f, la ); } else { d = pilotd; } - fl = calculate_fl_from_la_ciecam02( la ); - nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); - cz = 1.48 + sqrt( n ); - aw = achromatic_response_to_white( xw, yw, zw, d, fl, nbb, gamu ); - wh = ( 4.0 / c ) * ( aw + 4.0 ) * pow( fl, 0.25 ); - pfl = pow( fl, 0.25 ); + fl = calculate_fl_from_la_ciecam02 ( la ); + nbb = ncb = 0.725 * pow ( 1.0 / n, 0.2 ); + cz = 1.48 + sqrt ( n ); + aw = achromatic_response_to_white ( xw, yw, zw, d, fl, nbb, gamu ); + wh = ( 4.0 / c ) * ( aw + 4.0 ) * pow ( fl, 0.25 ); + pfl = pow ( fl, 0.25 ); #ifdef _DEBUG if (settings->verbose) { - printf("Source double d=%f aw=%f fl=%f wh=%f\n", d, aw, fl, wh); + printf ("Source double d=%f aw=%f fl=%f wh=%f\n", d, aw, fl, wh); } #endif } -void Ciecam02::initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float &c) +void Ciecam02::initcam1float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &wh, float &pfl, float &fl, float &c) { n = yb / yw; if (pilotd == 2.0) { - d = d_factorfloat( f, la ); + d = d_factorfloat ( f, la ); } else { d = pilotd; } - fl = calculate_fl_from_la_ciecam02float( la ); - nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); - cz = 1.48f + sqrt( n ); - aw = achromatic_response_to_whitefloat( xw, yw, zw, d, fl, nbb, gamu ); - wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F( fl, 0.25f ); - pfl = pow_F( fl, 0.25f ); + fl = calculate_fl_from_la_ciecam02float ( la ); + nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); + cz = 1.48f + sqrt ( n ); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, gamu ); + wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F ( fl, 0.25f ); + pfl = pow_F ( fl, 0.25f ); #ifdef _DEBUG if (settings->verbose) { - printf("Source float d=%f aw=%f fl=%f wh=%f c=%f awc=%f\n", d, aw, fl, wh, c, (4.f / c) * (aw + 4.f)); + printf ("Source float d=%f aw=%f fl=%f wh=%f c=%f awc=%f\n", d, aw, fl, wh, c, (4.f / c) * (aw + 4.f)); } #endif } -void Ciecam02::initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &fl) +void Ciecam02::initcam2 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &fl) { n = yb / yw; - + if (pilotd == 2.0) { - d = d_factorfloat( f, la ); + d = d_factorfloat ( f, la ); } else { d = pilotd; } - + // d = d_factor( f, la ); - fl = calculate_fl_from_la_ciecam02( la ); - nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); - cz = 1.48 + sqrt( n ); - aw = achromatic_response_to_white( xw, yw, zw, d, fl, nbb, gamu ); + fl = calculate_fl_from_la_ciecam02 ( la ); + nbb = ncb = 0.725 * pow ( 1.0 / n, 0.2 ); + cz = 1.48 + sqrt ( n ); + aw = achromatic_response_to_white ( xw, yw, zw, d, fl, nbb, gamu ); #ifdef _DEBUG if (settings->verbose) { - printf("Viewing double d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); + printf ("Viewing double d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); } #endif } -void Ciecam02::initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl) +void Ciecam02::initcam2float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &fl) { n = yb / yw; - + if (pilotd == 2.0) { - d = d_factorfloat( f, la ); + d = d_factorfloat ( f, la ); } else { d = pilotd; } - - // d = d_factorfloat( f, la ); - fl = calculate_fl_from_la_ciecam02float( la ); - nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); - cz = 1.48f + sqrt( n ); - aw = achromatic_response_to_whitefloat( xw, yw, zw, d, fl, nbb, gamu ); + +// d = d_factorfloat( f, la ); + fl = calculate_fl_from_la_ciecam02float ( la ); + nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); + cz = 1.48f + sqrt ( n ); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, gamu ); #ifdef _DEBUG if (settings->verbose) { - printf("Viewing float d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); + printf ("Viewing float d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); } #endif } -void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, double &M, double &s, double &aw, double &fl, double &wh, - double x, double y, double z, double xw, double yw, double zw, - double yb, double la, double f, double c, double nc, double pilotd, int gamu , double n, double nbb, double ncb, double pfl, double cz, double d) +void Ciecam02::xyz2jchqms_ciecam02 ( double &J, double &C, double &h, double &Q, double &M, double &s, double &aw, double &fl, double &wh, + double x, double y, double z, double xw, double yw, double zw, + double yb, double la, double f, double c, double nc, double pilotd, int gamu, double n, double nbb, double ncb, double pfl, double cz, double d) { double r, g, b; double rw, gw, bw; @@ -787,28 +787,28 @@ void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, double e, t; double myh; gamu = 1; - xyz_to_cat02( r, g, b, x, y, z, gamu ); - xyz_to_cat02( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02 ( r, g, b, x, y, z, gamu ); + xyz_to_cat02 ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.0 - d)); gc = g * (((yw * d) / gw) + (1.0 - d)); bc = b * (((yw * d) / bw) + (1.0 - d)); - cat02_to_hpe( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpe ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0); - gp = MAXR(gp, 0.0); - bp = MAXR(bp, 0.0); + rp = MAXR (rp, 0.0); + gp = MAXR (gp, 0.0); + bp = MAXR (bp, 0.0); } - rpa = nonlinear_adaptation( rp, fl ); - gpa = nonlinear_adaptation( gp, fl ); - bpa = nonlinear_adaptation( bp, fl ); + rpa = nonlinear_adaptation ( rp, fl ); + gpa = nonlinear_adaptation ( gp, fl ); + bpa = nonlinear_adaptation ( bp, fl ); ca = rpa - ((12.0 * gpa) / 11.0) + (bpa / 11.0); cb = (1.0 / 9.0) * (rpa + gpa - (2.0 * bpa)); - myh = (180.0 / rtengine::RT_PI) * atan2( cb, ca ); + myh = (180.0 / rtengine::RT_PI) * atan2 ( cb, ca ); if ( myh < 0.0 ) { myh += 360.0; @@ -840,24 +840,24 @@ void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, a = ((2.0 * rpa) + gpa + ((1.0 / 20.0) * bpa) - 0.305) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0); //gamut correction M.H.Brill S.Susstrunk } - J = 100.0 * pow( a / aw, c * cz ); + J = 100.0 * pow ( a / aw, c * cz ); - e = ((12500.0 / 13.0) * nc * ncb) * (cos( ((myh * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); - t = (e * sqrt( (ca * ca) + (cb * cb) )) / (rpa + gpa + ((21.0 / 20.0) * bpa)); + e = ((12500.0 / 13.0) * nc * ncb) * (cos ( ((myh * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); + t = (e * sqrt ( (ca * ca) + (cb * cb) )) / (rpa + gpa + ((21.0 / 20.0) * bpa)); - C = pow( t, 0.9 ) * sqrt( J / 100.0 ) - * pow( 1.64 - pow( 0.29, n ), 0.73 ); + C = pow ( t, 0.9 ) * sqrt ( J / 100.0 ) + * pow ( 1.64 - pow ( 0.29, n ), 0.73 ); - Q = wh * sqrt( J / 100.0 ); + Q = wh * sqrt ( J / 100.0 ); M = C * pfl; - s = 100.0 * sqrt( M / Q ); + s = 100.0 * sqrt ( M / Q ); h = myh; } -void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, +void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, float x, float y, float z, float xw, float yw, float zw, float c, float nc, int gamu, float pow1, float nbb, float ncb, float pfl, float cz, float d) @@ -871,28 +871,28 @@ void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, float e, t; float myh; gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); ca = rpa - ((12.0f * gpa) - bpa) / 11.0f; cb = (0.11111111f) * (rpa + gpa - (2.0f * bpa)); - myh = xatan2f( cb, ca ); + myh = xatan2f ( cb, ca ); if ( myh < 0.0f ) { myh += (2.f * rtengine::RT_PI); @@ -901,25 +901,25 @@ void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0f); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk } - J = pow_F( a / aw, c * cz * 0.5f); + J = pow_F ( a / aw, c * cz * 0.5f); - e = ((961.53846f) * nc * ncb) * (xcosf( myh + 2.0f ) + 3.8f); - t = (e * sqrtf( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); + e = ((961.53846f) * nc * ncb) * (xcosf ( myh + 2.0f ) + 3.8f); + t = (e * sqrtf ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); - C = pow_F( t, 0.9f ) * J * pow1; + C = pow_F ( t, 0.9f ) * J * pow1; Q = wh * J; J *= J * 100.0f; M = C * pfl; Q = (Q == 0.f ? 0.0001f : Q); // avoid division by zero - s = 100.0f * sqrtf( M / Q ); + s = 100.0f * sqrtf ( M / Q ); h = (myh * 180.f) / (float)rtengine::RT_PI; } #ifdef __SSE2__ -void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, +void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw, vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d) @@ -932,53 +932,53 @@ void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float( r, g, b, x, y, z); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw); - vfloat onev = F2V(1.f); + xyz_to_cat02float ( r, g, b, x, y, z); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + vfloat onev = F2V (1.f); rc = r * (((yw * d) / rw) + (onev - d)); gc = g * (((yw * d) / gw) + (onev - d)); bc = b * (((yw * d) / bw) + (onev - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc); //gamut correction M.H.Brill S.Susstrunk - rp = _mm_max_ps(rp, ZEROV); - gp = _mm_max_ps(gp, ZEROV); - bp = _mm_max_ps(bp, ZEROV); - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rp = _mm_max_ps (rp, ZEROV); + gp = _mm_max_ps (gp, ZEROV); + bp = _mm_max_ps (bp, ZEROV); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); - ca = rpa - ((F2V(12.0f) * gpa) - bpa) / F2V(11.0f); - cb = F2V(0.11111111f) * (rpa + gpa - (bpa + bpa)); + ca = rpa - ((F2V (12.0f) * gpa) - bpa) / F2V (11.0f); + cb = F2V (0.11111111f) * (rpa + gpa - (bpa + bpa)); - vfloat myh = xatan2f( cb, ca ); - vfloat temp = F2V(rtengine::RT_PI); + vfloat myh = xatan2f ( cb, ca ); + vfloat temp = F2V (rtengine::RT_PI); temp += temp; temp += myh; - myh = vself(vmaskf_lt(myh, ZEROV), temp, myh); + myh = vself (vmaskf_lt (myh, ZEROV), temp, myh); - a = ((rpa + rpa) + gpa + (F2V(0.05f) * bpa) - F2V(0.305f)) * nbb; - a = _mm_max_ps(a, ZEROV); //gamut correction M.H.Brill S.Susstrunk + a = ((rpa + rpa) + gpa + (F2V (0.05f) * bpa) - F2V (0.305f)) * nbb; + a = _mm_max_ps (a, ZEROV); //gamut correction M.H.Brill S.Susstrunk - J = pow_F( a / aw, c * cz * F2V(0.5f)); + J = pow_F ( a / aw, c * cz * F2V (0.5f)); - e = ((F2V(961.53846f)) * nc * ncb) * (xcosf( myh + F2V(2.0f) ) + F2V(3.8f)); - t = (e * _mm_sqrt_ps( (ca * ca) + (cb * cb) )) / (rpa + gpa + (F2V(1.05f) * bpa)); + e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( myh + F2V (2.0f) ) + F2V (3.8f)); + t = (e * _mm_sqrt_ps ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (F2V (1.05f) * bpa)); - C = pow_F( t, F2V(0.9f) ) * J * pow1; + C = pow_F ( t, F2V (0.9f) ) * J * pow1; Q = wh * J; - J *= J * F2V(100.0f); + J *= J * F2V (100.0f); M = C * pfl; - Q = _mm_max_ps(Q, F2V(0.0001f)); // avoid division by zero - s = F2V(100.0f) * _mm_sqrt_ps( M / Q ); - h = (myh * F2V(180.f)) / F2V(rtengine::RT_PI); + Q = _mm_max_ps (Q, F2V (0.0001f)); // avoid division by zero + s = F2V (100.0f) * _mm_sqrt_ps ( M / Q ); + h = (myh * F2V (180.f)) / F2V (rtengine::RT_PI); } #endif -void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, float fl, - float x, float y, float z, float xw, float yw, float zw, - float c, float nc, float pow1, float nbb, float ncb, float cz, float d) +void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, float fl, + float x, float y, float z, float xw, float yw, float zw, + float c, float nc, float pow1, float nbb, float ncb, float cz, float d) { float r, g, b; @@ -990,28 +990,28 @@ void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, fl float e, t; float myh; int gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); ca = rpa - ((12.0f * gpa) - bpa) / 11.0f; cb = (0.11111111f) * (rpa + gpa - (2.0f * bpa)); - myh = xatan2f( cb, ca ); + myh = xatan2f ( cb, ca ); if ( myh < 0.0f ) { myh += (2.f * rtengine::RT_PI); @@ -1020,24 +1020,24 @@ void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, fl a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0f); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk } - J = pow_F( a / aw, c * cz * 0.5f); + J = pow_F ( a / aw, c * cz * 0.5f); - e = ((961.53846f) * nc * ncb) * (xcosf( myh + 2.0f ) + 3.8f); - t = (e * sqrtf( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); + e = ((961.53846f) * nc * ncb) * (xcosf ( myh + 2.0f ) + 3.8f); + t = (e * sqrtf ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); - C = pow_F( t, 0.9f ) * J * pow1; + C = pow_F ( t, 0.9f ) * J * pow1; J *= J * 100.0f; h = (myh * 180.f) / (float)rtengine::RT_PI; } -void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, double C, double h, - double xw, double yw, double zw, double yb, double la, - double f, double c, double nc , int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw ) +void Ciecam02::jch2xyz_ciecam02 ( double &x, double &y, double &z, double J, double C, double h, + double xw, double yw, double zw, double yb, double la, + double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw ) { double r, g, b; double rc, gc, bc; @@ -1047,31 +1047,31 @@ void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, doub double a, ca, cb; double e, t; gamu = 1; - xyz_to_cat02( rw, gw, bw, xw, yw, zw, gamu ); - e = ((12500.0 / 13.0) * nc * ncb) * (cos( ((h * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); - a = pow( J / 100.0, 1.0 / (c * cz) ) * aw; - t = pow( C / (sqrt( J / 100) * pow( 1.64 - pow( 0.29, n ), 0.73 )), 10.0 / 9.0 ); + xyz_to_cat02 ( rw, gw, bw, xw, yw, zw, gamu ); + e = ((12500.0 / 13.0) * nc * ncb) * (cos ( ((h * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); + a = pow ( J / 100.0, 1.0 / (c * cz) ) * aw; + t = pow ( C / (sqrt ( J / 100) * pow ( 1.64 - pow ( 0.29, n ), 0.73 )), 10.0 / 9.0 ); - calculate_ab( ca, cb, h, e, t, nbb, a ); - Aab_to_rgb( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_ab ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgb ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptation( rpa, fl ); - gp = inverse_nonlinear_adaptation( gpa, fl ); - bp = inverse_nonlinear_adaptation( bpa, fl ); + rp = inverse_nonlinear_adaptation ( rpa, fl ); + gp = inverse_nonlinear_adaptation ( gpa, fl ); + bp = inverse_nonlinear_adaptation ( bpa, fl ); - hpe_to_xyz( x, y, z, rp, gp, bp ); - xyz_to_cat02( rc, gc, bc, x, y, z, gamu ); + hpe_to_xyz ( x, y, z, rp, gp, bp ); + xyz_to_cat02 ( rc, gc, bc, x, y, z, gamu ); r = rc / (((yw * d) / rw) + (1.0 - d)); g = gc / (((yw * d) / gw) + (1.0 - d)); b = bc / (((yw * d) / bw) + (1.0 - d)); - cat02_to_xyz( x, y, z, r, g, b, gamu ); + cat02_to_xyz ( x, y, z, r, g, b, gamu ); } -void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, float C, float h, - float xw, float yw, float zw, - float f, float c, float nc , int gamu, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw) +void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, float C, float h, + float xw, float yw, float zw, + float f, float c, float nc, int gamu, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw) { float r, g, b; float rc, gc, bc; @@ -1081,32 +1081,32 @@ void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, flo float a, ca, cb; float e, t; gamu = 1; - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); - e = ((961.53846f) * nc * ncb) * (xcosf( ((h * rtengine::RT_PI) / 180.0f) + 2.0f ) + 3.8f); - a = pow_F( J / 100.0f, 1.0f / (c * cz) ) * aw; - t = pow_F( 10.f * C / (sqrtf( J ) * pow1), 1.1111111f ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); + e = ((961.53846f) * nc * ncb) * (xcosf ( ((h * rtengine::RT_PI) / 180.0f) + 2.0f ) + 3.8f); + a = pow_F ( J / 100.0f, 1.0f / (c * cz) ) * aw; + t = pow_F ( 10.f * C / (sqrtf ( J ) * pow1), 1.1111111f ); - calculate_abfloat( ca, cb, h, e, t, nbb, a ); - Aab_to_rgbfloat( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_abfloat ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgbfloat ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptationfloat( rpa, fl ); - gp = inverse_nonlinear_adaptationfloat( gpa, fl ); - bp = inverse_nonlinear_adaptationfloat( bpa, fl ); + rp = inverse_nonlinear_adaptationfloat ( rpa, fl ); + gp = inverse_nonlinear_adaptationfloat ( gpa, fl ); + bp = inverse_nonlinear_adaptationfloat ( bpa, fl ); - hpe_to_xyzfloat( x, y, z, rp, gp, bp ); - xyz_to_cat02float( rc, gc, bc, x, y, z, gamu ); + hpe_to_xyzfloat ( x, y, z, rp, gp, bp ); + xyz_to_cat02float ( rc, gc, bc, x, y, z, gamu ); r = rc / (((yw * d) / rw) + (1.0f - d)); g = gc / (((yw * d) / gw) + (1.0f - d)); b = bc / (((yw * d) / bw) + (1.0f - d)); - cat02_to_xyzfloat( x, y, z, r, g, b, gamu ); + cat02_to_xyzfloat ( x, y, z, r, g, b, gamu ); } #ifdef __SSE2__ -void Ciecam02::jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, - vfloat xw, vfloat yw, vfloat zw, - vfloat f, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz) +void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, + vfloat xw, vfloat yw, vfloat zw, + vfloat f, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz) { vfloat r, g, b; vfloat rc, gc, bc; @@ -1115,70 +1115,70 @@ void Ciecam02::jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat rw, gw, bw; vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float( rw, gw, bw, xw, yw, zw); - e = ((F2V(961.53846f)) * nc * ncb) * (xcosf( ((h * F2V(rtengine::RT_PI)) / F2V(180.0f)) + F2V(2.0f) ) + F2V(3.8f)); - a = pow_F( J / F2V(100.0f), reccmcz ) * aw; - t = pow_F( F2V(10.f) * C / (_mm_sqrt_ps( J ) * pow1), F2V(1.1111111f) ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)) + F2V (2.0f) ) + F2V (3.8f)); + a = pow_F ( J / F2V (100.0f), reccmcz ) * aw; + t = pow_F ( F2V (10.f) * C / (_mm_sqrt_ps ( J ) * pow1), F2V (1.1111111f) ); - calculate_abfloat( ca, cb, h, e, t, nbb, a ); - Aab_to_rgbfloat( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_abfloat ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgbfloat ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptationfloat( rpa, fl ); - gp = inverse_nonlinear_adaptationfloat( gpa, fl ); - bp = inverse_nonlinear_adaptationfloat( bpa, fl ); + rp = inverse_nonlinear_adaptationfloat ( rpa, fl ); + gp = inverse_nonlinear_adaptationfloat ( gpa, fl ); + bp = inverse_nonlinear_adaptationfloat ( bpa, fl ); - hpe_to_xyzfloat( x, y, z, rp, gp, bp ); - xyz_to_cat02float( rc, gc, bc, x, y, z ); + hpe_to_xyzfloat ( x, y, z, rp, gp, bp ); + xyz_to_cat02float ( rc, gc, bc, x, y, z ); - r = rc / (((yw * d) / rw) + (F2V(1.0f) - d)); - g = gc / (((yw * d) / gw) + (F2V(1.0f) - d)); - b = bc / (((yw * d) / bw) + (F2V(1.0f) - d)); + r = rc / (((yw * d) / rw) + (F2V (1.0f) - d)); + g = gc / (((yw * d) / gw) + (F2V (1.0f) - d)); + b = bc / (((yw * d) / bw) + (F2V (1.0f) - d)); - cat02_to_xyzfloat( x, y, z, r, g, b ); + cat02_to_xyzfloat ( x, y, z, r, g, b ); } #endif -double Ciecam02::nonlinear_adaptation( double c, double fl ) +double Ciecam02::nonlinear_adaptation ( double c, double fl ) { double p; if (c < 0.0) { - p = pow( (-1.0 * fl * c) / 100.0, 0.42 ); + p = pow ( (-1.0 * fl * c) / 100.0, 0.42 ); return ((-1.0 * 400.0 * p) / (27.13 + p)) + 0.1; } else { - p = pow( (fl * c) / 100.0, 0.42 ); + p = pow ( (fl * c) / 100.0, 0.42 ); return ((400.0 * p) / (27.13 + p)) + 0.1; } } -float Ciecam02::nonlinear_adaptationfloat( float c, float fl ) +float Ciecam02::nonlinear_adaptationfloat ( float c, float fl ) { float p; if (c < 0.0f) { - p = pow_F( (-1.0f * fl * c) / 100.0f, 0.42f ); + p = pow_F ( (-1.0f * fl * c) / 100.0f, 0.42f ); return ((-1.0f * 400.0f * p) / (27.13f + p)) + 0.1f; } else { - p = pow_F( (fl * c) / 100.0f, 0.42f ); + p = pow_F ( (fl * c) / 100.0f, 0.42f ); return ((400.0f * p) / (27.13f + p)) + 0.1f; } } #ifdef __SSE2__ -vfloat Ciecam02::nonlinear_adaptationfloat( vfloat c, vfloat fl ) +vfloat Ciecam02::nonlinear_adaptationfloat ( vfloat c, vfloat fl ) { - vfloat c100 = F2V(100.f); - vfloat czd42 = F2V(0.42f); - vfloat c400 = vmulsignf(F2V(400.f), c); - fl = vmulsignf(fl, c); - vfloat p = pow_F( (fl * c) / c100, czd42 ); - vfloat c27d13 = F2V(27.13); - vfloat czd1 = F2V(0.1f); + vfloat c100 = F2V (100.f); + vfloat czd42 = F2V (0.42f); + vfloat c400 = vmulsignf (F2V (400.f), c); + fl = vmulsignf (fl, c); + vfloat p = pow_F ( (fl * c) / c100, czd42 ); + vfloat c27d13 = F2V (27.13); + vfloat czd1 = F2V (0.1f); return ((c400 * p) / (c27d13 + p)) + czd1; } #endif -double Ciecam02::inverse_nonlinear_adaptation( double c, double fl ) +double Ciecam02::inverse_nonlinear_adaptation ( double c, double fl ) { int c1; @@ -1188,10 +1188,10 @@ double Ciecam02::inverse_nonlinear_adaptation( double c, double fl ) c1 = 1; } - return c1 * (100.0 / fl) * pow( (27.13 * fabs( c - 0.1 )) / (400.0 - fabs( c - 0.1 )), 1.0 / 0.42 ); + return c1 * (100.0 / fl) * pow ( (27.13 * fabs ( c - 0.1 )) / (400.0 - fabs ( c - 0.1 )), 1.0 / 0.42 ); } -float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl ) +float Ciecam02::inverse_nonlinear_adaptationfloat ( float c, float fl ) { c -= 0.1f; @@ -1205,17 +1205,17 @@ float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl ) c = 399.99f; } - return (100.0f / fl) * pow_F( (27.13f * fabsf( c )) / (400.0f - fabsf( c )), 2.38095238f ); + return (100.0f / fl) * pow_F ( (27.13f * fabsf ( c )) / (400.0f - fabsf ( c )), 2.38095238f ); } #ifdef __SSE2__ -vfloat Ciecam02::inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl ) +vfloat Ciecam02::inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ) { - c -= F2V(0.1f); - fl = vmulsignf(fl, c); - c = vabsf(c); - c = _mm_min_ps( c, F2V(399.99f)); - return (F2V(100.0f) / fl) * pow_F( (F2V(27.13f) * c) / (F2V(400.0f) - c), F2V(2.38095238f) ); + c -= F2V (0.1f); + fl = vmulsignf (fl, c); + c = vabsf (c); + c = _mm_min_ps ( c, F2V (399.99f)); + return (F2V (100.0f) / fl) * pow_F ( (F2V (27.13f) * c) / (F2V (400.0f) - c), F2V (2.38095238f) ); } #endif //end CIECAM Billy Bigg diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index 76a7cf5bb..1e0f755c1 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -28,12 +28,12 @@ namespace rtengine class Ciecam02 { private: - static double d_factor( double f, double la ); - static float d_factorfloat( float f, float la ); - static double calculate_fl_from_la_ciecam02( double la ); - static float calculate_fl_from_la_ciecam02float( float la ); - static double achromatic_response_to_white( double x, double y, double z, double d, double fl, double nbb, int gamu ); - static float achromatic_response_to_whitefloat( float x, float y, float z, float d, float fl, float nbb, int gamu ); + static double d_factor ( double f, double la ); + static float d_factorfloat ( float f, float la ); + static double calculate_fl_from_la_ciecam02 ( double la ); + static float calculate_fl_from_la_ciecam02float ( float la ); + static double achromatic_response_to_white ( double x, double y, double z, double d, double fl, double nbb, int gamu ); + static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int gamu ); static void xyz_to_cat02 ( double &r, double &g, double &b, double x, double y, double z, int gamu ); static void cat02_to_hpe ( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ); static void cat02_to_xyz ( double &x, double &y, double &z, double r, double g, double b, int gamu ); @@ -45,97 +45,97 @@ private: #ifdef __SSE2__ static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ); static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b ); - static vfloat nonlinear_adaptationfloat( vfloat c, vfloat fl ); + static vfloat nonlinear_adaptationfloat ( vfloat c, vfloat fl ); #endif - static void Aab_to_rgb( double &r, double &g, double &b, double A, double aa, double bb, double nbb ); - static void calculate_ab( double &aa, double &bb, double h, double e, double t, double nbb, double a ); + static void Aab_to_rgb ( double &r, double &g, double &b, double A, double aa, double bb, double nbb ); + static void calculate_ab ( double &aa, double &bb, double h, double e, double t, double nbb, double a ); - static double nonlinear_adaptation( double c, double fl ); - static float nonlinear_adaptationfloat( float c, float fl ); - static double inverse_nonlinear_adaptation( double c, double fl ); + static double nonlinear_adaptation ( double c, double fl ); + static float nonlinear_adaptationfloat ( float c, float fl ); + static double inverse_nonlinear_adaptation ( double c, double fl ); - static float inverse_nonlinear_adaptationfloat( float c, float fl ); - static void calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a ); - static void Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb ); + static float inverse_nonlinear_adaptationfloat ( float c, float fl ); + static void calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a ); + static void Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb ); static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ); static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int gamu ); #ifdef __SSE2__ - static vfloat inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl ); - static void calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ); - static void Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ); + static vfloat inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ); + static void calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ); + static void Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ); static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); #endif public: Ciecam02 () {} - static void curvecolor(double satind, double satval, double &sres, double parsat); - static void curvecolorfloat(float satind, float satval, float &sres, float parsat); - static void curveJ (double br, double contr, int db, LUTf & outCurve , LUTu & histogram ) ; + static void curvecolor (double satind, double satval, double &sres, double parsat); + static void curvecolorfloat (float satind, float satval, float &sres, float parsat); + static void curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & histogram ) ; static void curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve ) ; /** * Inverse transform from CIECAM02 JCh to XYZ. */ - static void jch2xyz_ciecam02( double &x, double &y, double &z, - double J, double C, double h, - double xw, double yw, double zw, - double yb, double la, - double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw); + static void jch2xyz_ciecam02 ( double &x, double &y, double &z, + double J, double C, double h, + double xw, double yw, double zw, + double yb, double la, + double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw); - static void jch2xyz_ciecam02float( float &x, float &y, float &z, - float J, float C, float h, - float xw, float yw, float zw, - float f, float c, float nc, int gamu, float n, float nbb, float ncb, float fl, float cz, float d, float aw ); + static void jch2xyz_ciecam02float ( float &x, float &y, float &z, + float J, float C, float h, + float xw, float yw, float zw, + float f, float c, float nc, int gamu, float n, float nbb, float ncb, float fl, float cz, float d, float aw ); #ifdef __SSE2__ - static void jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, - vfloat J, vfloat C, vfloat h, - vfloat xw, vfloat yw, vfloat zw, - vfloat f, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz ); + static void jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, + vfloat J, vfloat C, vfloat h, + vfloat xw, vfloat yw, vfloat zw, + vfloat f, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz ); #endif /** * Forward transform from XYZ to CIECAM02 JCh. */ - static void initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); + static void initcam1 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); - static void initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &fl); + static void initcam2 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &fl); - static void initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); + static void initcam1float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); - static void initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl); + static void initcam2float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &fl); - static void xyz2jchqms_ciecam02( double &J, double &C, double &h, - double &Q, double &M, double &s, double &aw, double &fl, double &wh, - double x, double y, double z, - double xw, double yw, double zw, - double yb, double la, - double f, double c, double nc, double pilotd, int gamu , double n, double nbb, double ncb, double pfl, double cz, double d ); + static void xyz2jchqms_ciecam02 ( double &J, double &C, double &h, + double &Q, double &M, double &s, double &aw, double &fl, double &wh, + double x, double y, double z, + double xw, double yw, double zw, + double yb, double la, + double f, double c, double nc, double pilotd, int gamu, double n, double nbb, double ncb, double pfl, double cz, double d ); - static void xyz2jch_ciecam02float( float &J, float &C, float &h, - float aw, float fl, - float x, float y, float z, - float xw, float yw, float zw, - float c, float nc, float n, float nbb, float ncb, float cz, float d ); + static void xyz2jch_ciecam02float ( float &J, float &C, float &h, + float aw, float fl, + float x, float y, float z, + float xw, float yw, float zw, + float c, float nc, float n, float nbb, float ncb, float cz, float d ); - static void xyz2jchqms_ciecam02float( float &J, float &C, float &h, - float &Q, float &M, float &s, float aw, float fl, float wh, - float x, float y, float z, - float xw, float yw, float zw, - float c, float nc, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d ); + static void xyz2jchqms_ciecam02float ( float &J, float &C, float &h, + float &Q, float &M, float &s, float aw, float fl, float wh, + float x, float y, float z, + float xw, float yw, float zw, + float c, float nc, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d ); #ifdef __SSE2__ - static void xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, - vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, - vfloat x, vfloat y, vfloat z, - vfloat xw, vfloat yw, vfloat zw, - vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d ); + static void xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, + vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, + vfloat x, vfloat y, vfloat z, + vfloat xw, vfloat yw, vfloat zw, + vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d ); #endif diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index d288a23c1..d5032cd46 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -33,48 +33,48 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(nullptr), oprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), - ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), lastAwbTempBias(0.0), ipf(¶ms, true), monitorIntent(RI_RELATIVE), - softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), - allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), + : orig_prev (nullptr), oprevi (nullptr), oprevl (nullptr), nprevl (nullptr), previmg (nullptr), workimg (nullptr), + ncie (nullptr), imgsrc (nullptr), shmap (nullptr), lastAwbEqual (0.), lastAwbTempBias (0.0), ipf (¶ms, true), monitorIntent (RI_RELATIVE), + softProof (false), gamutCheck (false), scale (10), highDetailPreprocessComputed (false), highDetailRawComputed (false), + allocated (false), bwAutoR (-9000.f), bwAutoG (-9000.f), bwAutoB (-9000.f), CAMMean (NAN), - hltonecurve(65536), - shtonecurve(65536), - tonecurve(65536, 0), //,1); - lumacurve(32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation - chroma_acurve(65536, 0), - chroma_bcurve(65536, 0), - satcurve(65536, 0), - lhskcurve(65536, 0), - clcurve(65536, 0), - conversionBuffer(1, 1), - wavclCurve(65536, 0), - clToningcurve(65536, 0), - cl2Toningcurve(65536, 0), - Noisecurve(65536, 0), - NoiseCCcurve(65536, 0), - vhist16(65536), vhist16bw(65536), - lhist16CAM(65536), - lhist16CCAM(65536), + hltonecurve (65536), + shtonecurve (65536), + tonecurve (65536, 0), //,1); + lumacurve (32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + chroma_acurve (65536, 0), + chroma_bcurve (65536, 0), + satcurve (65536, 0), + lhskcurve (65536, 0), + clcurve (65536, 0), + conversionBuffer (1, 1), + wavclCurve (65536, 0), + clToningcurve (65536, 0), + cl2Toningcurve (65536, 0), + Noisecurve (65536, 0), + NoiseCCcurve (65536, 0), + vhist16 (65536), vhist16bw (65536), + lhist16CAM (65536), + lhist16CCAM (65536), lhist16RETI(), - lhist16LClad(65536), - histRed(256), histRedRaw(256), - histGreen(256), histGreenRaw(256), - histBlue(256), histBlueRaw(256), - histLuma(256), - histToneCurve(256), - histToneCurveBW(256), - histLCurve(256), - histCCurve(256), - histLLCurve(256), + lhist16LClad (65536), + histRed (256), histRedRaw (256), + histGreen (256), histGreenRaw (256), + histBlue (256), histBlueRaw (256), + histLuma (256), + histToneCurve (256), + histToneCurveBW (256), + histLCurve (256), + histCCurve (256), + histLLCurve (256), - histLCAM(256), - histCCAM(256), - histClad(256), - bcabhist(256), - histChroma(256), + histLCAM (256), + histCCAM (256), + histClad (256), + bcabhist (256), + histChroma (256), - histLRETI(256), + histLRETI (256), CAMBrightCurveJ(), CAMBrightCurveQ(), @@ -82,15 +82,15 @@ ImProcCoordinator::ImProcCoordinator () gCurve(), bCurve(), ctColorCurve(), - rcurvehist(256), rcurvehistCropped(256), rbeforehist(256), - gcurvehist(256), gcurvehistCropped(256), gbeforehist(256), - bcurvehist(256), bcurvehistCropped(256), bbeforehist(256), - fw(0), fh(0), tr(0), - fullw(1), fullh(1), - pW(-1), pH(-1), - plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), awbListener(nullptr), frameCountListener(nullptr), imageTypeListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), - resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), - butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), wavcontlutili(false), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) + rcurvehist (256), rcurvehistCropped (256), rbeforehist (256), + gcurvehist (256), gcurvehistCropped (256), gbeforehist (256), + bcurvehist (256), bcurvehistCropped (256), bbeforehist (256), + fw (0), fh (0), tr (0), + fullw (1), fullh (1), + pW (-1), pH (-1), + plistener (nullptr), imageListener (nullptr), aeListener (nullptr), acListener (nullptr), abwListener (nullptr), awbListener (nullptr), frameCountListener (nullptr), imageTypeListener (nullptr), actListener (nullptr), adnListener (nullptr), awavListener (nullptr), dehaListener (nullptr), hListener (nullptr), + resultValid (false), lastOutputProfile ("BADFOOD"), lastOutputIntent (RI__COUNT), lastOutputBPC (false), thread (nullptr), changeSinceLast (0), updaterRunning (false), destroying (false), utili (false), autili (false), + butili (false), ccutili (false), cclutili (false), clcutili (false), opautili (false), wavcontlutili (false), colourToningSatLimit (0.f), colourToningSatLimitOpacity (0.f) {} void ImProcCoordinator::assign (ImageSource* imgsrc) @@ -134,7 +134,7 @@ DetailedCrop* ImProcCoordinator::createCrop (::EditDataProvider *editDataProvid void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { - MyMutex::MyLock processingLock(mProcessing); + MyMutex::MyLock processingLock (mProcessing); int numofphases = 14; int readyphase = 0; @@ -165,15 +165,15 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) ColorManagementParams cmp = params.icm; LCurveParams lcur = params.labCurve; - if( !highDetailNeeded ) { + if ( !highDetailNeeded ) { // if below 100% magnification, take a fast path - if(rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] && rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono]) { + if (rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] && rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono]) { rp.bayersensor.method = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast]; } //bayerrp.all_enhance = false; - if(rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none] && rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono]) { + if (rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none] && rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono]) { rp.xtranssensor.method = RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::fast]; } @@ -184,16 +184,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) progress ("Applying white balance, color correction & sRGB conversion...", 100 * readyphase / numofphases); - if(frameCountListener) { - frameCountListener->FrameCountChanged(imgsrc->getFrameCount(), params.raw.bayersensor.imageNum); + if (frameCountListener) { + frameCountListener->FrameCountChanged (imgsrc->getFrameCount(), params.raw.bayersensor.imageNum); } // raw auto CA is bypassed if no high detail is needed, so we have to compute it when high detail is needed if ( (todo & M_PREPROC) || (!highDetailPreprocessComputed && highDetailNeeded)) { - imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum); + imgsrc->setCurrentFrame (params.raw.bayersensor.imageNum); - imgsrc->preprocess( rp, params.lensProf, params.coarse ); - imgsrc->getRAWHistogram( histRedRaw, histGreenRaw, histBlueRaw ); + imgsrc->preprocess ( rp, params.lensProf, params.coarse ); + imgsrc->getRAWHistogram ( histRedRaw, histGreenRaw, histBlueRaw ); if (highDetailNeeded) { highDetailPreprocessComputed = true; @@ -214,8 +214,8 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) */ // If high detail (=100%) is newly selected, do a demosaic update, since the last was just with FAST - if(imageTypeListener) { - imageTypeListener->imageTypeChanged(imgsrc->isRAW(), imgsrc->getSensorType() == ST_BAYER, imgsrc->getSensorType() == ST_FUJI_XTRANS); + if (imageTypeListener) { + imageTypeListener->imageTypeChanged (imgsrc->isRAW(), imgsrc->getSensorType() == ST_BAYER, imgsrc->getSensorType() == ST_FUJI_XTRANS); } if ( (todo & M_RAW) @@ -225,13 +225,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) if (settings->verbose) { if (imgsrc->getSensorType() == ST_BAYER) { - printf("Demosaic Bayer image n.%d using method: %s\n", rp.bayersensor.imageNum + 1, rp.bayersensor.method.c_str()); + printf ("Demosaic Bayer image n.%d using method: %s\n", rp.bayersensor.imageNum + 1, rp.bayersensor.method.c_str()); } else if (imgsrc->getSensorType() == ST_FUJI_XTRANS) { - printf("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str()); + printf ("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str()); } } - imgsrc->demosaic( rp);//enabled demosaic + imgsrc->demosaic ( rp); //enabled demosaic // if a demosaic happened we should also call getimage later, so we need to set the M_INIT flag todo |= M_INIT; @@ -242,10 +242,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (params.retinex.enabled) { - lhist16RETI(32768); + lhist16RETI (32768); lhist16RETI.clear(); - imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, lhist16RETI); + imgsrc->retinexPrepareBuffers (params.icm, params.retinex, conversionBuffer, lhist16RETI); } } @@ -256,12 +256,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) LUTf cdcurve (65536, 0); LUTf mapcurve (65536, 0); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); + imgsrc->retinexPrepareCurves (params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex + imgsrc->retinex ( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI); //enabled Retinex - if(dehaListener) { - dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); + if (dehaListener) { + dehaListener->minmaxChanged (maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); } } @@ -270,7 +270,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // It has to be done there, because the next 'if' statement will use the value computed here if (todo & M_AUTOEXP) { if (params.toneCurve.autoexp) {// this enabled HLRecovery - if (ToneCurveParams::HLReconstructionNecessary(histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { + if (ToneCurveParams::HLReconstructionNecessary (histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { // switching params.toneCurve.hrenabled to true -> shouting in listener's ears! params.toneCurve.hrenabled = true; @@ -281,9 +281,9 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (todo & (M_INIT | M_LINDENOISE)) { - MyMutex::MyLock initLock(minit); // Also used in crop window + MyMutex::MyLock initLock (minit); // Also used in crop window - imgsrc->HLRecovery_Global( params.toneCurve); // this handles Color HLRecovery + imgsrc->HLRecovery_Global ( params.toneCurve); // this handles Color HLRecovery if (settings->verbose) { @@ -297,16 +297,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } else if (params.wb.method == "Auto") { if (lastAwbEqual != params.wb.equal || lastAwbTempBias != params.wb.tempBias) { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1.) { - autoWB.update(rm, gm, bm, params.wb.equal, params.wb.tempBias); + autoWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); lastAwbEqual = params.wb.equal; lastAwbTempBias = params.wb.tempBias; } else { lastAwbEqual = -1.; lastAwbTempBias = 0.0; - autoWB.useDefaults(params.wb.equal); + autoWB.useDefaults (params.wb.equal); } //double rr,gg,bb; @@ -318,11 +318,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) params.wb.temperature = currWB.getTemp (); params.wb.green = currWB.getGreen (); - if(params.wb.method == "Auto" && awbListener) { - awbListener->WBChanged(params.wb.temperature, params.wb.green); + + if (params.wb.method == "Auto" && awbListener) { + awbListener->WBChanged (params.wb.temperature, params.wb.green); } - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fw, fh, tr); @@ -377,7 +378,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } */ - imgsrc->convertColorSpace(orig_prev, params.icm, currWB); + imgsrc->convertColorSpace (orig_prev, params.icm, currWB); ipf.firstAnalysis (orig_prev, params, vhist16); } @@ -388,42 +389,45 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Remove transformation if unneeded bool needstransform = ipf.needsTransform(); - if (!needstransform && !((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { + if (!needstransform && ! ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { delete oprevi; oprevi = orig_prev; } if ((needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { - if(!oprevi || oprevi == orig_prev) + if (!oprevi || oprevi == orig_prev) { oprevi = new Imagefloat (pW, pH); + } + if (needstransform) ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), false); - else - orig_prev->copyData(oprevi); + else { + orig_prev->copyData (oprevi); + } } if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = oprevi->getWidth(); const int H = oprevi->getHeight(); - LabImage labcbdl(W, H); - ipf.rgb2lab(*oprevi, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + ipf.rgb2lab (*oprevi, labcbdl, params.icm.working); ipf.dirpyrequalizer (&labcbdl, scale); - ipf.lab2rgb(labcbdl, *oprevi, params.icm.working); + ipf.lab2rgb (labcbdl, *oprevi, params.icm.working); } readyphase++; progress ("Preparing shadow/highlight map...", 100 * readyphase / numofphases); if ((todo & M_BLURMAP) && params.sh.enabled) { - double radius = sqrt (double(pW * pW + pH * pH)) / 2.0; + double radius = sqrt (double (pW * pW + pH * pH)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { shradius *= radius / 1800.0; } - if(!shmap) { + if (!shmap) { shmap = new SHMap (pW, pH, true); } @@ -467,7 +471,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) opautili = false; - if(params.colorToning.enabled) { + if (params.colorToning.enabled) { TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, @@ -480,34 +484,34 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); } - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, vhist16bw, histToneCurveBW, beforeToneCurveBW, afterToneCurveBW, 1); } - colourToningSatLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - colourToningSatLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + colourToningSatLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + colourToningSatLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); int satTH = 80; int satPR = 30; int indi = 0; - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (oprevi, moyS, eqty);//return image : mean saturation and standard dev of saturation //printf("moy=%f ET=%f\n", moyS,eqty); float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -520,22 +524,22 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) satPR = (int) 100.f * (moyS - 0.85f * eqty); } - if(actListener) { + if (actListener) { //if(params.blackwhite.enabled) {actListener->autoColorTonChanged(0, satTH, satPR);} - if(params.blackwhite.enabled && params.colorToning.autosat) { - actListener->autoColorTonChanged(0, satTH, satPR); //hide sliders only if autosat + if (params.blackwhite.enabled && params.colorToning.autosat) { + actListener->autoColorTonChanged (0, satTH, satPR); //hide sliders only if autosat indi = 0; } else { - if(params.colorToning.autosat) { + if (params.colorToning.autosat) { if (params.colorToning.method == "Lab") { indi = 1; - } else if(params.colorToning.method == "RGBCurves") { + } else if (params.colorToning.method == "RGBCurves") { indi = 1; - } else if(params.colorToning.method == "RGBSliders") { + } else if (params.colorToning.method == "RGBSliders") { indi = 1; - } else if(params.colorToning.method == "Splico") { + } else if (params.colorToning.method == "Splico") { indi = 2; - } else if(params.colorToning.method == "Splitlr") { + } else if (params.colorToning.method == "Splitlr") { indi = 2; } @@ -552,25 +556,25 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) double bbm = 33.; DCPProfile::ApplyState as; - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); + DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as); ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, - rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); + rCurve, gCurve, bCurve, colourToningSatLimit, colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); - if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { + if (params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { if (settings->verbose) { - printf("ImProcCoordinator / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", bwAutoR, bwAutoG, bwAutoB); + printf ("ImProcCoordinator / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", bwAutoR, bwAutoG, bwAutoB); } - abwListener->BWChanged((float) rrm, (float) ggm, (float) bbm); + abwListener->BWChanged ((float) rrm, (float) ggm, (float) bbm); } - if(params.colorToning.autosat && actListener) { + if (params.colorToning.autosat && actListener) { if (settings->verbose) { - printf("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi, (int)colourToningSatLimit , (int) colourToningSatLimitOpacity); + printf ("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi, (int)colourToningSatLimit, (int) colourToningSatLimitOpacity); } - actListener->autoColorTonChanged(indi, (int) colourToningSatLimit, (int)colourToningSatLimitOpacity);//change sliders autosat + actListener->autoColorTonChanged (indi, (int) colourToningSatLimit, (int)colourToningSatLimitOpacity); //change sliders autosat } // correct GUI black and white with value @@ -578,20 +582,20 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // compute L channel histogram int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); } readyphase++; if (todo & (M_LUMACURVE | M_CROP)) { - LUTu lhist16(32768); + LUTu lhist16 (32768); lhist16.clear(); #ifdef _OPENMP - const int numThreads = min(max(pW * pH / (int)lhist16.getSize(), 1), omp_get_max_threads()); + const int numThreads = min (max (pW * pH / (int)lhist16.getSize(), 1), omp_get_max_threads()); #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { - LUTu lhist16thr(lhist16.getSize()); + LUTu lhist16thr (lhist16.getSize()); lhist16thr.clear(); #ifdef _OPENMP #pragma omp for nowait @@ -599,7 +603,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) for (int x = 0; x < pH; x++) for (int y = 0; y < pW; y++) { - int pos = (int)(oprevl->L[x][y]); + int pos = (int) (oprevl->L[x][y]); lhist16thr[pos]++; } @@ -609,31 +613,31 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) lhist16 += lhist16thr; } #ifdef _OPENMP - static_cast(numThreads); // to silence cppcheck warning + static_cast (numThreads); // to silence cppcheck warning #endif CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, lhist16, lumacurve, histLCurve, scale == 1 ? 1 : 16, utili); } if (todo & M_LUMACURVE) { - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, scale == 1 ? 1 : 16); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, scale == 1 ? 1 : 16); CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, scale == 1 ? 1 : 16); } if (todo & (M_LUMINANCE + M_COLOR) ) { - nprevl->CopyFrom(oprevl); + nprevl->CopyFrom (oprevl); progress ("Applying Color Boost...", 100 * readyphase / numofphases); // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); - ipf.vibrance(nprevl); + ipf.vibrance (nprevl); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - ipf.EPDToneMap(nprevl, 5, scale); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + ipf.EPDToneMap (nprevl, 5, scale); } // for all treatments Defringe, Sharpening, Contrast detail , Microcontrast they are activated if "CIECAM" function are disabled @@ -679,8 +683,8 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } */ - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) ) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) ) { progress ("Pyramid wavelet...", 100 * readyphase / numofphases); ipf.dirpyrequalizer (nprevl, scale); //ipf.Lanczoslab (ip_wavelet(LabImage * lab, LabImage * dst, const procparams::EqualizerParams & eqparams), nprevl, 1.f/scale); @@ -691,35 +695,35 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) wavcontlutili = false; //CurveFactory::curveWavContL ( wavcontlutili,params.wavelet.lcurve, wavclCurve, LUTu & histogramwavcl, LUTu & outBeforeWavCLurveHistogram,int skip); - CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve, scale == 1 ? 1 : 16); + CurveFactory::curveWavContL (wavcontlutili, params.wavelet.wavclCurve, wavclCurve, scale == 1 ? 1 : 16); - if((params.wavelet.enabled)) { + if ((params.wavelet.enabled)) { WaveletParams WaveParams = params.wavelet; // WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY); - WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); + WaveParams.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); int kall = 0; progress ("Wavelet...", 100 * readyphase / numofphases); // ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, scale); - ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, scale); + ipf.ip_wavelet (nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, scale); } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { //L histo and Chroma histo for ciecam // histogram well be for Lab (Lch) values, because very difficult to do with J,Q, M, s, C int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); lhist16CAM.clear(); lhist16CCAM.clear(); - if(!params.colorappearance.datacie) { + if (!params.colorappearance.datacie) { for (int x = 0; x < pH; x++) for (int y = 0; y < pW; y++) { - int pos = CLIP((int)(nprevl->L[x][y])); - int posc = CLIP((int)sqrt(nprevl->a[x][y] * nprevl->a[x][y] + nprevl->b[x][y] * nprevl->b[x][y])); + int pos = CLIP ((int) (nprevl->L[x][y])); + int posc = CLIP ((int)sqrt (nprevl->a[x][y] * nprevl->a[x][y] + nprevl->b[x][y] * nprevl->b[x][y])); lhist16CAM[pos]++; lhist16CCAM[posc]++; } @@ -734,13 +738,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) double fcomp = imgsrc->getMetaData()->getExpComp (); // Compensation +/- double adap; - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong adap = 2000.; } else { - double E_V = fcomp + log2 (double((fnum * fnum) / fspeed / (fiso / 100.f))); + double E_V = fcomp + log2 (double ((fnum * fnum) / fspeed / (fiso / 100.f))); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = powf(2.f, E_V - 3.f); // cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = powf (2.f, E_V - 3.f); // cd / m2 // end calculation adaptation scene luminosity } @@ -749,16 +753,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) float d, dj, yb; bool execsharp = false; - if(!ncie) { + if (!ncie) { ncie = new CieImage (pW, pH); } if (!CAMBrightCurveJ && (params.colorappearance.algo == "JC" || params.colorappearance.algo == "JS" || params.colorappearance.algo == "ALL")) { - CAMBrightCurveJ(32768, 0); + CAMBrightCurveJ (32768, 0); } if (!CAMBrightCurveQ && (params.colorappearance.algo == "QM" || params.colorappearance.algo == "ALL")) { - CAMBrightCurveQ(32768, 0); + CAMBrightCurveQ (32768, 0); } // Issue 2785, only float version of ciecam02 for navigator and pan background @@ -766,20 +770,20 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1); + ipf.ciecam_02float (ncie, float (adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1); - if((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) { - acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); + if ((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) { + acListener->autoCamChanged (100.* (double)d, 100.* (double)dj); } - if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { - acListener->adapCamChanged(adap); //real value of adapt scene + if (params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { + acListener->adapCamChanged (adap); //real value of adapt scene } - if(params.colorappearance.autoybscen && acListener && params.colorappearance.enabled) { - acListener->ybCamChanged((int) yb); //real value Yb scene + if (params.colorappearance.autoybscen && acListener && params.colorappearance.enabled) { + acListener->ybCamChanged ((int) yb); //real value Yb scene } - + readyphase++; } else { // CIECAM is disabled, we free up its image buffer to save some space @@ -800,11 +804,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } // Update the monitor color transform if necessary - if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + if ((todo & M_MONITOR) || (lastOutputProfile != params.icm.output) || lastOutputIntent != params.icm.outputIntent || lastOutputBPC != params.icm.outputBPC) { lastOutputProfile = params.icm.output; lastOutputIntent = params.icm.outputIntent; lastOutputBPC = params.icm.outputBPC; - ipf.updateColorProfiles(monitorProfile, monitorIntent, softProof, gamutCheck); + ipf.updateColorProfiles (monitorProfile, monitorIntent, softProof, gamutCheck); } // process crop, if needed @@ -816,7 +820,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) progress ("Conversion to RGB...", 100 * readyphase / numofphases); if ((todo != CROP && todo != MINUPDATE) || (todo & M_MONITOR)) { - MyMutex::MyLock prevImgLock(previmg->getMutex()); + MyMutex::MyLock prevImgLock (previmg->getMutex()); try { // Computing the preview image, i.e. converting from WCS->Monitor color space (soft-proofing disabled) or WCS->Printer profile->Monitor color space (soft-proofing enabled) @@ -825,7 +829,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Computing the internal image for analysis, i.e. conversion from WCS->Output profile delete workimg; workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, params.icm); - } catch(char * str) { + } catch (char * str) { progress ("Error converting file...", 0); return; } @@ -889,7 +893,7 @@ void ImProcCoordinator::freeAll () delete workimg; - if(shmap) { + if (shmap) { delete shmap; } @@ -913,7 +917,7 @@ void ImProcCoordinator::setScale (int prevscale) printf ("setscale before lock\n"); } - tr = getCoarseBitMask(params.coarse); + tr = getCoarseBitMask (params.coarse); int nW, nH; imgsrc->getFullSize (fw, fh, tr); @@ -924,7 +928,7 @@ void ImProcCoordinator::setScale (int prevscale) prevscale--; PreviewProps pp (0, 0, fw, fh, prevscale); imgsrc->getSize (pp, nW, nH); - } while(nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // sctually hardcoded values, perhaps a better choice is possible + } while (nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // sctually hardcoded values, perhaps a better choice is possible if (settings->verbose) { printf ("setscale starts (%d, %d)\n", nW, nH); @@ -945,7 +949,7 @@ void ImProcCoordinator::setScale (int prevscale) previmg = new Image8 (pW, pH); workimg = new Image8 (pW, pH); - if(params.sh.enabled) { + if (params.sh.enabled) { shmap = new SHMap (pW, pH, true); } @@ -977,7 +981,7 @@ void ImProcCoordinator::updateLRGBHistograms () { int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); #pragma omp parallel sections { @@ -988,7 +992,7 @@ void ImProcCoordinator::updateLRGBHistograms () for (int i = y1; i < y2; i++) for (int j = x1; j < x2; j++) { - histChroma[(int)(sqrtf(SQR(nprevl->a[i][j]) + SQR(nprevl->b[i][j])) / 188.f)]++; //188 = 48000/256 + histChroma[ (int) (sqrtf (SQR (nprevl->a[i][j]) + SQR (nprevl->b[i][j])) / 188.f)]++; //188 = 48000/256 } } #pragma omp section @@ -998,7 +1002,7 @@ void ImProcCoordinator::updateLRGBHistograms () for (int i = y1; i < y2; i++) for (int j = x1; j < x2; j++) { - histLuma[(int)(nprevl->L[i][j] / 128.f)]++; + histLuma[ (int) (nprevl->L[i][j] / 128.f)]++; } } #pragma omp section @@ -1042,15 +1046,15 @@ bool ImProcCoordinator::getAutoWB (double& temp, double& green, double equal, do if (lastAwbEqual != equal || lastAwbTempBias != tempBias) { // Issue 2500 MyMutex::MyLock lock(minit); // Also used in crop window double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1) { - autoWB.update(rm, gm, bm, equal, tempBias); + autoWB.update (rm, gm, bm, equal, tempBias); lastAwbEqual = equal; lastAwbTempBias = tempBias; } else { lastAwbEqual = -1.; - autoWB.useDefaults(equal); + autoWB.useDefaults (equal); lastAwbTempBias = 0.0; } } @@ -1081,7 +1085,7 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& ColorTemp ret; { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); std::vector points, red, green, blue; for (int i = y - rect; i <= y + rect; i++) @@ -1091,7 +1095,7 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& ipf.transCoord (fw, fh, points, red, green, blue); - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); ret = imgsrc->getSpotWB (red, green, blue, tr, params.wb.equal); currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); @@ -1112,15 +1116,15 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int &h) { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { - LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); + LCPProfile *pLCPProf = lcpStore->getProfile (params.lensProf.lcpFile); - if (pLCPProf) pLCPMap = new LCPMapper(pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), - 0, false, params.lensProf.useDist, fullw, fullh, params.coarse, imgsrc->getRotateDegree()); + if (pLCPProf) pLCPMap = new LCPMapper (pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), + 0, false, params.lensProf.useDist, fullw, fullh, params.coarse, imgsrc->getRotateDegree()); } double fillscale = ipf.getTransformAutoFill (fullw, fullh, pLCPMap); @@ -1169,11 +1173,11 @@ void ImProcCoordinator::getSoftProofing (bool &softProof, bool &gamutCheck) void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool apply_wb) { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); int fW, fH; - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fW, fH, tr); PreviewProps pp (0, 0, fW, fH, 1); @@ -1181,8 +1185,8 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool ppar.toneCurve.hrenabled = false; ppar.icm.input = "(none)"; Imagefloat* im = new Imagefloat (fW, fH); - imgsrc->preprocess( ppar.raw, ppar.lensProf, ppar.coarse ); - imgsrc->demosaic(ppar.raw ); + imgsrc->preprocess ( ppar.raw, ppar.lensProf, ppar.coarse ); + imgsrc->demosaic (ppar.raw ); ColorTemp currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); if (params.wb.method == "Camera") { @@ -1190,16 +1194,16 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool } else if (params.wb.method == "Auto") { if (lastAwbEqual != params.wb.equal || lastAwbTempBias != params.wb.tempBias) { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1.) { - autoWB.update(rm, gm, bm, params.wb.equal, params.wb.tempBias); + autoWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); lastAwbEqual = params.wb.equal; lastAwbTempBias = params.wb.tempBias; } else { lastAwbEqual = -1.; lastAwbTempBias = 0.0; - autoWB.useDefaults(params.wb.equal); + autoWB.useDefaults (params.wb.equal); } } @@ -1231,9 +1235,9 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool for (int i = cy; i < cy + ch; i++) { for (int j = cx; j < cx + cw; j++) { - tmpim->r(i - cy, j - cx) = im->r(i, j); - tmpim->g(i - cy, j - cx) = im->g(i, j); - tmpim->b(i - cy, j - cx) = im->b(i, j); + tmpim->r (i - cy, j - cx) = im->r (i, j); + tmpim->g (i - cy, j - cx) = im->g (i, j); + tmpim->b (i - cy, j - cx) = im->b (i, j); } } @@ -1244,11 +1248,11 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool // image may contain out of range samples, clip them to avoid wrap-arounds #pragma omp parallel for - for(int i = 0; i < im->getHeight(); i++) { - for(int j = 0; j < im->getWidth(); j++) { - im->r(i, j) = CLIP(im->r(i, j)); - im->g(i, j) = CLIP(im->g(i, j)); - im->b(i, j) = CLIP(im->b(i, j)); + for (int i = 0; i < im->getHeight(); i++) { + for (int j = 0; j < im->getWidth(); j++) { + im->r (i, j) = CLIP (im->r (i, j)); + im->g (i, j) = CLIP (im->g (i, j)); + im->b (i, j) = CLIP (im->b (i, j)); } } @@ -1256,7 +1260,7 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool delete im; int imw, imh; - double tmpScale = ipf.resizeScale(¶ms, fW, fH, imw, imh); + double tmpScale = ipf.resizeScale (¶ms, fW, fH, imw, imh); if (tmpScale != 1.0) { Image16* tempImage = new Image16 (imw, imh); @@ -1302,13 +1306,13 @@ void ImProcCoordinator::startProcessing () //batchThread->yield(); //the running batch should wait other threads to avoid conflict - thread = Glib::Thread::create(sigc::mem_fun(*this, &ImProcCoordinator::process), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); + thread = Glib::Thread::create (sigc::mem_fun (*this, &ImProcCoordinator::process), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); } } } -void ImProcCoordinator::startProcessing(int changeCode) +void ImProcCoordinator::startProcessing (int changeCode) { paramsUpdateMutex.lock(); changeSinceLast |= changeCode; @@ -1356,7 +1360,7 @@ ProcParams* ImProcCoordinator::beginUpdateParams () void ImProcCoordinator::endUpdateParams (ProcEvent change) { - endUpdateParams( refreshmap[(int)change] ); + endUpdateParams ( refreshmap[ (int)change] ); } void ImProcCoordinator::endUpdateParams (int changeFlags) diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 19fce3a76..41b901e93 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -223,7 +223,7 @@ public: *dst = params; } - void startProcessing(int changeCode); + void startProcessing (int changeCode); ProcParams* beginUpdateParams (); void endUpdateParams (ProcEvent change); // must be called after beginUpdateParams, triggers update void endUpdateParams (int changeFlags); @@ -304,7 +304,7 @@ public: { aeListener = ael; } - void setHistogramListener(HistogramListener *h) + void setHistogramListener (HistogramListener *h) { hListener = h; } @@ -355,7 +355,7 @@ public: } struct DenoiseInfoStore { - DenoiseInfoStore () : chM(0), max_r{}, max_b{}, ch_M{}, valid(false) {} + DenoiseInfoStore () : chM (0), max_r{}, max_b{}, ch_M{}, valid (false) {} float chM; float max_r[9]; float max_b[9]; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index f67ba3660..7518416cb 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -265,11 +265,11 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double Xw, Zw; double Xwout, Zwout; double Xwsc, Zwsc; - + double f = 0., c = 0., nc = 0., yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; double fl, n, nbb, ncb, aw; double xwd = 0., ywd, zwd = 0.; - double xws, yws, zws; + double xws, yws, zws; int alg = 0; bool algepd = false; float sum = 0.f; @@ -298,8 +298,8 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh c = 0.41; nc = 0.8; } - - + + //viewing condition for surround if (params->colorappearance.surround == "Average") { f2 = 1.0, c2 = 0.69, nc2 = 1.0; @@ -316,14 +316,15 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh c2 = 0.41; nc2 = 0.8; } -/* - //scene condition for surround - if (params->colorappearance.surrsource) { - f = 0.85; // if user => source image has surround very dark - c = 0.55; - nc = 0.85; - } -*/ + + /* + //scene condition for surround + if (params->colorappearance.surrsource) { + f = 0.85; // if user => source image has surround very dark + c = 0.55; + nc = 0.85; + } + */ //with which algorithme if (params->colorappearance.algo == "JC") { alg = 0; @@ -383,7 +384,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xws = 100. * Xwsc; zws = 100. * Zwsc; yws = 100. / params->colorappearance.greensc;//approximation to simplify - + /* //settings mean Luminance Y of output device or viewing if (settings->viewingdevicegrey == 0) { @@ -422,7 +423,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh const float degout = (params->colorappearance.degreeout) / 100.0; const float pilotout = params->colorappearance.autodegreeout ? 2.0 : degout; - + //algoritm's params float jli = params->colorappearance.jlight; float chr = params->colorappearance.chroma; @@ -527,9 +528,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } } - // if (settings->viewinggreySc == 0) { //auto + // if (settings->viewinggreySc == 0) { //auto if (params->colorappearance.autoybscen && pwb == 2) {//auto - + if (mean < 15.f) { yb = 3.0; } else if (mean < 30.f) { @@ -554,8 +555,8 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh yb = 90.0; } } else { - yb = params->colorappearance.ybscen; - } + yb = params->colorappearance.ybscen; + } if (settings->viewinggreySc == 1) { yb = 18.0; @@ -571,7 +572,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw = 100.0 * Xw; yw = 100.0 * Yw; zw = 100.0 * Zw; - double xw1 =0., yw1 = 0., zw1 = 0., xw2 = 0., yw2 = 0., zw2 = 0.; + double xw1 = 0., yw1 = 0., zw1 = 0., xw2 = 0., yw2 = 0., zw2 = 0.; // settings of WB: scene and viewing if (params->colorappearance.wbmodel == "RawT") { @@ -581,21 +582,21 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else if (params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - }else if(params->colorappearance.wbmodel == "free") { + } else if (params->colorappearance.wbmodel == "free") { xw1 = xws; // free temp and green yw1 = yws; zw1 = zws; xw2 = xwd; yw2 = ywd; - zw2 = zwd; - } + zw2 = zwd; + } double cz, wh, pfl; Ciecam02::initcam1 (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); @@ -1567,8 +1568,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int c = 0.41f; nc = 0.8f; } - - + + //viewing condition for surround if (params->colorappearance.surround == "Average") { f2 = 1.0f, c2 = 0.69f, nc2 = 1.0f; @@ -1585,14 +1586,15 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int c2 = 0.41f; nc2 = 0.8f; } -/* - //scene condition for surround - if (params->colorappearance.surrsource) { - f = 0.85f; // if user => source image has surround very dark - c = 0.55f; - nc = 0.85f; - } -*/ + + /* + //scene condition for surround + if (params->colorappearance.surrsource) { + f = 0.85f; // if user => source image has surround very dark + c = 0.55f; + nc = 0.85f; + } + */ //with which algorithm if (params->colorappearance.algo == "JC") { alg = 0; @@ -1609,12 +1611,12 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xwd = 100.f * Xwout; zwd = 100.f * Zwout; ywd = 100.f / params->colorappearance.greenout;//approximation to simplify - + xws = 100.f * Xwsc; zws = 100.f * Zwsc; yws = 100.f / params->colorappearance.greensc;//approximation to simplify - - + + /* //settings white point of output device - or illuminant viewing if (settings->viewingdevice == 0) { @@ -1691,7 +1693,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const float degout = (params->colorappearance.degreeout) / 100.0f; const float pilotout = params->colorappearance.autodegreeout ? 2.0f : degout; - + //algoritm's params float chr = 0.f; @@ -1866,11 +1868,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //evaluate lightness, contrast } - - - // if (settings->viewinggreySc == 0) { //auto - if (params->colorappearance.autoybscen && pwb == 2) {//auto - + + + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0f; } else if (mean < 30.f) { @@ -1894,8 +1896,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } else { yb = 90.0f; } + // } else if (settings->viewinggreySc == 1) { - } else { + } else { yb = (float) params->colorappearance.ybscen; } @@ -1915,21 +1918,21 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else if (params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "free") { + } else if (params->colorappearance.wbmodel == "free") { xw1 = xws; // free temp and green yw1 = yws; zw1 = zws; xw2 = xwd; yw2 = ywd; - zw2 = zwd; - } + zw2 = zwd; + } float cz, wh, pfl; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index d9cd17ef5..309e5c029 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -52,7 +52,7 @@ class ImProcFunctions double scale; bool multiThread; - void calcVignettingParams(int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul); + void calcVignettingParams (int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul); void transformPreview (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap); void transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH); @@ -95,9 +95,9 @@ class ImProcFunctions rd = gd = bd = 0.0; for (int i = xs, ix = 0; i < xs + 4; i++, ix++) { - rd += src->r(k, i) * w[ix]; - gd += src->g(k, i) * w[ix]; - bd += src->b(k, i) * w[ix]; + rd += src->r (k, i) * w[ix]; + gd += src->g (k, i) * w[ix]; + bd += src->b (k, i) * w[ix]; } yr[kx] = rd; @@ -196,7 +196,7 @@ public: double lumimul[3]; ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} + : monitorTransform (nullptr), lab2outputTransform (nullptr), output2monitorTransform (nullptr), params (iparams), scale (1), multiThread (imultiThread), lumimul{} {} ~ImProcFunctions (); void setScale (double iscale); @@ -207,10 +207,10 @@ public: void firstAnalysis (const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16); void updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve); void labtoning (float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve, LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] ); @@ -245,9 +245,9 @@ public: void deconvsharpening (float** luminance, float** buffer, int W, int H, const SharpeningParams &sharpenParam); void MLsharpen (LabImage* lab);// Manuel's clarity / sharpening - void MLmicrocontrast(float** luminance, int W, int H ); //Manuel's microcontrast - void MLmicrocontrast(LabImage* lab ); //Manuel's microcontrast - void MLmicrocontrastcam(CieImage* ncie ); //Manuel's microcontrast + void MLmicrocontrast (float** luminance, int W, int H ); //Manuel's microcontrast + void MLmicrocontrast (LabImage* lab ); //Manuel's microcontrast + void MLmicrocontrastcam (CieImage* ncie ); //Manuel's microcontrast void impulsedenoise (LabImage* lab);//Emil's impulse denoise void impulsedenoisecam (CieImage* ncie, float **buffers[3]); @@ -258,13 +258,13 @@ public: void dirpyrequalizer (LabImage* lab, int scale);//Emil's wavelet - void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); - float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); - void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); + void EPDToneMapResid (float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); + float *CompressDR (float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); + void ContrastResid (float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); + float *ContrastDR (float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); - void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); - void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); + void EPDToneMap (LabImage *lab, unsigned int Iterates = 0, int skip = 1); + void EPDToneMapCIE (CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); // pyramid denoise procparams::DirPyrDenoiseParams dnparams; @@ -274,58 +274,58 @@ public: int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/ ); void Tile_calc (int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip); - void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, bool wavcontlutili, int skip); + void ip_wavelet (LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, bool wavcontlutili, int skip); - void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L, - struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili); - void WaveletcontAllLfinal(wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); - void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW, - struct cont_params &cp, const bool useChannelA); - void WaveletAandBAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b, - struct cont_params &cp, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* hhcurve, bool hhutili); + void WaveletcontAllL (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L, + struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili); + void WaveletcontAllLfinal (wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); + void WaveletcontAllAB (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW, + struct cont_params &cp, const bool useChannelA); + void WaveletAandBAllAB (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b, + struct cont_params &cp, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* hhcurve, bool hhutili); void ContAllL (float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp, int W_L, int H_L, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili); void finalContAllL (float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp, int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); void ContAllAB (LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp, int W_ab, int H_ab, const bool useChannelA); - void Evaluate2(wavelet_decomposition &WaveletCoeffs_L, - const struct cont_params& cp, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float madL[8][3]); + void Evaluate2 (wavelet_decomposition &WaveletCoeffs_L, + const struct cont_params& cp, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float madL[8][3]); void Eval2 (float ** WavCoeffs_L, int level, const struct cont_params& cp, int W_L, int H_L, int skip_L, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float *madL); - void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); - void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); - void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); + void Aver (float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); + void Sigma (float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); + void calckoe (float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); - void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); - void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); - void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); - void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); + void Median_Denoise ( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); + void RGB_denoise (int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve, const NoiseCurve & noiseCCurve, float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); + void RGB_denoise_infoGamCurve (const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); + void RGB_denoise_info (Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); void RGBtile_denoise (float * fLblox, int hblproc, float noisevar_Ldetail, float * nbrwt, float * blurbuffer ); //for DCT void RGBoutput_tile_row (float *bloxrow_L, float ** Ldetail, float ** tilemask_out, int height, int width, int top ); - bool WaveletDenoiseAllL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); - bool WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); - void WaveletDenoiseAll_info(int levwav, wavelet_decomposition &WaveletCoeffs_a, - wavelet_decomposition &WaveletCoeffs_b, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float & minblueaut, int schoice, bool autoch, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, - float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); + bool WaveletDenoiseAllL (wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); + bool WaveletDenoiseAllAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); + void WaveletDenoiseAll_info (int levwav, wavelet_decomposition &WaveletCoeffs_a, + wavelet_decomposition &WaveletCoeffs_b, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float & minblueaut, int schoice, bool autoch, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, + float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); - bool WaveletDenoiseAll_BiShrinkL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3]); - bool WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, - const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); - void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); - void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); - void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, - int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, - float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); - void Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); + bool WaveletDenoiseAll_BiShrinkL (wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3]); + bool WaveletDenoiseAll_BiShrinkAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, + const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); + void ShrinkAllL (wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); + void ShrinkAllAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); + void ShrinkAll_info (float ** WavCoeffs_a, float ** WavCoeffs_b, int level, + int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, + float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); + void Noise_residualAB (wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); void calcautodn_info (float &chaut, float &delta, int Nb, int levaut, float maxmax, float lumema, float chromina, int mode, int lissage, float redyel, float skinc, float nsknc); - float MadMax(float * DataList, int &max, int datalen); - float Mad(float * DataList, const int datalen); - float MadRgb(float * DataList, const int datalen); + float MadMax (float * DataList, int &max, int datalen); + float Mad (float * DataList, const int datalen); + float MadRgb (float * DataList, const int datalen); // pyramid wavelet void dirpyr_equalizer (float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, float ** dest_a, float ** dest_b, const double * mult, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale);//Emil's directional pyramid wavelet @@ -340,11 +340,11 @@ public: void PF_correct_RT (LabImage * src, LabImage * dst, double radius, int thresh); void PF_correct_RTcam (CieImage * src, CieImage * dst, double radius, int thresh); - void Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); - void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); + void Badpixelscam (CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); + void BadpixelsLab (LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=nullptr); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga = nullptr); // CieImage *ciec; bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); @@ -352,8 +352,8 @@ public: static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); - void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); - void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); + void rgb2lab (const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); + void lab2rgb (const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; } #endif diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 6114dc1b5..e1a3002e2 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2106,7 +2106,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.autodegreeout) { keyFile.set_boolean ("Color appearance", "AutoDegreeout", colorappearance.autodegreeout); } - + if (!pedited || pedited->colorappearance.surround) { keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); } @@ -2114,7 +2114,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.surrsrc) { keyFile.set_string ("Color appearance", "Surrsrc", colorappearance.surrsrc); } - + // if (!pedited || pedited->colorappearance.backgrd) keyFile.set_integer ("Color appearance", "Background", colorappearance.backgrd); if (!pedited || pedited->colorappearance.adaplum) { keyFile.set_double ("Color appearance", "AdaptLum", colorappearance.adaplum); @@ -2183,7 +2183,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.autoybscen) { keyFile.set_boolean ("Color appearance", "Autoybscen", colorappearance.autoybscen); } - + if (!pedited || pedited->colorappearance.surrsource) { keyFile.set_boolean ("Color appearance", "SurrSource", colorappearance.surrsource); } @@ -2207,7 +2207,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.greensc) { keyFile.set_double ("Color appearance", "Greensc", colorappearance.greensc); } - + if (!pedited || pedited->colorappearance.ybout) { keyFile.set_integer ("Color appearance", "Ybout", colorappearance.ybout); } @@ -5021,7 +5021,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.autodegreeout = true; } } - + if (keyFile.has_key ("Color appearance", "Surround")) { colorappearance.surround = keyFile.get_string ("Color appearance", "Surround"); @@ -5037,7 +5037,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.surrsrc = true; } } - + // if (keyFile.has_key ("Color appearance", "Background")) {colorappearance.backgrd = keyFile.get_integer ("Color appearance", "Background"); if (pedited) pedited->colorappearance.backgrd = true; } if (keyFile.has_key ("Color appearance", "AdaptLum")) { colorappearance.adaplum = keyFile.get_double ("Color appearance", "AdaptLum"); @@ -5174,7 +5174,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.autoybscen = true; } } - + if (keyFile.has_key ("Color appearance", "SurrSource")) { colorappearance.surrsource = keyFile.get_boolean ("Color appearance", "SurrSource"); @@ -5222,7 +5222,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.greensc = true; } } - + if (keyFile.has_key ("Color appearance", "Ybout")) { colorappearance.ybout = keyFile.get_integer ("Color appearance", "Ybout"); diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index cd4cd4942..9ba794a1f 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -276,7 +276,7 @@ public : virtual void autoCamChanged (double ccam, double ccamout) {} virtual void adapCamChanged (double cadap) {} virtual void ybCamChanged (int yb) {} - + }; class AutoChromaListener @@ -316,21 +316,21 @@ class AutoWBListener { public : virtual ~AutoWBListener() = default; - virtual void WBChanged(double temp, double green) = 0; + virtual void WBChanged (double temp, double green) = 0; }; class FrameCountListener { public : virtual ~FrameCountListener() = default; - virtual void FrameCountChanged(int n, int frameNum) = 0; + virtual void FrameCountChanged (int n, int frameNum) = 0; }; class ImageTypeListener { public : virtual ~ImageTypeListener() = default; - virtual void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans) = 0; + virtual void imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans) = 0; }; class WaveletListener @@ -388,7 +388,7 @@ public: virtual void endUpdateParams (ProcEvent change) = 0; virtual void endUpdateParams (int changeFlags) = 0; // Starts a minimal update - virtual void startProcessing(int changeCode) = 0; + virtual void startProcessing (int changeCode) = 0; /** Stops image processing. When it returns, the image processing is already stopped. */ virtual void stopProcessing () = 0; /** Sets the scale of the preview image. The larger the number is, the faster the image updates are (typical values are 4-5). @@ -481,7 +481,7 @@ public: * @param isRaw shall be true if it is a raw file * @param pparams is a struct containing the processing parameters * @return an object containing the data above. It can be passed to the functions that do the actual image processing. */ - static ProcessingJob* create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams, bool fast=false); + static ProcessingJob* create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams, bool fast = false); /** Creates a processing job from a file name. This function always succeeds. It only stores the data into the ProcessingJob class, it does not load * the image thus it returns immediately. This function increases the reference count of the initialImage. If you decide not the process the image you @@ -490,7 +490,7 @@ public: * @param initialImage is a loaded and pre-processed initial image * @param pparams is a struct containing the processing parameters * @return an object containing the data above. It can be passed to the functions that do the actual image processing. */ - static ProcessingJob* create (InitialImage* initialImage, const procparams::ProcParams& pparams, bool fast=false); + static ProcessingJob* create (InitialImage* initialImage, const procparams::ProcParams& pparams, bool fast = false); /** Cancels and destroys a processing job. The reference count of the corresponding initialImage (if any) is decreased. After the call of this function the ProcessingJob instance * gets invalid, you must not use it any more. Dont call this function while the job is being processed. @@ -519,7 +519,7 @@ public: * @param img is the result of the last ProcessingJob * @return the next ProcessingJob to process */ virtual ProcessingJob* imageReady (IImage16* img) = 0; - virtual void error(Glib::ustring message) = 0; + virtual void error (Glib::ustring message) = 0; }; /** This function performs all the image processinf steps corresponding to the given ProcessingJob. It runs in the background, thus it returns immediately, * When it finishes, it calls the BatchProcessingListener with the resulting image and asks for the next job. It the listener gives a new job, it goes on diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 4388b6184..511b17f9f 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -42,83 +42,91 @@ namespace { - bool checkRawImageThumb(const rtengine::RawImage& raw_image) - { - if (!raw_image.is_supportedThumb()) { - return false; - } - - const ssize_t length = - fdata(raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() - ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 - : raw_image.get_thumbLength(); - - return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; +bool checkRawImageThumb (const rtengine::RawImage& raw_image) +{ + if (!raw_image.is_supportedThumb()) { + return false; } + const ssize_t length = + fdata (raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() + ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 + : raw_image.get_thumbLength(); -void scale_colors(rtengine::RawImage *ri, float scale_mul[4], float cblack[4]) + return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; +} + + +void scale_colors (rtengine::RawImage *ri, float scale_mul[4], float cblack[4]) { DCraw::dcrawImage_t image = ri->get_image(); - if(ri->isBayer()) { + + if (ri->isBayer()) { const int height = ri->get_iheight(); const int width = ri->get_iwidth(); - for(int row = 0; row < height; ++row) { - unsigned c0 = ri->FC(row,0); - unsigned c1 = ri->FC(row,1); + + for (int row = 0; row < height; ++row) { + unsigned c0 = ri->FC (row, 0); + unsigned c1 = ri->FC (row, 1); int col = 0; - for(; col < width - 1; col += 2) { + + for (; col < width - 1; col += 2) { float val0 = image[row * width + col][c0]; float val1 = image[row * width + col + 1][c1]; val0 -= cblack[c0]; val1 -= cblack[c1]; val0 *= scale_mul[c0]; val1 *= scale_mul[c1]; - image[row * width + col][c0] = rtengine::CLIP(val0); - image[row * width + col + 1][c1] = rtengine::CLIP(val1); + image[row * width + col][c0] = rtengine::CLIP (val0); + image[row * width + col + 1][c1] = rtengine::CLIP (val1); } - if(col < width) { // in case width is odd + + if (col < width) { // in case width is odd float val0 = image[row * width + col][c0]; val0 -= cblack[c0]; val0 *= scale_mul[c0]; - image[row * width + col][c0] = rtengine::CLIP(val0); + image[row * width + col][c0] = rtengine::CLIP (val0); } } - } else if(ri->isXtrans()) { + } else if (ri->isXtrans()) { const int height = ri->get_iheight(); const int width = ri->get_iwidth(); unsigned c[6]; - for(int row = 0; row < height; ++row) { - for(int i = 0; i < 6; ++i) { - c[i] = ri->XTRANSFC(row,i); + + for (int row = 0; row < height; ++row) { + for (int i = 0; i < 6; ++i) { + c[i] = ri->XTRANSFC (row, i); } int col = 0; - for(; col < width - 5; col += 6) { - for(int i = 0; i < 6; ++i) { + + for (; col < width - 5; col += 6) { + for (int i = 0; i < 6; ++i) { const unsigned ccol = c[i]; float val = image[row * width + col + i][ccol]; val -= cblack[ccol]; val *= scale_mul[ccol]; - image[row * width + col + i][ccol] = rtengine::CLIP(val); + image[row * width + col + i][ccol] = rtengine::CLIP (val); } } - for(; col < width; ++col) { // remaining columns - const unsigned ccol = ri->XTRANSFC(row,col); + + for (; col < width; ++col) { // remaining columns + const unsigned ccol = ri->XTRANSFC (row, col); float val = image[row * width + col][ccol]; val -= cblack[ccol]; val *= scale_mul[ccol]; - image[row * width + col][ccol] = rtengine::CLIP(val); + image[row * width + col][ccol] = rtengine::CLIP (val); } } } else { const int size = ri->get_iheight() * ri->get_iwidth(); + for (int i = 0; i < size; ++i) { for (int j = 0; j < 4; ++j) { float val = image[i][j]; val -= cblack[j]; val *= scale_mul[j]; - image[i][j] = rtengine::CLIP(val); + image[i][j] = rtengine::CLIP (val); } } } @@ -137,7 +145,7 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, StdImageSource imgSrc; - if (imgSrc.load(fname)) { + if (imgSrc.load (fname)) { return nullptr; } @@ -157,7 +165,7 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, tpp->defGain = 1.0; tpp->gammaCorrected = false; tpp->isRaw = 0; - memset (tpp->colorMatrix, 0, sizeof(tpp->colorMatrix)); + memset (tpp->colorMatrix, 0, sizeof (tpp->colorMatrix)); tpp->colorMatrix[0][0] = 1.0; tpp->colorMatrix[1][1] = 1.0; tpp->colorMatrix[2][2] = 1.0; @@ -187,21 +195,21 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, // we want an Image8 if (img->getType() == rtengine::sImage8) { // copy the image - Image8 *srcImg = static_cast(img); + Image8 *srcImg = static_cast (img); Image8 *thImg = new Image8 (w, h); - srcImg->copyData(thImg); + srcImg->copyData (thImg); tpp->thumbImg = thImg; } else { // copy the image with a conversion - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, img); + tpp->thumbImg = resizeTo (w, h, TI_Bilinear, img); } } else { // we want the same image type than the source file - tpp->thumbImg = resizeToSameType(w, h, TI_Bilinear, img); + tpp->thumbImg = resizeToSameType (w, h, TI_Bilinear, img); // histogram computation tpp->aeHistCompression = 3; - tpp->aeHistogram(65536 >> tpp->aeHistCompression); + tpp->aeHistogram (65536 >> tpp->aeHistCompression); double avg_r = 0; double avg_g = 0; @@ -209,24 +217,24 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, int n = 0; if (img->getType() == rtengine::sImage8) { - Image8 *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Image8 *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else if (img->getType() == sImage16) { - Image16 *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Image16 *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else if (img->getType() == sImagefloat) { - Imagefloat *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Imagefloat *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else { - printf("loadFromImage: Unsupported image type \"%s\"!\n", img->getType()); + printf ("loadFromImage: Unsupported image type \"%s\"!\n", img->getType()); } if (n > 0) { ColorTemp cTemp; - tpp->redAWBMul = avg_r / double(n); - tpp->greenAWBMul = avg_g / double(n); - tpp->blueAWBMul = avg_b / double(n); + tpp->redAWBMul = avg_r / double (n); + tpp->greenAWBMul = avg_g / double (n); + tpp->blueAWBMul = avg_b / double (n); tpp->wbEqual = wbEq; tpp->wbTempBias = 0.0; @@ -241,11 +249,11 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, bool rotate, bool inspectorMode) { - RawImage *ri = new RawImage(fname); + RawImage *ri = new RawImage (fname); unsigned int imageNum = 0; - int r = ri->loadRaw(false, imageNum, false); + int r = ri->loadRaw (false, imageNum, false); - if( r ) { + if ( r ) { delete ri; return nullptr; } @@ -257,25 +265,25 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL Image8* img = new Image8 (); // No sample format detection occurred earlier, so we set them here, // as they are mandatory for the setScanline method - img->setSampleFormat(IIOSF_UNSIGNED_CHAR); - img->setSampleArrangement(IIOSA_CHUNKY); + img->setSampleFormat (IIOSF_UNSIGNED_CHAR); + img->setSampleArrangement (IIOSA_CHUNKY); int err = 1; // See if it is something we support - if (checkRawImageThumb(*ri)) { - const char* data((const char*)fdata(ri->get_thumbOffset(), ri->get_file())); + if (checkRawImageThumb (*ri)) { + const char* data ((const char*)fdata (ri->get_thumbOffset(), ri->get_file())); if ( (unsigned char)data[1] == 0xd8 ) { - err = img->loadJPEGFromMemory(data, ri->get_thumbLength()); + err = img->loadJPEGFromMemory (data, ri->get_thumbLength()); } else if (ri->is_ppmThumb()) { - err = img->loadPPMFromMemory(data, ri->get_thumbWidth(), ri->get_thumbHeight(), ri->get_thumbSwap(), ri->get_thumbBPS()); + err = img->loadPPMFromMemory (data, ri->get_thumbWidth(), ri->get_thumbHeight(), ri->get_thumbSwap(), ri->get_thumbBPS()); } } // did we succeed? if ( err ) { - printf("Could not extract thumb from %s\n", fname.data()); + printf ("Could not extract thumb from %s\n", fname.data()); delete img; delete ri; return nullptr; @@ -284,7 +292,7 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL Thumbnail* tpp = new Thumbnail (); tpp->isRaw = 1; - memset (tpp->colorMatrix, 0, sizeof(tpp->colorMatrix)); + memset (tpp->colorMatrix, 0, sizeof (tpp->colorMatrix)); tpp->colorMatrix[0][0] = 1.0; tpp->colorMatrix[1][1] = 1.0; tpp->colorMatrix[2][2] = 1.0; @@ -312,21 +320,21 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL if (inspectorMode) { tpp->thumbImg = img; } else { - tpp->thumbImg = resizeTo(w, h, TI_Nearest, img); + tpp->thumbImg = resizeTo (w, h, TI_Nearest, img); delete img; } if (rotate && ri->get_rotateDegree() > 0) { std::string fname = ri->get_filename(); - std::string suffix = fname.length() > 4 ? fname.substr(fname.length() - 3) : ""; + std::string suffix = fname.length() > 4 ? fname.substr (fname.length() - 3) : ""; for (unsigned int i = 0; i < suffix.length(); i++) { - suffix[i] = std::tolower(suffix[i]); + suffix[i] = std::tolower (suffix[i]); } // Leaf .mos, Mamiya .mef and Phase One .iiq files have thumbnails already rotated. if (suffix != "mos" && suffix != "mef" && suffix != "iiq") { - tpp->thumbImg->rotate(ri->get_rotateDegree()); + tpp->thumbImg->rotate (ri->get_rotateDegree()); // width/height may have changed after rotating w = tpp->thumbImg->getWidth(); h = tpp->thumbImg->getHeight(); @@ -356,12 +364,12 @@ RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname) rml.ciffBase = -1; rml.ciffLength = -1; - RawImage ri(fname); + RawImage ri (fname); unsigned int imageNum = 0; - int r = ri.loadRaw(false, imageNum); + int r = ri.loadRaw (false, imageNum); - if( !r ) { + if ( !r ) { rml.exifBase = ri.get_exifBase(); rml.ciffBase = ri.get_ciffBase(); rml.ciffLength = ri.get_ciffLen(); @@ -375,9 +383,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati RawImage *ri = new RawImage (fname); unsigned int tempImageNum = 0; - int r = ri->loadRaw(1, tempImageNum, 0); + int r = ri->loadRaw (1, tempImageNum, 0); - if( r ) { + if ( r ) { delete ri; return nullptr; } @@ -392,18 +400,18 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati tpp->embProfileLength = ri->get_profileLen(); if (ri->get_profileLen()) - tpp->embProfile = cmsOpenProfileFromMem(ri->get_profile(), - ri->get_profileLen()); //\ TODO check if mutex is needed + tpp->embProfile = cmsOpenProfileFromMem (ri->get_profile(), + ri->get_profileLen()); //\ TODO check if mutex is needed - tpp->redMultiplier = ri->get_pre_mul(0); - tpp->greenMultiplier = ri->get_pre_mul(1); - tpp->blueMultiplier = ri->get_pre_mul(2); + tpp->redMultiplier = ri->get_pre_mul (0); + tpp->greenMultiplier = ri->get_pre_mul (1); + tpp->blueMultiplier = ri->get_pre_mul (2); //ri->scale_colors(); float pre_mul[4], scale_mul[4], cblack[4]; - ri->get_colorsCoeff(pre_mul, scale_mul, cblack, false); - scale_colors(ri, scale_mul, cblack); - + ri->get_colorsCoeff (pre_mul, scale_mul, cblack, false); + scale_colors (ri, scale_mul, cblack); + ri->pre_interpolate(); rml.exifBase = ri->get_exifBase(); @@ -414,7 +422,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati tpp->camwbGreen = tpp->greenMultiplier / pre_mul[1]; //ri->get_pre_mul(1); tpp->camwbBlue = tpp->blueMultiplier / pre_mul[2]; //ri->get_pre_mul(2); //tpp->defGain = 1.0 / min(ri->get_pre_mul(0), ri->get_pre_mul(1), ri->get_pre_mul(2)); - tpp->defGain = max(scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min(scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]); + tpp->defGain = max (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]); tpp->gammaCorrected = true; @@ -422,8 +430,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int firstgreen = 1; // locate first green location in the first row - if(ri->getSensorType() == ST_BAYER) - while (!FISGREEN(filter, 1, firstgreen) && firstgreen < 3) { + if (ri->getSensorType() == ST_BAYER) + while (!FISGREEN (filter, 1, firstgreen) && firstgreen < 3) { firstgreen++; } @@ -431,9 +439,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { if (fixwh == 1) { // fix height, scale width - skip = ((ri->get_height() - ri->get_FujiWidth()) / sqrt(0.5) - firstgreen - 1) / h; + skip = ((ri->get_height() - ri->get_FujiWidth()) / sqrt (0.5) - firstgreen - 1) / h; } else { - skip = (ri->get_FujiWidth() / sqrt(0.5) - firstgreen - 1) / w; + skip = (ri->get_FujiWidth() / sqrt (0.5) - firstgreen - 1) / w; } } else { if (fixwh == 1) { // fix height, scale width @@ -453,7 +461,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int hskip = skip, vskip = skip; - if (!ri->get_model().compare("D1X")) { + if (!ri->get_model().compare ("D1X")) { hskip *= 2; } @@ -463,7 +471,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati DCraw::dcrawImage_t image = ri->get_image(); - Imagefloat* tmpImg = new Imagefloat(tmpw, tmph); + Imagefloat* tmpImg = new Imagefloat (tmpw, tmph); if (ri->getSensorType() == ST_BAYER) { // demosaicing! (sort of) @@ -475,7 +483,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int g = image[ofs][1]; int r, b; - if (FISRED(filter, row, col + 1)) { + if (FISRED (filter, row, col + 1)) { r = (image[ofs + 1 ][0] + image[ofs - 1 ][0]) >> 1; b = (image[ofs + width][2] + image[ofs - width][2]) >> 1; } else { @@ -483,9 +491,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati r = (image[ofs + width][0] + image[ofs - width][0]) >> 1; } - tmpImg->r(y, x) = r; - tmpImg->g(y, x) = g; - tmpImg->b(y, x) = b; + tmpImg->r (y, x) = r; + tmpImg->g (y, x) = g; + tmpImg->b (y, x) = b; } } } else if (ri->get_colors() == 1) { @@ -495,45 +503,45 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati for (int col = firstgreen, x = 0; col < width - 1 && x < tmpw; col += hskip, x++) { int ofs = rofs + col; - tmpImg->r(y, x) = tmpImg->g(y, x) = tmpImg->b(y, x) = image[ofs][0]; + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = image[ofs][0]; } } } else { - if(ri->getSensorType() == ST_FUJI_XTRANS) { - for( int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) { + if (ri->getSensorType() == ST_FUJI_XTRANS) { + for ( int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) { rofs = row * width; - for( int col = 1, x = 0; col < width - 1 && x < tmpw; col += hskip, x++ ) { + for ( int col = 1, x = 0; col < width - 1 && x < tmpw; col += hskip, x++ ) { int ofs = rofs + col; float sum[3] = {}; int c; - for(int v = -1; v <= 1; v++) { - for(int h = -1; h <= 1; h++) { - c = ri->XTRANSFC(row + v, col + h); + for (int v = -1; v <= 1; v++) { + for (int h = -1; h <= 1; h++) { + c = ri->XTRANSFC (row + v, col + h); sum[c] += image[ofs + v * width + h][c]; } } - c = ri->XTRANSFC(row, col); + c = ri->XTRANSFC (row, col); switch (c) { case 0: - tmpImg->r(y, x) = image[ofs][0]; - tmpImg->g(y, x) = sum[1] / 5.f; - tmpImg->b(y, x) = sum[2] / 3.f; + tmpImg->r (y, x) = image[ofs][0]; + tmpImg->g (y, x) = sum[1] / 5.f; + tmpImg->b (y, x) = sum[2] / 3.f; break; case 1: - tmpImg->r(y, x) = sum[0] / 2.f; - tmpImg->g(y, x) = image[ofs][1]; - tmpImg->b(y, x) = sum[2] / 2.f; + tmpImg->r (y, x) = sum[0] / 2.f; + tmpImg->g (y, x) = image[ofs][1]; + tmpImg->b (y, x) = sum[2] / 2.f; break; case 2: - tmpImg->r(y, x) = sum[0] / 3.f; - tmpImg->g(y, x) = sum[1] / 5.f; - tmpImg->b(y, x) = image[ofs][2]; + tmpImg->r (y, x) = sum[0] / 3.f; + tmpImg->g (y, x) = sum[1] / 5.f; + tmpImg->b (y, x) = image[ofs][2]; break; } } @@ -546,29 +554,34 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int top_margin = ri->get_topmargin(); int wmax = tmpw; int hmax = tmph; - if(ri->get_maker() == "Sigma" && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing + + if (ri->get_maker() == "Sigma" && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing wmax = (width - 2 - left_margin) / hskip; hmax = (height - 2 - top_margin) / vskip; } int y = 0; + for (int row = 1 + top_margin; row < iheight + top_margin - 1 && y < hmax; row += vskip, y++) { rofs = row * iwidth; int x = 0; + for (int col = firstgreen; col < iwidth + left_margin - 1 && x < wmax; col += hskip, x++) { int ofs = rofs + col; - tmpImg->r(y, x) = image[ofs][0]; - tmpImg->g(y, x) = image[ofs][1]; - tmpImg->b(y, x) = image[ofs][2]; + tmpImg->r (y, x) = image[ofs][0]; + tmpImg->g (y, x) = image[ofs][1]; + tmpImg->b (y, x) = image[ofs][2]; } + for (; x < tmpw; ++x) { - tmpImg->r(y, x) = tmpImg->g(y, x) = tmpImg->b(y, x) = 0; + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = 0; } } + for (; y < tmph; ++y) { for (int x = 0; x < tmpw; ++x) { - tmpImg->r(y, x) = tmpImg->g(y, x) = tmpImg->b(y, x) = 0; + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = 0; } } } @@ -576,10 +589,10 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth() / hskip; - double step = sqrt(0.5); + double step = sqrt (0.5); int wide = fw / step; int high = (tmph - fw) / step; - Imagefloat* fImg = new Imagefloat(wide, high); + Imagefloat* fImg = new Imagefloat (wide, high); float r, c; for (int row = 0; row < high; row++) @@ -593,9 +606,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double fr = r - ur; double fc = c - uc; - fImg->r(row, col) = (tmpImg->r(ur, uc) * (1 - fc) + tmpImg->r(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->r(ur + 1, uc) * (1 - fc) + tmpImg->r(ur + 1, uc + 1) * fc) * fr; - fImg->g(row, col) = (tmpImg->g(ur, uc) * (1 - fc) + tmpImg->g(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->g(ur + 1, uc) * (1 - fc) + tmpImg->g(ur + 1, uc + 1) * fc) * fr; - fImg->b(row, col) = (tmpImg->b(ur, uc) * (1 - fc) + tmpImg->b(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->b(ur + 1, uc) * (1 - fc) + tmpImg->b(ur + 1, uc + 1) * fc) * fr; + fImg->r (row, col) = (tmpImg->r (ur, uc) * (1 - fc) + tmpImg->r (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->r (ur + 1, uc) * (1 - fc) + tmpImg->r (ur + 1, uc + 1) * fc) * fr; + fImg->g (row, col) = (tmpImg->g (ur, uc) * (1 - fc) + tmpImg->g (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->g (ur + 1, uc) * (1 - fc) + tmpImg->g (ur + 1, uc + 1) * fc) * fr; + fImg->b (row, col) = (tmpImg->b (ur, uc) * (1 - fc) + tmpImg->b (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->b (ur + 1, uc) * (1 - fc) + tmpImg->b (ur + 1, uc + 1) * fc) * fr; } delete tmpImg; @@ -612,7 +625,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati ); if (rotate_90) { - std::swap(tmpw, tmph); + std::swap (tmpw, tmph); } if (fixwh == 1) { // fix height, scale width @@ -626,10 +639,11 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati } if (rotate_90) { - tpp->thumbImg = resizeTo(h, w, TI_Bilinear, tmpImg); + tpp->thumbImg = resizeTo (h, w, TI_Bilinear, tmpImg); } else { - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, tmpImg); + tpp->thumbImg = resizeTo (w, h, TI_Bilinear, tmpImg); } + delete tmpImg; @@ -641,7 +655,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati // generate histogram for auto exposure tpp->aeHistCompression = 3; - tpp->aeHistogram(65536 >> tpp->aeHistCompression); + tpp->aeHistogram (65536 >> tpp->aeHistCompression); tpp->aeHistogram.clear(); int radd = 4; int gadd = 4; @@ -656,8 +670,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth(); - start = ABS(fw - i) + 8; - end = min(height + width - fw - i, fw + i) - 8; + start = ABS (fw - i) + 8; + end = min (height + width - fw - i, fw + i) - 8; } else { start = 8; end = width - 8; @@ -665,33 +679,33 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_colors() == 1) { for (int j = start; j < end; j++) { - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += gadd; - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += badd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += gadd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += badd; } - } else if(ri->getSensorType() == ST_BAYER) { + } else if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) - if (FISGREEN(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - } else if (FISRED(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - } else if (FISBLUE(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; + if (FISGREEN (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + } else if (FISRED (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + } else if (FISBLUE (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; } - } else if(ri->getSensorType() == ST_FUJI_XTRANS) { + } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) - if (ri->ISXTRANSGREEN(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - } else if (ri->ISXTRANSRED(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - } else if (ri->ISXTRANSBLUE(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; + if (ri->ISXTRANSGREEN (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + } else if (ri->ISXTRANSRED (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + } else if (ri->ISXTRANSBLUE (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; } } else { /* if(ri->getSensorType()==ST_FOVEON) */ for (int j = start; j < end; j++) { - tpp->aeHistogram[((int)(image[i * width + j][0] * 2.f)) >> tpp->aeHistCompression] += radd; - tpp->aeHistogram[((int)(image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - tpp->aeHistogram[((int)(image[i * width + j][2] * 0.5f)) >> tpp->aeHistCompression] += badd; + tpp->aeHistogram[ ((int) (image[i * width + j][0] * 2.f)) >> tpp->aeHistCompression] += radd; + tpp->aeHistogram[ ((int) (image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + tpp->aeHistogram[ ((int) (image[i * width + j][2] * 0.5f)) >> tpp->aeHistCompression] += badd; } } } @@ -709,14 +723,14 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth(); - start = ABS(fw - i) + 32; - end = min(height + width - fw - i, fw + i) - 32; + start = ABS (fw - i) + 32; + end = min (height + width - fw - i, fw + i) - 32; } else { start = 32; end = width - 32; } - if(ri->getSensorType() == ST_BAYER) { + if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) { if (!filter) { double d = tpp->defGain * image[i * width + j][0]; @@ -731,7 +745,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati rn++; gn++; bn++; - } else if (FISGREEN(filter, i, j)) { + } else if (FISGREEN (filter, i, j)) { double d = tpp->defGain * image[i * width + j][1]; if (d > 64000.) { @@ -740,7 +754,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_g += d; gn++; - } else if (FISRED(filter, i, j)) { + } else if (FISRED (filter, i, j)) { double d = tpp->defGain * image[i * width + j][0]; if (d > 64000.) { @@ -749,7 +763,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_r += d; rn++; - } else if (FISBLUE(filter, i, j)) { + } else if (FISBLUE (filter, i, j)) { double d = tpp->defGain * image[i * width + j][2]; if (d > 64000.) { @@ -760,9 +774,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati bn++; } } - } else if(ri->getSensorType() == ST_FUJI_XTRANS) { + } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) { - if (ri->ISXTRANSGREEN(i, j)) { + if (ri->ISXTRANSGREEN (i, j)) { double d = tpp->defGain * image[i * width + j][1]; if (d > 64000.) { @@ -771,7 +785,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_g += d; gn++; - } else if (ri->ISXTRANSRED(i, j)) { + } else if (ri->ISXTRANSRED (i, j)) { double d = tpp->defGain * image[i * width + j][0]; if (d > 64000.) { @@ -780,7 +794,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_r += d; rn++; - } else if (ri->ISXTRANSBLUE(i, j)) { + } else if (ri->ISXTRANSBLUE (i, j)) { double d = tpp->defGain * image[i * width + j][2]; if (d > 64000.) { @@ -821,22 +835,22 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double greens = avg_g / gn * tpp->camwbGreen; double blues = avg_b / bn * 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; - tpp->blueAWBMul = ri->get_rgb_cam(2, 0) * reds + ri->get_rgb_cam(2, 1) * greens + ri->get_rgb_cam(2, 2) * blues; + 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; + tpp->blueAWBMul = ri->get_rgb_cam (2, 0) * reds + ri->get_rgb_cam (2, 1) * greens + ri->get_rgb_cam (2, 2) * blues; tpp->wbEqual = wbEq; tpp->wbTempBias = 0.0; ColorTemp cTemp; - cTemp.mul2temp(tpp->redAWBMul, tpp->greenAWBMul, tpp->blueAWBMul, tpp->wbEqual, tpp->autoWBTemp, tpp->autoWBGreen); + cTemp.mul2temp (tpp->redAWBMul, tpp->greenAWBMul, tpp->blueAWBMul, tpp->wbEqual, tpp->autoWBTemp, tpp->autoWBGreen); if (rotate && ri->get_rotateDegree() > 0) { - tpp->thumbImg->rotate(ri->get_rotateDegree()); + tpp->thumbImg->rotate (ri->get_rotateDegree()); } for (int a = 0; a < 3; a++) for (int b = 0; b < 3; b++) { - tpp->colorMatrix[a][b] = ri->get_rgb_cam(a, b); + tpp->colorMatrix[a][b] = ri->get_rgb_cam (a, b); } tpp->init(); @@ -851,7 +865,7 @@ void Thumbnail::init () { RawImageSource::inverse33 (colorMatrix, iColorMatrix); //colorMatrix is rgb_cam - memset (cam2xyz, 0, sizeof(cam2xyz)); + memset (cam2xyz, 0, sizeof (cam2xyz)); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) @@ -863,33 +877,33 @@ void Thumbnail::init () } Thumbnail::Thumbnail () : - camProfile(nullptr), + camProfile (nullptr), iColorMatrix{}, cam2xyz{}, - thumbImg(nullptr), - camwbRed(1.0), - camwbGreen(1.0), - camwbBlue(1.0), - redAWBMul(-1.0), - greenAWBMul(-1.0), - blueAWBMul(-1.0), - autoWBTemp(2700), - autoWBGreen(1.0), - wbEqual(-1.0), - wbTempBias(0.0), - aeHistCompression(3), - embProfileLength(0), - embProfileData(nullptr), - embProfile(nullptr), - redMultiplier(1.0), - greenMultiplier(1.0), - blueMultiplier(1.0), - scale(1.0), - defGain(1.0), - scaleForSave(8192), - gammaCorrected(false), + thumbImg (nullptr), + camwbRed (1.0), + camwbGreen (1.0), + camwbBlue (1.0), + redAWBMul (-1.0), + greenAWBMul (-1.0), + blueAWBMul (-1.0), + autoWBTemp (2700), + autoWBGreen (1.0), + wbEqual (-1.0), + wbTempBias (0.0), + aeHistCompression (3), + embProfileLength (0), + embProfileData (nullptr), + embProfile (nullptr), + redMultiplier (1.0), + greenMultiplier (1.0), + blueMultiplier (1.0), + scale (1.0), + defGain (1.0), + scaleForSave (8192), + gammaCorrected (false), colorMatrix{}, - isRaw(true) + isRaw (true) { } @@ -901,11 +915,11 @@ Thumbnail::~Thumbnail () delete [] embProfileData; if (embProfile) { - cmsCloseProfile(embProfile); + cmsCloseProfile (embProfile); } if (camProfile) { - cmsCloseProfile(camProfile); + cmsCloseProfile (camProfile); } } @@ -922,7 +936,7 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int rwidth = thumbImg->getWidth() * rheight / thumbImg->getHeight(); } - Image8* baseImg = resizeTo(rwidth, rheight, interp, thumbImg); + Image8* baseImg = resizeTo (rwidth, rheight, interp, thumbImg); if (params.coarse.rotate) { baseImg->rotate (params.coarse.rotate); @@ -995,13 +1009,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { rwidth = rheight; - rheight = int(size_t(thumbImg->getHeight()) * size_t(rwidth) / size_t(thumbImg->getWidth())); + rheight = int (size_t (thumbImg->getHeight()) * size_t (rwidth) / size_t (thumbImg->getWidth())); } else { - rwidth = int(size_t(thumbImg->getWidth()) * size_t(rheight) / size_t(thumbImg->getHeight())); + rwidth = int (size_t (thumbImg->getWidth()) * size_t (rheight) / size_t (thumbImg->getHeight())); } - Imagefloat* baseImg = resizeTo(rwidth, rheight, interp, thumbImg); + Imagefloat* baseImg = resizeTo (rwidth, rheight, interp, thumbImg); if (params.coarse.rotate) { baseImg->rotate (params.coarse.rotate); @@ -1025,12 +1039,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei #endif for (int j = 0; j < rwidth; j++) { - float red = baseImg->r(i, j) * rmi; - baseImg->r(i, j) = CLIP(red); - float green = baseImg->g(i, j) * gmi; - baseImg->g(i, j) = CLIP(green); - float blue = baseImg->b(i, j) * bmi; - baseImg->b(i, j) = CLIP(blue); + float red = baseImg->r (i, j) * rmi; + baseImg->r (i, j) = CLIP (red); + float green = baseImg->g (i, j) * gmi; + baseImg->g (i, j) = CLIP (green); + float blue = baseImg->b (i, j) * bmi; + baseImg->b (i, j) = CLIP (blue); } } @@ -1051,7 +1065,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei //ColorTemp::CAT02 (baseImg, ¶ms) ;//perhaps not good! ImProcFunctions ipf (¶ms, false); - ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); + ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), options.rtSettings.monitorIntent, false, false); LUTu hist16 (65536); @@ -1064,7 +1078,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei int origFW; int origFH; double tscale = 0.0; - getDimensions(origFW, origFH, tscale); + getDimensions (origFW, origFH, tscale); ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, fnumber, 0, true); // Raw rotate degree not detectable here delete baseImg; baseImg = trImg; @@ -1075,7 +1089,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (params.sh.enabled) { shmap = new SHMap (fw, fh, false); - double radius = sqrt (double(fw * fw + fh * fh)) / 2.0; + double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { @@ -1104,7 +1118,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei LUTf satcurve (65536); LUTf lhskcurve (65536); - LUTf lumacurve(32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + LUTf lumacurve (32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation LUTf clcurve (65536); LUTf clToningcurve; LUTf cl2Toningcurve; @@ -1134,7 +1148,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei bool opautili = false; - if(params.colorToning.enabled) { + if (params.colorToning.enabled) { TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, @@ -1147,36 +1161,36 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); clToningcurve (65536); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); cl2Toningcurve (65536); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); } - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 16); } double rrm, ggm, bbm; float autor, autog, autob; - float satLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - float satLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + float satLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + float satLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation //printf("moy=%f ET=%f\n", moyS,eqty); float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -1193,15 +1207,15 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (isRaw) { cmsHPROFILE dummy; - RawImageSource::findInputProfile(params.icm.input, nullptr, camName, &dcpProf, dummy); + RawImageSource::findInputProfile (params.icm.input, nullptr, camName, &dcpProf, dummy); if (dcpProf) { - dcpProf->setStep2ApplyState(params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as); + dcpProf->setStep2ApplyState (params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as); } } LUTu histToneCurve; - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); // freeing up some memory customToneCurve1.Reset(); @@ -1216,12 +1230,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei } // luminance histogram update - if(params.labCurve.contrast != 0) { + if (params.labCurve.contrast != 0) { hist16.clear(); for (int i = 0; i < fh; i++) for (int j = 0; j < fw; j++) { - hist16[(int)((labView->L[i][j]))]++; + hist16[ (int) ((labView->L[i][j]))]++; } } @@ -1233,7 +1247,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei hist16, lumacurve, dummy, 16, utili); bool clcutili; - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, 16); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, 16); bool autili, butili, ccutili, cclutili; CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, @@ -1241,13 +1255,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); - ipf.vibrance(labView); + ipf.vibrance (labView); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) { - ipf.EPDToneMap(labView, 5, 6); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) { + ipf.EPDToneMap (labView, 5, 6); } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { CurveFactory::curveLightBrightColor ( params.colorappearance.curve, params.colorappearance.curve2, @@ -1265,13 +1279,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei float fiso = iso;// ISO float fspeed = shutter;//speed char * writ = new char[expcomp_.size() + 1];//convert expcomp_ to char - std::copy(expcomp_.begin(), expcomp_.end(), writ); + std::copy (expcomp_.begin(), expcomp_.end(), writ); writ[expcomp_.size()] = '\0'; - float fcomp = atof(writ); //compensation + - + float fcomp = atof (writ); //compensation + - delete[] writ; float adap; - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) //if no exif data or wrong { adap = 2000.f; @@ -1280,9 +1294,9 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei float expo2 = params.toneCurve.expcomp; // exposure compensation in tonecurve ==> direct EV E_V += expo2; float expo1;//exposure raw white point - expo1 = log2(params.raw.expos); //log2 ==>linear to EV + expo1 = log2 (params.raw.expos); //log2 ==>linear to EV E_V += expo1; - adap = powf(2.f, E_V - 3.f); //cd / m2 + adap = powf (2.f, E_V - 3.f); //cd / m2 //end calculation adaptation scene luminosity } @@ -1343,12 +1357,12 @@ int Thumbnail::getImageWidth (const procparams::ProcParams& params, int rheight, int rwidth; if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { - ratio = (float)(thumbImg->getHeight()) / (float)(thumbImg->getWidth()); + ratio = (float) (thumbImg->getHeight()) / (float) (thumbImg->getWidth()); } else { - ratio = (float)(thumbImg->getWidth()) / (float)(thumbImg->getHeight()); + ratio = (float) (thumbImg->getWidth()) / (float) (thumbImg->getHeight()); } - rwidth = (int)(ratio * (float)rheight); + rwidth = (int) (ratio * (float)rheight); return rwidth; } @@ -1386,7 +1400,7 @@ void Thumbnail::getAutoWB (double& temp, double& green, double equal, double tem wbEqual = equal; wbTempBias = tempBias; // compute autoWBTemp and autoWBGreen - cTemp.mul2temp(redAWBMul, greenAWBMul, blueAWBMul, wbEqual, autoWBTemp, autoWBGreen); + cTemp.mul2temp (redAWBMul, greenAWBMul, blueAWBMul, wbEqual, autoWBTemp, autoWBGreen); autoWBTemp += autoWBTemp * tempBias; } @@ -1406,7 +1420,7 @@ void Thumbnail::applyAutoExp (procparams::ProcParams& params) if (params.toneCurve.autoexp && aeHistogram) { ImProcFunctions ipf (¶ms, false); - ipf.getAutoExp (aeHistogram, aeHistCompression, log(defGain) / log(2.0), params.toneCurve.clip, params.toneCurve.expcomp, + ipf.getAutoExp (aeHistogram, aeHistCompression, log (defGain) / log (2.0), params.toneCurve.clip, params.toneCurve.expcomp, params.toneCurve.brightness, params.toneCurve.contrast, params.toneCurve.black, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh); } } @@ -1430,11 +1444,11 @@ void Thumbnail::getSpotWB (const procparams::ProcParams& params, int xp, int yp, ImProcFunctions ipf (¶ms, false); ipf.transCoord (fw, fh, points, red, green, blue); - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); // calculate spot wb (copy & pasted from stdimagesource) double reds = 0, greens = 0, blues = 0; int rn = 0, gn = 0, bn = 0; - thumbImg->getSpotWBData(reds, greens, blues, rn, gn, bn, red, green, blue, tr); + thumbImg->getSpotWBData (reds, greens, blues, rn, gn, bn, red, green, blue, tr); reds = reds / rn * camwbRed; greens = greens / gn * camwbGreen; blues = blues / bn * camwbBlue; @@ -1508,19 +1522,19 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) // Calc the histogram unsigned int* hist16 = new unsigned int [65536]; - memset(hist16, 0, sizeof(int) * 65536); + memset (hist16, 0, sizeof (int) * 65536); if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Image8 *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Image16 *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Imagefloat *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else { - printf("getGrayscaleHistEQ #1: Unsupported image type \"%s\"!\n", thumbImg->getType()); + printf ("getGrayscaleHistEQ #1: Unsupported image type \"%s\"!\n", thumbImg->getType()); } // Go down till we cut off that many pixels @@ -1539,45 +1553,45 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) // Correction and gamma to 8 Bit if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); + Image8 *image = static_cast (thumbImg); for (int i = 0; i < thumbImg->getHeight(); i++) for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); + Image16 *image = static_cast (thumbImg); for (int i = 0; i < thumbImg->getHeight(); i++) for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); + Imagefloat *image = static_cast (thumbImg); for (int i = 0; i < thumbImg->getHeight(); i++) for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } @@ -1586,25 +1600,25 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) int max = 0; if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); + Image8 *image = static_cast (thumbImg); unsigned char max_ = 0; for (int row = 0; row < image->getHeight(); row++) for (int col = 0; col < image->getWidth(); col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1616,34 +1630,34 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) for (int i = 0; i < image->getHeight(); i++) for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); + Image16 *image = static_cast (thumbImg); unsigned short max_ = 0; for (int row = 0; row < image->getHeight(); row++) for (int col = 0; col < image->getWidth(); col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1655,34 +1669,34 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) for (int i = 0; i < image->getHeight(); i++) for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); + Imagefloat *image = static_cast (thumbImg); float max_ = 0.f; for (int row = 0; row < image->getHeight(); row++) for (int col = 0; col < image->getWidth(); col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1694,16 +1708,16 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) for (int i = 0; i < image->getHeight(); i++) for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else { - printf("getGrayscaleHistEQ #2: Unsupported image type \"%s\"!\n", thumbImg->getType()); + printf ("getGrayscaleHistEQ #2: Unsupported image type \"%s\"!\n", thumbImg->getType()); } } @@ -1750,22 +1764,22 @@ bool Thumbnail::writeImage (const Glib::ustring& fname, int format) return false; } - fwrite (thumbImg->getType(), sizeof (char), strlen(thumbImg->getType()), f); + fwrite (thumbImg->getType(), sizeof (char), strlen (thumbImg->getType()), f); fputc ('\n', f); - guint32 w = guint32(thumbImg->getWidth()); - guint32 h = guint32(thumbImg->getHeight()); + guint32 w = guint32 (thumbImg->getWidth()); + guint32 h = guint32 (thumbImg->getHeight()); fwrite (&w, sizeof (guint32), 1, f); fwrite (&h, sizeof (guint32), 1, f); if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); - image->writeData(f); + Image8 *image = static_cast (thumbImg); + image->writeData (f); } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); - image->writeData(f); + Image16 *image = static_cast (thumbImg); + image->writeData (f); } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); - image->writeData(f); + Imagefloat *image = static_cast (thumbImg); + image->writeData (f); } //thumbImg->writeData(f); @@ -1794,8 +1808,8 @@ bool Thumbnail::readImage (const Glib::ustring& fname) } char imgType[31]; // 30 -> arbitrary size, but should be enough for all image type's name - fgets(imgType, 30, f); - imgType[strlen(imgType) - 1] = '\0'; // imgType has a \n trailing character, so we overwrite it by the \0 char + fgets (imgType, 30, f); + imgType[strlen (imgType) - 1] = '\0'; // imgType has a \n trailing character, so we overwrite it by the \0 char guint32 width, height; fread (&width, 1, sizeof (guint32), f); @@ -1803,36 +1817,36 @@ bool Thumbnail::readImage (const Glib::ustring& fname) bool success = false; - if (!strcmp(imgType, sImage8)) { - Image8 *image = new Image8(width, height); - image->readData(f); + if (!strcmp (imgType, sImage8)) { + Image8 *image = new Image8 (width, height); + image->readData (f); thumbImg = image; success = true; - } else if (!strcmp(imgType, sImage16)) { - Image16 *image = new Image16(width, height); - image->readData(f); + } else if (!strcmp (imgType, sImage16)) { + Image16 *image = new Image16 (width, height); + image->readData (f); thumbImg = image; success = true; - } else if (!strcmp(imgType, sImagefloat)) { - Imagefloat *image = new Imagefloat(width, height); - image->readData(f); + } else if (!strcmp (imgType, sImagefloat)) { + Imagefloat *image = new Imagefloat (width, height); + image->readData (f); thumbImg = image; success = true; } else { - printf("readImage: Unsupported image type \"%s\"!\n", imgType); + printf ("readImage: Unsupported image type \"%s\"!\n", imgType); } - fclose(f); + fclose (f); return success; } bool Thumbnail::readData (const Glib::ustring& fname) { - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." Glib::KeyFile keyFile; try { - MyMutex::MyLock thmbLock(thumbMutex); + MyMutex::MyLock thmbLock (thumbMutex); try { keyFile.load_from_file (fname); @@ -1911,11 +1925,11 @@ bool Thumbnail::readData (const Glib::ustring& fname) return true; } catch (Glib::Error &err) { if (options.rtSettings.verbose) { - printf("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + printf ("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } } catch (...) { if (options.rtSettings.verbose) { - printf("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); + printf ("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } } @@ -1924,7 +1938,7 @@ bool Thumbnail::readData (const Glib::ustring& fname) bool Thumbnail::writeData (const Glib::ustring& fname) { - MyMutex::MyLock thmbLock(thumbMutex); + MyMutex::MyLock thmbLock (thumbMutex); Glib::ustring keyData; @@ -1957,11 +1971,11 @@ bool Thumbnail::writeData (const Glib::ustring& fname) } catch (Glib::Error& err) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + printf ("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } } catch (...) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); + printf ("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); } } @@ -1973,7 +1987,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname) if (!f) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); + printf ("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); } return false; @@ -1993,18 +2007,22 @@ bool Thumbnail::readEmbProfile (const Glib::ustring& fname) embProfileLength = 0; FILE* f = g_fopen (fname.c_str (), "rb"); + if (f) { - if(!fseek (f, 0, SEEK_END)) { + if (!fseek (f, 0, SEEK_END)) { int profileLength = ftell (f); - if(profileLength > 0) { + + if (profileLength > 0) { embProfileLength = profileLength; - if(!fseek (f, 0, SEEK_SET)) { + + if (!fseek (f, 0, SEEK_SET)) { embProfileData = new unsigned char[embProfileLength]; fread (embProfileData, 1, embProfileLength, f); embProfile = cmsOpenProfileFromMem (embProfileData, embProfileLength); } } } + fclose (f); return embProfile != nullptr; } @@ -2016,7 +2034,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname) { if (embProfileData) { - FILE* f = g_fopen(fname.c_str (), "wb"); + FILE* f = g_fopen (fname.c_str (), "wb"); if (f) { fwrite (embProfileData, 1, embProfileLength, f); @@ -2034,10 +2052,10 @@ bool Thumbnail::readAEHistogram (const Glib::ustring& fname) FILE* f = g_fopen (fname.c_str (), "rb"); if (!f) { - aeHistogram(0); + aeHistogram (0); } else { - aeHistogram(65536 >> aeHistCompression); - fread (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof(aeHistogram[0]), f); + aeHistogram (65536 >> aeHistCompression); + fread (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); fclose (f); return true; } @@ -2052,7 +2070,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname) FILE* f = g_fopen (fname.c_str (), "wb"); if (f) { - fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof(aeHistogram[0]), f); + fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); fclose (f); return true; } @@ -2064,7 +2082,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname) unsigned char* Thumbnail::getImage8Data() { if (thumbImg && thumbImg->getType() == rtengine::sImage8) { - Image8* img8 = static_cast(thumbImg); + Image8* img8 = static_cast (thumbImg); return img8->data; } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 9d5daa936..14ad333e4 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -35,32 +35,34 @@ namespace rtengine { extern const Settings* settings; -namespace { +namespace +{ template -void adjust_radius(const T &default_param, double scale_factor, T ¶m) +void adjust_radius (const T &default_param, double scale_factor, T ¶m) { const double delta = (param - default_param) * scale_factor; param = default_param + delta; } -class ImageProcessor { +class ImageProcessor +{ public: - ImageProcessor(ProcessingJob* pjob, int& errorCode, - ProgressListener* pl, bool tunnelMetaData, bool flush): - job(static_cast(pjob)), - errorCode(errorCode), - pl(pl), - tunnelMetaData(tunnelMetaData), - flush(flush), + ImageProcessor (ProcessingJob* pjob, int& errorCode, + ProgressListener* pl, bool tunnelMetaData, bool flush): + job (static_cast (pjob)), + errorCode (errorCode), + pl (pl), + tunnelMetaData (tunnelMetaData), + flush (flush), // internal state - ipf_p(nullptr), - ii(nullptr), - imgsrc(nullptr), - fw(-1), - fh(-1), - pp(0, 0, 0, 0, 0) + ipf_p (nullptr), + ii (nullptr), + imgsrc (nullptr), + fw (-1), + fh (-1), + pp (0, 0, 0, 0, 0) { } @@ -79,6 +81,7 @@ private: if (!stage_init()) { return nullptr; } + stage_denoise(); stage_transform(); return stage_finish(); @@ -95,6 +98,7 @@ private: if (!stage_init()) { return nullptr; } + stage_transform(); stage_early_resize(); stage_denoise(); @@ -126,7 +130,7 @@ private: // acquire image from imagesource imgsrc = ii->getImageSource (); - tr = getCoarseBitMask(params.coarse); + tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fw, fh, tr); // check the crop params @@ -161,18 +165,18 @@ private: // MyTime t1,t2; // t1.set(); - ipf_p.reset(new ImProcFunctions(¶ms, true)); - ImProcFunctions &ipf = *(ipf_p.get()); + ipf_p.reset (new ImProcFunctions (¶ms, true)); + ImProcFunctions &ipf = * (ipf_p.get()); - pp = PreviewProps(0, 0, fw, fh, 1); - imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum); - imgsrc->preprocess( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); + pp = PreviewProps (0, 0, fw, fh, 1); + imgsrc->setCurrentFrame (params.raw.bayersensor.imageNum); + imgsrc->preprocess ( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); if (params.toneCurve.autoexp) {// this enabled HLRecovery - LUTu histRedRaw(256), histGreenRaw(256), histBlueRaw(256); - imgsrc->getRAWHistogram(histRedRaw, histGreenRaw, histBlueRaw); + LUTu histRedRaw (256), histGreenRaw (256), histBlueRaw (256); + imgsrc->getRAWHistogram (histRedRaw, histGreenRaw, histBlueRaw); - if (ToneCurveParams::HLReconstructionNecessary(histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { + if (ToneCurveParams::HLReconstructionNecessary (histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { params.toneCurve.hrenabled = true; // WARNING: Highlight Reconstruction is being forced 'on', should we force a method here too? } @@ -182,13 +186,13 @@ private: pl->setProgress (0.20); } - imgsrc->demosaic( params.raw); + imgsrc->demosaic ( params.raw); if (pl) { pl->setProgress (0.30); } - if(params.retinex.enabled) { //enabled Retinex + if (params.retinex.enabled) { //enabled Retinex LUTf cdcurve (65536, 0); LUTf mapcurve (65536, 0); LUTu dummy; @@ -198,18 +202,18 @@ private: bool mapcontlutili = false; bool useHsl = false; // multi_array2D conversionBuffer(1, 1); - multi_array2D conversionBuffer(1, 1); - imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, dummy); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); + multi_array2D conversionBuffer (1, 1); + imgsrc->retinexPrepareBuffers (params.icm, params.retinex, conversionBuffer, dummy); + imgsrc->retinexPrepareCurves (params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); + imgsrc->retinex ( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); } if (pl) { pl->setProgress (0.40); } - imgsrc->HLRecovery_Global( params.toneCurve ); + imgsrc->HLRecovery_Global ( params.toneCurve ); if (pl) { @@ -223,21 +227,21 @@ private: currWB = imgsrc->getWB (); } else if (params.wb.method == "Auto") { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); - currWB.update(rm, gm, bm, params.wb.equal, params.wb.tempBias); + imgsrc->getAutoWBMultipliers (rm, gm, bm); + currWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); } calclum = nullptr ; - params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); + params.dirpyrDenoise.getCurves (noiseLCurve, noiseCCurve); autoNR = (float) settings->nrauto;// autoNRmax = (float) settings->nrautomax;// - if(settings->leveldnti == 0) { + if (settings->leveldnti == 0) { tilesize = 1024; overlap = 128; } - if(settings->leveldnti == 1) { + if (settings->leveldnti == 1) { tilesize = 768; overlap = 96; } @@ -248,7 +252,7 @@ private: ipf.Tile_calc (tilesize, overlap, 2, fw, fh, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); int nbtl = numtiles_W * numtiles_H; - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { nbtl = 9; } @@ -264,24 +268,24 @@ private: pcsk = new float [nbtl]; // printf("expert=%d\n",settings->leveldnautsimpl); - if(settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PON") { + if (settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PON") { MyTime t1pone, t2pone; t1pone.set(); int crW = 100; // settings->leveldnv == 0 int crH = 100; // settings->leveldnv == 0 - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; crH = 250; } - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; crH = tileHskip - 10; } @@ -289,7 +293,7 @@ private: float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } @@ -298,35 +302,35 @@ private: // Imagefloat *origCropPart;//init auto noise // origCropPart = new Imagefloat (crW, crH);//allocate memory if (params.dirpyrDenoise.enabled) {//evaluate Noise - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); -#pragma omp parallel + ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + #pragma omp parallel { Imagefloat *origCropPart;//init auto noise origCropPart = new Imagefloat (crW, crH);//allocate memory Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves int skipP = 1; -#pragma omp for schedule(dynamic) collapse(2) nowait + #pragma omp for schedule(dynamic) collapse(2) nowait - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { int beg_tileW = wcr * tileWskip + tileWskip / 2.f - crW / 2.f; int beg_tileH = hcr * tileHskip + tileHskip / 2.f - crH / 2.f; - PreviewProps ppP (beg_tileW , beg_tileH, crW, crH, skipP); + PreviewProps ppP (beg_tileW, beg_tileH, crW, crH, skipP); imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw ); //baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve); // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); } } - imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve + imgsrc->convertColorSpace (provicalc, params.icm, currWB); //for denoise luminance curve float maxr = 0.f; float maxb = 0.f; float pondcorrec = 1.0f; @@ -339,7 +343,7 @@ private: maxblueaut = 0.f; chromina = 0.f; sigma = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + ipf.RGB_denoise_info (origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); float multip = 1.f; float adjustr = 1.f; @@ -361,27 +365,27 @@ private: adjustr = 1.f / 1.2f; } - if(!imgsrc->isRAW()) { + if (!imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 } - float maxmax = max(maxredaut, maxblueaut); + float maxmax = max (maxredaut, maxblueaut); float delta; int mode = 2; int lissage = settings->leveldnliss; ipf.calcautodn_info (chaut, delta, Nb, levaut, maxmax, lumema, chromina, mode, lissage, redyel, skinc, nsknc); // printf("PROCESS cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f sigL=%f\n",chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema, sigma_L); - if(maxredaut > maxblueaut) { + if (maxredaut > maxblueaut) { maxr = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minblueaut <= minredaut && minblueaut < chaut) { + if (minblueaut <= minredaut && minblueaut < chaut) { maxb = (-chaut + minblueaut) / (autoNRmax * multip * adjustr * lowdenoise); } } else { maxb = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minredaut <= minblueaut && minredaut < chaut) { + if (minredaut <= minblueaut && minredaut < chaut) { maxr = (-chaut + minredaut) / (autoNRmax * multip * adjustr * lowdenoise); } }//maxb mxr - empirical evaluation red / blue @@ -404,45 +408,45 @@ private: int liss = settings->leveldnliss; //smooth result around mean - if(liss == 2 || liss == 3) { + if (liss == 2 || liss == 3) { // I smooth only mean and not delta (max) float nchm = 0.f; float koef = 0.4f; //between 0.1 to 0.9 - if(liss == 3) { + if (liss == 3) { koef = 0.0f; //quasi auto for mean Ch } - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { nchm += ch_M[hcr * numtiles_W + wcr]; } } nchm /= (numtiles_H * numtiles_W); - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { ch_M[hcr * numtiles_W + wcr] = nchm + (ch_M[hcr * numtiles_W + wcr] - nchm) * koef; } } } - if(liss == 3) { //same as auto but with much cells + if (liss == 3) { //same as auto but with much cells float MaxR = 0.f; float MaxB = 0.f; float MaxRMoy = 0.f; float MaxBMoy = 0.f; - for(int k = 0; k < nbtl; k++) { + for (int k = 0; k < nbtl; k++) { MaxBMoy += max_b[k]; MaxRMoy += max_r[k]; - if(max_r[k] > MaxR) { + if (max_r[k] > MaxR) { MaxR = max_r[k]; } - if(max_b[k] > MaxB) { + if (max_b[k] > MaxB) { MaxB = max_b[k]; } @@ -451,8 +455,8 @@ private: MaxBMoy /= nbtl; MaxRMoy /= nbtl; - for(int k = 0; k < nbtl; k++) { - if(MaxR > MaxB) { + for (int k = 0; k < nbtl; k++) { + if (MaxR > MaxB) { max_r[k] = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev //max_b[k]=MinB; max_b[k] = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; @@ -468,35 +472,35 @@ private: if (settings->verbose) { t2pone.set(); - printf("Info denoise ponderated performed in %d usec:\n", t2pone.etime(t1pone)); + printf ("Info denoise ponderated performed in %d usec:\n", t2pone.etime (t1pone)); } } } - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { MyTime t1aue, t2aue; t1aue.set(); int crW, crH; - if(settings->leveldnv == 0) { + if (settings->leveldnv == 0) { crW = 100; crH = 100; } - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; crH = 250; } - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; crH = tileHskip - 10; } @@ -504,14 +508,14 @@ private: float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } if (params.dirpyrDenoise.enabled) {//evaluate Noise - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); int Nb[9]; int coordW[3];//coordonate of part of image to mesure noise int coordH[3]; @@ -523,34 +527,34 @@ private: coordH[0] = begH; coordH[1] = fh / 2 - crH / 2; coordH[2] = fh - crH - begH; -#pragma omp parallel + #pragma omp parallel { Imagefloat *origCropPart;//init auto noise origCropPart = new Imagefloat (crW, crH);//allocate memory Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves -#pragma omp for schedule(dynamic) collapse(2) nowait + #pragma omp for schedule(dynamic) collapse(2) nowait - for(int wcr = 0; wcr <= 2; wcr++) { - for(int hcr = 0; hcr <= 2; hcr++) { - PreviewProps ppP (coordW[wcr] , coordH[hcr], crW, crH, 1); + for (int wcr = 0; wcr <= 2; wcr++) { + for (int hcr = 0; hcr <= 2; hcr++) { + PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1); imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw); //baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve); // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); } } - imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve + imgsrc->convertColorSpace (provicalc, params.icm, currWB); //for denoise luminance curve int nb = 0; float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + ipf.RGB_denoise_info (origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); Nb[hcr * 3 + wcr] = nb; ch_M[hcr * 3 + wcr] = chaut; max_r[hcr * 3 + wcr] = maxredaut; @@ -604,7 +608,7 @@ private: adjustr = 1.f / 1.2f; } - if(!imgsrc->isRAW()) { + if (!imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 } @@ -612,17 +616,17 @@ private: int mode = 1; int lissage = settings->leveldnliss; - for(int k = 0; k < 9; k++) { - float maxmax = max(max_r[k], max_b[k]); + for (int k = 0; k < 9; k++) { + float maxmax = max (max_r[k], max_b[k]); ipf.calcautodn_info (ch_M[k], delta[k], Nb[k], levaut, maxmax, lumL[k], chromC[k], mode, lissage, ry[k], sk[k], pcsk[k] ); // printf("ch_M=%f delta=%f\n",ch_M[k], delta[k]); } - for(int k = 0; k < 9; k++) { - if(max_r[k] > max_b[k]) { + for (int k = 0; k < 9; k++) { + if (max_r[k] > max_b[k]) { //printf("R delta=%f koef=%f\n",delta[k],autoNRmax*multip*adjustr*lowdenoise); Max_R[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - Min_B[k] = -(ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); + Min_B[k] = - (ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); Max_B[k] = 0.f; Min_R[k] = 0.f; } else { @@ -634,7 +638,7 @@ private: } } - for(int k = 0; k < 9; k++) { + for (int k = 0; k < 9; k++) { // printf("ch_M= %f Max_R=%f Max_B=%f min_r=%f min_b=%f\n",ch_M[k],Max_R[k], Max_B[k],Min_R[k], Min_B[k]); chM += ch_M[k]; MaxBMoy += Max_B[k]; @@ -642,19 +646,19 @@ private: MinRMoy += Min_R[k]; MinBMoy += Min_B[k]; - if(Max_R[k] > MaxR) { + if (Max_R[k] > MaxR) { MaxR = Max_R[k]; } - if(Max_B[k] > MaxB) { + if (Max_B[k] > MaxB) { MaxB = Max_B[k]; } - if(Min_R[k] < MinR) { + if (Min_R[k] < MinR) { MinR = Min_R[k]; } - if(Min_B[k] < MinB) { + if (Min_B[k] < MinB) { MinB = Min_B[k]; } @@ -666,7 +670,7 @@ private: MinBMoy /= 9; MinRMoy /= 9; - if(MaxR > MaxB) { + if (MaxR > MaxB) { maxr = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev // maxb=MinB; maxb = MinBMoy + (MinB - MinBMoy) * 0.66f; @@ -687,7 +691,7 @@ private: if (settings->verbose) { t2aue.set(); - printf("Info denoise auto performed in %d usec:\n", t2aue.etime(t1aue)); + printf ("Info denoise auto performed in %d usec:\n", t2aue.etime (t1aue)); } //end evaluate noise @@ -720,7 +724,7 @@ private: // at this stage, we can flush the raw data to free up quite an important amount of memory // commented out because it makes the application crash when batch processing... // TODO: find a better place to flush rawData and rawRGB - if(flush) { + if (flush) { imgsrc->flushRawData(); imgsrc->flushRGB(); } @@ -732,7 +736,7 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); // perform luma/chroma denoise // CieImage *cieView; @@ -744,30 +748,30 @@ private: DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; // make a copy because we cheat here - if(denoiseParams.Lmethod == "CUR") { - if(noiseLCurve) { + if (denoiseParams.Lmethod == "CUR") { + if (noiseLCurve) { denoiseParams.luma = 0.5f; } else { denoiseParams.luma = 0.0f; } - } else if(denoiseParams.Lmethod == "SLI") { + } else if (denoiseParams.Lmethod == "SLI") { noiseLCurve.Reset(); } if (denoiseParams.enabled && (noiseLCurve || noiseCCurve )) { // we only need image reduced to 1/4 here calclum = new Imagefloat ((fw + 1) / 2, (fh + 1) / 2); //for luminance denoise curve -#pragma omp parallel for + #pragma omp parallel for - for(int ii = 0; ii < fh; ii += 2) { - for(int jj = 0; jj < fw; jj += 2) { - calclum->r(ii >> 1, jj >> 1) = baseImg->r(ii, jj); - calclum->g(ii >> 1, jj >> 1) = baseImg->g(ii, jj); - calclum->b(ii >> 1, jj >> 1) = baseImg->b(ii, jj); + for (int ii = 0; ii < fh; ii += 2) { + for (int jj = 0; jj < fw; jj += 2) { + calclum->r (ii >> 1, jj >> 1) = baseImg->r (ii, jj); + calclum->g (ii >> 1, jj >> 1) = baseImg->g (ii, jj); + calclum->b (ii >> 1, jj >> 1) = baseImg->b (ii, jj); } } - imgsrc->convertColorSpace(calclum, params.icm, currWB); + imgsrc->convertColorSpace (calclum, params.icm, currWB); } if (denoiseParams.enabled) { @@ -776,7 +780,7 @@ private: // ipf.RGB_denoise(baseImg, baseImg, calclum, imgsrc->isRAW(), denoiseParams, params.defringe, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, lldenoiseutili); float chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi; int kall = 2; - ipf.RGB_denoise(kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); + ipf.RGB_denoise (kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); } @@ -797,9 +801,9 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); - imgsrc->convertColorSpace(baseImg, params.icm, currWB); + imgsrc->convertColorSpace (baseImg, params.icm, currWB); // perform first analysis hist16 (65536); @@ -822,15 +826,15 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); if (params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = baseImg->getWidth(); const int H = baseImg->getHeight(); - LabImage labcbdl(W, H); - ipf.rgb2lab(*baseImg, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + ipf.rgb2lab (*baseImg, labcbdl, params.icm.working); ipf.dirpyrequalizer (&labcbdl, 1); - ipf.lab2rgb(labcbdl, *baseImg, params.icm.working); + ipf.lab2rgb (labcbdl, *baseImg, params.icm.working); } // update blurmap @@ -838,7 +842,7 @@ private: if (params.sh.enabled) { shmap = new SHMap (fw, fh, true); - double radius = sqrt (double(fw * fw + fh * fh)) / 2.0; + double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { @@ -850,14 +854,14 @@ private: // RGB processing - curve1(65536); - curve2(65536); - curve(65536, 0); - satcurve(65536, 0); - lhskcurve(65536, 0); - lumacurve(32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation - clcurve(65536, 0); - wavclCurve(65536, 0); + curve1 (65536); + curve2 (65536); + curve (65536, 0); + satcurve (65536, 0); + lhskcurve (65536, 0); + lumacurve (32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + clcurve (65536, 0); + wavclCurve (65536, 0); //if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; @@ -871,7 +875,7 @@ private: bool opautili = false; - if(params.colorToning.enabled) { + if (params.colorToning.enabled) { TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, @@ -884,35 +888,35 @@ private: {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); clToningcurve (65536, 0); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, 1); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, 1); cl2Toningcurve (65536, 0); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, 1); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, 1); } labView = new LabImage (fw, fh); - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 1); } double rrm, ggm, bbm; float autor, autog, autob; - float satLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - float satLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + float satLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + float satLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -923,14 +927,14 @@ private: autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000) DCPProfile::ApplyState as; - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); + DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as); LUTu histToneCurve; - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); if (settings->verbose) { - printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); + printf ("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); } // if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS) @@ -967,25 +971,25 @@ private: // start tile processing...??? - if(params.labCurve.contrast != 0) { //only use hist16 for contrast + if (params.labCurve.contrast != 0) { //only use hist16 for contrast hist16.clear(); #ifdef _OPENMP -#pragma omp parallel + #pragma omp parallel #endif { LUTu hist16thr (hist16.getSize()); // one temporary lookup table per thread hist16thr.clear(); #ifdef _OPENMP -#pragma omp for schedule(static) nowait + #pragma omp for schedule(static) nowait #endif for (int i = 0; i < fh; i++) for (int j = 0; j < fw; j++) { - hist16thr[(int)((labView->L[i][j]))]++; + hist16thr[ (int) ((labView->L[i][j]))]++; } -#pragma omp critical + #pragma omp critical { hist16 += hist16thr; } @@ -996,7 +1000,7 @@ private: CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, hist16, lumacurve, dummy, 1, utili); bool clcutili; - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, 1); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, 1); bool ccutili, cclutili; CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, @@ -1004,34 +1008,34 @@ private: ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - ipf.EPDToneMap(labView, 5, 1); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + ipf.EPDToneMap (labView, 5, 1); } - ipf.vibrance(labView); + ipf.vibrance (labView); - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { ipf.impulsedenoise (labView); } // for all treatments Defringe, Sharpening, Contrast detail ,Microcontrast they are activated if "CIECAM" function are disabled - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { ipf.defringe (labView); } if (params.sharpenEdge.enabled) { - ipf.MLsharpen(labView); + ipf.MLsharpen (labView); } if (params.sharpenMicro.enabled) { - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { ipf.MLmicrocontrast (labView); //!params.colorappearance.sharpcie } } - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) && params.sharpening.enabled) { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) && params.sharpening.enabled) { float **buffer = new float*[fh]; @@ -1055,22 +1059,22 @@ private: WavOpacityCurveW waOpacityCurveW; WavOpacityCurveWL waOpacityCurveWL; - params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL ); + params.wavelet.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL ); // directional pyramid wavelet - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if((params.colorappearance.enabled && !settings->autocielab) || !params.colorappearance.enabled) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if ((params.colorappearance.enabled && !settings->autocielab) || !params.colorappearance.enabled) { ipf.dirpyrequalizer (labView, 1); //TODO: this is the luminance tonecurve, not the RGB one } } bool wavcontlutili = false; - CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); + CurveFactory::curveWavContL (wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); - if(params.wavelet.enabled) { - ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); + if (params.wavelet.enabled) { + ipf.ip_wavelet (labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); } wavCLVCurve.Reset(); @@ -1080,7 +1084,7 @@ private: int f_w = 1, f_h = 1; int begh = 0, endh = fh; - if(params.colorappearance.tonecie || params.colorappearance.enabled) { + if (params.colorappearance.tonecie || params.colorappearance.enabled) { f_w = fw; f_h = fh; } @@ -1099,21 +1103,21 @@ private: customColCurve3, 1); - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { double adap; float fnum = imgsrc->getMetaData()->getFNumber ();// F number float fiso = imgsrc->getMetaData()->getISOSpeed () ;// ISO float fspeed = imgsrc->getMetaData()->getShutterSpeed () ;//speed float fcomp = imgsrc->getMetaData()->getExpComp ();//compensation + - - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { adap = 2000.; }//if no exif data or wrong else { float E_V = fcomp + log2 ((fnum * fnum) / fspeed / (fiso / 100.f)); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = powf(2.f, E_V - 3.f); //cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = powf (2.f, E_V - 3.f); //cd / m2 } LUTf CAMBrightCurveJ; @@ -1121,17 +1125,17 @@ private: float CAMMean = NAN; if (params.sharpening.enabled) { - if(settings->ciecamfloat) { + if (settings->ciecamfloat) { float d, dj, yb; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); + ipf.ciecam_02float (cieView, float (adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj, yb; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); } } else { - if(settings->ciecamfloat) { + if (settings->ciecamfloat) { float d, dj, yb; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); + ipf.ciecam_02float (cieView, float (adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj, yb; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); @@ -1154,7 +1158,7 @@ private: } int imw, imh; - double tmpScale = ipf.resizeScale(¶ms, fw, fh, imw, imh); + double tmpScale = ipf.resizeScale (¶ms, fw, fh, imw, imh); bool labResize = params.resize.enabled && params.resize.method != "Nearest" && tmpScale != 1.0; LabImage *tmplab; @@ -1167,11 +1171,11 @@ private: cw = params.crop.w; ch = params.crop.h; - if(labResize) { // crop lab data - tmplab = new LabImage(cw, ch); + if (labResize) { // crop lab data + tmplab = new LabImage (cw, ch); - for(int row = 0; row < ch; row++) { - for(int col = 0; col < cw; col++) { + for (int row = 0; row < ch; row++) { + for (int col = 0; col < cw; col++) { tmplab->L[row][col] = labView->L[row + cy][col + cx]; tmplab->a[row][col] = labView->a[row + cy][col + cx]; tmplab->b[row][col] = labView->b[row + cy][col + cx]; @@ -1187,16 +1191,16 @@ private: if (labResize) { // resize lab data // resize image - tmplab = new LabImage(imw, imh); + tmplab = new LabImage (imw, imh); ipf.Lanczos (labView, tmplab, tmpScale); delete labView; labView = tmplab; cw = labView->W; ch = labView->H; - if(params.prsharpening.enabled) { - for(int i = 0; i < ch; i++) - for(int j = 0; j < cw; j++) { + if (params.prsharpening.enabled) { + for (int i = 0; i < ch; i++) + for (int j = 0; j < cw; j++) { labView->L[i][j] = labView->L[i][j] < 0.f ? 0.f : labView->L[i][j]; } @@ -1222,7 +1226,7 @@ private: bool useLCMS = false; bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; - if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + if (params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 GammaValues ga; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; @@ -1243,7 +1247,7 @@ private: readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly); if (settings->verbose) { - printf("Output profile_: \"%s\"\n", params.icm.output.c_str()); + printf ("Output profile_: \"%s\"\n", params.icm.output.c_str()); } } @@ -1252,15 +1256,15 @@ private: - if(bwonly) { //force BW r=g=b + if (bwonly) { //force BW r=g=b if (settings->verbose) { - printf("Force BW\n"); + printf ("Force BW\n"); } for (int ccw = 0; ccw < cw; ccw++) { for (int cch = 0; cch < ch; cch++) { - readyImg->r(cch, ccw) = readyImg->g(cch, ccw); - readyImg->b(cch, ccw) = readyImg->g(cch, ccw); + readyImg->r (cch, ccw) = readyImg->g (cch, ccw); + readyImg->b (cch, ccw) = readyImg->g (cch, ccw); } } } @@ -1287,8 +1291,8 @@ private: if (customGamma) { if (!useLCMS) { // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma - ProfileContent pc(jprof); - readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size()); + ProfileContent pc (jprof); + readyImg->setOutputProfile (pc.getData().c_str(), pc.getData().size()); } } else { // use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma @@ -1296,19 +1300,19 @@ private: if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) { // if ICCStore::getInstance()->getProfile send back an object, then ICCStore::getInstance()->getContent will do too - cmsHPROFILE jprof = ICCStore::getInstance()->getProfile(params.icm.output); //get outProfile + cmsHPROFILE jprof = ICCStore::getInstance()->getProfile (params.icm.output); //get outProfile if (jprof == nullptr) { if (settings->verbose) { - printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); + printf ("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); } } else { if (settings->verbose) { - printf("Using \"%s\" output profile\n", params.icm.output.c_str()); + printf ("Using \"%s\" output profile\n", params.icm.output.c_str()); } ProfileContent pc = ICCStore::getInstance()->getContent (params.icm.output); - readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size()); + readyImg->setOutputProfile (pc.getData().c_str(), pc.getData().size()); } } else { // No ICM @@ -1348,13 +1352,13 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); int imw, imh; - double scale_factor = ipf.resizeScale(¶ms, fw, fh, imw, imh); + double scale_factor = ipf.resizeScale (¶ms, fw, fh, imw, imh); - std::unique_ptr tmplab(new LabImage(fw, fh)); - ipf.rgb2lab(*baseImg, *tmplab, params.icm.working); + std::unique_ptr tmplab (new LabImage (fw, fh)); + ipf.rgb2lab (*baseImg, *tmplab, params.icm.working); if (params.crop.enabled) { int cx = params.crop.x; @@ -1362,39 +1366,39 @@ private: int cw = params.crop.w; int ch = params.crop.h; - std::unique_ptr cropped(new LabImage(cw, ch)); + std::unique_ptr cropped (new LabImage (cw, ch)); - for(int row = 0; row < ch; row++) { - for(int col = 0; col < cw; col++) { + for (int row = 0; row < ch; row++) { + for (int col = 0; col < cw; col++) { cropped->L[row][col] = tmplab->L[row + cy][col + cx]; cropped->a[row][col] = tmplab->a[row + cy][col + cx]; cropped->b[row][col] = tmplab->b[row + cy][col + cx]; } } - tmplab = std::move(cropped); + tmplab = std::move (cropped); } - assert(params.resize.enabled); + assert (params.resize.enabled); // resize image { - std::unique_ptr resized(new LabImage(imw, imh)); - ipf.Lanczos(tmplab.get(), resized.get(), scale_factor); - tmplab = std::move(resized); + std::unique_ptr resized (new LabImage (imw, imh)); + ipf.Lanczos (tmplab.get(), resized.get(), scale_factor); + tmplab = std::move (resized); } - adjust_procparams(scale_factor); + adjust_procparams (scale_factor); fw = imw; fh = imh; delete baseImg; - baseImg = new Imagefloat(fw, fh); - ipf.lab2rgb(*tmplab, *baseImg, params.icm.working); + baseImg = new Imagefloat (fw, fh); + ipf.lab2rgb (*tmplab, *baseImg, params.icm.working); } - void adjust_procparams(double scale_factor) + void adjust_procparams (double scale_factor) { procparams::ProcParams ¶ms = job->pparams; procparams::ProcParams defaultparams; @@ -1405,32 +1409,41 @@ private: if (params.prsharpening.enabled) { params.sharpening = params.prsharpening; } else { - adjust_radius(defaultparams.sharpening.radius, scale_factor, - params.sharpening.radius); + adjust_radius (defaultparams.sharpening.radius, scale_factor, + params.sharpening.radius); } + params.impulseDenoise.thresh *= scale_factor; + if (scale_factor < 0.5) { params.impulseDenoise.enabled = false; } + params.wavelet.strength *= scale_factor; params.dirpyrDenoise.luma *= scale_factor; //params.dirpyrDenoise.Ldetail += (100 - params.dirpyrDenoise.Ldetail) * scale_factor; auto &lcurve = params.dirpyrDenoise.lcurve; + for (size_t i = 2; i < lcurve.size(); i += 4) { - lcurve[i] *= min(scale_factor * 2, 1.0); + lcurve[i] *= min (scale_factor * 2, 1.0); } - noiseLCurve.Set(lcurve); + + noiseLCurve.Set (lcurve); const char *medmethods[] = { "soft", "33", "55soft", "55", "77", "99" }; + if (params.dirpyrDenoise.median) { auto &key = params.dirpyrDenoise.methodmed == "RGB" ? params.dirpyrDenoise.rgbmethod : params.dirpyrDenoise.medmethod; - for (int i = 1; i < int(sizeof(medmethods)/sizeof(const char *)); ++i) { + + for (int i = 1; i < int (sizeof (medmethods) / sizeof (const char *)); ++i) { if (key == medmethods[i]) { - int j = i - int(1.0 / scale_factor); + int j = i - int (1.0 / scale_factor); + if (j < 0) { params.dirpyrDenoise.median = false; } else { key = medmethods[j]; } + break; } } @@ -1439,24 +1452,27 @@ private: params.epd.scale *= scale_factor; //params.epd.edgeStopping *= scale_factor; - const double dirpyreq_scale = min(scale_factor * 1.5, 1.0); + const double dirpyreq_scale = min (scale_factor * 1.5, 1.0); + for (int i = 0; i < 6; ++i) { - adjust_radius(defaultparams.dirpyrequalizer.mult[i], dirpyreq_scale, - params.dirpyrequalizer.mult[i]); + adjust_radius (defaultparams.dirpyrequalizer.mult[i], dirpyreq_scale, + params.dirpyrequalizer.mult[i]); } + params.dirpyrequalizer.threshold *= scale_factor; - adjust_radius(defaultparams.defringe.radius, scale_factor, - params.defringe.radius); - adjust_radius(defaultparams.sh.radius, scale_factor, params.sh.radius); + adjust_radius (defaultparams.defringe.radius, scale_factor, + params.defringe.radius); + adjust_radius (defaultparams.sh.radius, scale_factor, params.sh.radius); if (params.raw.xtranssensor.method == - procparams::RAWParams::XTransSensor::methodstring[ - procparams::RAWParams::XTransSensor::threePass]) { + procparams::RAWParams::XTransSensor::methodstring[ + procparams::RAWParams::XTransSensor::threePass]) { params.raw.xtranssensor.method = procparams::RAWParams::XTransSensor::methodstring[ - procparams::RAWParams::XTransSensor::onePass]; + procparams::RAWParams::XTransSensor::onePass]; } + if (params.raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::pixelshift]) { params.raw.bayersensor.method = procparams::RAWParams::BayerSensor::methodstring[params.raw.bayersensor.pixelShiftLmmse ? procparams::RAWParams::BayerSensor::lmmse : procparams::RAWParams::BayerSensor::amaze]; } @@ -1542,7 +1558,7 @@ private: IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* pl, bool tunnelMetaData, bool flush) { - ImageProcessor proc(pjob, errorCode, pl, tunnelMetaData, flush); + ImageProcessor proc (pjob, errorCode, pl, tunnelMetaData, flush); return proc(); } @@ -1556,7 +1572,7 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo IImage16* img = processImage (currentJob, errorCode, bpl, tunnelMetaData, true); if (errorCode) { - bpl->error (M("MAIN_MSG_CANNOTLOAD")); + bpl->error (M ("MAIN_MSG_CANNOTLOAD")); currentJob = nullptr; } else { try { @@ -1572,8 +1588,9 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo void startBatchProcessing (ProcessingJob* job, BatchProcessingListener* bpl, bool tunnelMetaData) { - if (bpl) - Glib::Thread::create(sigc::bind(sigc::ptr_fun(batchProcessingThread), job, bpl, tunnelMetaData), 0, true, true, Glib::THREAD_PRIORITY_LOW); + if (bpl) { + Glib::Thread::create (sigc::bind (sigc::ptr_fun (batchProcessingThread), job, bpl, tunnelMetaData), 0, true, true, Glib::THREAD_PRIORITY_LOW); + } } diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 98f5d0ecc..91f58f42e 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -27,8 +27,8 @@ #define MINGREEN0 0.8 #define MAXGREEN0 1.2 -#define MINLA0 0.01 -#define MAXLA0 16384 +#define MINLA0 0.01 +#define MAXLA0 16384 #define CENTERLA0 500 using namespace rtengine; @@ -70,7 +70,7 @@ static double wbSlider2la (double sval) if (sval <= 500) { // linear below center-temp - la= MINLA0 + (sval / 500.0) * (CENTERLA0 - MINLA0); + la = MINLA0 + (sval / 500.0) * (CENTERLA0 - MINLA0); } else { const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); double x = (sval - 500) / 500; // x 0..1 @@ -234,10 +234,10 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degree->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p1VBox->pack_start (*degree); - // surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); - // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); - - + // surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); + // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); + + Gtk::HBox* surrHBox1 = Gtk::manage (new Gtk::HBox ()); surrHBox1->set_spacing (2); surrHBox1->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); @@ -247,12 +247,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" surrsrc->append (M ("TP_COLORAPP_SURROUND_AVER")); surrsrc->append (M ("TP_COLORAPP_SURROUND_DIM")); surrsrc->append (M ("TP_COLORAPP_SURROUND_DARK")); - surrsrc->append (M ("TP_COLORAPP_SURROUND_EXDARK")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_EXDARK")); surrsrc->set_active (0); surrHBox1->pack_start (*surrsrc); p1VBox->pack_start (*surrHBox1); - - // p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); + +// p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); Gtk::HBox* wbmHBox = Gtk::manage (new Gtk::HBox ()); wbmHBox->set_spacing (2); @@ -263,7 +263,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" wbmodel->append (M ("TP_COLORAPP_WBRT")); wbmodel->append (M ("TP_COLORAPP_WBCAM")); wbmodel->append (M ("TP_COLORAPP_FREE")); - + wbmodel->set_active (0); wbmHBox->pack_start (*wbmodel); p1VBox->pack_start (*wbmHBox); @@ -272,8 +272,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); Gtk::Image* igreenL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - - + + tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenL, igreenR)); tempsc->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); @@ -282,9 +282,9 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" greensc->show(); p1VBox->pack_start (*tempsc); p1VBox->pack_start (*greensc); - - - // adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 + + +// adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adapscen->delay < options.adjusterMaxDelay) { @@ -296,7 +296,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" adapscen->set_tooltip_markup (M ("TP_COLORAPP_ADAPTSCENE_TOOLTIP")); p1VBox->pack_start (*adapscen); - ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18)); + ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18)); if (ybscen->delay < options.adjusterMaxDelay) { ybscen->delay = options.adjusterMaxDelay; @@ -306,7 +306,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" ybscen->addAutoButton (M ("TP_COLORAPP_ADAP_AUTO_TOOLTIP")); ybscen->set_tooltip_markup (M ("TP_COLORAPP_YBSCENE_TOOLTIP")); p1VBox->pack_start (*ybscen); - + p1Frame->add (*p1VBox); pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -316,17 +316,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Process 1 frame - expadjust = Gtk::manage(new MyExpander(false, M ("TP_COLORAPP_LABEL_CAM02"))); + expadjust = Gtk::manage (new MyExpander (false, M ("TP_COLORAPP_LABEL_CAM02"))); setExpandAlignProperties (expadjust, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); expadjust->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ColorAppearance::foldAllButMe), expadjust) ); -/* - Gtk::Frame *p2Frame; - // Vertical box container for the content of the Process 1 frame - Gtk::VBox *p2VBox; + /* + Gtk::Frame *p2Frame; + // Vertical box container for the content of the Process 1 frame + Gtk::VBox *p2VBox; - p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); - p2Frame->set_label_align (0.025, 0.5); -*/ + p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); + p2Frame->set_label_align (0.025, 0.5); + */ Gtk::VBox *p2VBox; p2VBox = Gtk::manage ( new Gtk::VBox()); @@ -554,8 +554,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // p2Frame->add (*p2VBox); expadjust->add (*p2VBox, false); - expadjust->setLevel(2); - pack_start (*expadjust); + expadjust->setLevel (2); + pack_start (*expadjust); // pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -574,12 +574,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p3VBox = Gtk::manage ( new Gtk::VBox()); p3VBox->set_spacing (2); - + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - // adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); +// adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adaplum->delay < options.adjusterMaxDelay) { @@ -603,12 +603,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degreeout->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p3VBox->pack_start (*degreeout); -/* - Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); -*/ + /* + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + */ tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); @@ -664,9 +664,9 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" badpixsl->throwOnButtonRelease(); badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP")); pack_start (*badpixsl, Gtk::PACK_SHRINK); - - - //reset button + + + //reset button neutral = Gtk::manage (new Gtk::Button (M ("TP_COLORAPP_NEUTRAL"))); setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); @@ -677,13 +677,13 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" neutral->show(); //------------- - + pack_start (*neutral); // ------------------------ Listening events - // surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); +// surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); wbmodelconn = wbmodel->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::wbmodelChanged) ); algoconn = algo->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::algoChanged) ); surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surroundChanged) ); @@ -726,57 +726,57 @@ ColorAppearance::~ColorAppearance () void ColorAppearance::foldAllButMe (GdkEventButton* event, MyExpander *expander) { if (event->button == 3) { - expadjust->set_expanded(expadjust == expander); + expadjust->set_expanded (expadjust == expander); } } -void ColorAppearance::writeOptions(std::vector &tpOpen) +void ColorAppearance::writeOptions (std::vector &tpOpen) { tpOpen.push_back (expadjust->get_expanded ()); } -void ColorAppearance::updateToolState(std::vector &tpOpen) +void ColorAppearance::updateToolState (std::vector &tpOpen) { - if(tpOpen.size() >= 1) { - expadjust->set_expanded(tpOpen.at(0)); + if (tpOpen.size() >= 1) { + expadjust->set_expanded (tpOpen.at (0)); } } void ColorAppearance::neutral_pressed () { - jlight->resetValue (false); - qbright->resetValue (false); - chroma->resetValue (false); - schroma->resetValue (false); - mchroma->resetValue (false); - rstprotection->resetValue (false); - contrast->resetValue (false); - qcontrast->resetValue (false); - colorh->resetValue (false); - tempout->resetValue (false); - greenout->resetValue (false); - ybout->resetValue (false); - tempsc->resetValue (false); - greensc->resetValue (false); - badpixsl->resetValue (false); - wbmodel->set_active (0); - toneCurveMode->set_active (0); - toneCurveMode2->set_active (0); - toneCurveMode3->set_active (0); - shape->reset(); - shape2->reset(); - shape3->reset(); - gamutconn.block (true); - gamut->set_active (true); - gamutconn.block (false); - degree->setAutoValue (true); - degree->resetValue (false); - adapscen->resetValue (false); - adapscen->setAutoValue (true); - degreeout->resetValue (false); - degreeout->setAutoValue (true); - ybscen->resetValue (false); - ybscen->setAutoValue (true); + jlight->resetValue (false); + qbright->resetValue (false); + chroma->resetValue (false); + schroma->resetValue (false); + mchroma->resetValue (false); + rstprotection->resetValue (false); + contrast->resetValue (false); + qcontrast->resetValue (false); + colorh->resetValue (false); + tempout->resetValue (false); + greenout->resetValue (false); + ybout->resetValue (false); + tempsc->resetValue (false); + greensc->resetValue (false); + badpixsl->resetValue (false); + wbmodel->set_active (0); + toneCurveMode->set_active (0); + toneCurveMode2->set_active (0); + toneCurveMode3->set_active (0); + shape->reset(); + shape2->reset(); + shape3->reset(); + gamutconn.block (true); + gamut->set_active (true); + gamutconn.block (false); + degree->setAutoValue (true); + degree->resetValue (false); + adapscen->resetValue (false); + adapscen->setAutoValue (true); + degreeout->resetValue (false); + degreeout->setAutoValue (true); + ybscen->resetValue (false); + ybscen->setAutoValue (true); } bool ColorAppearance::bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) @@ -876,8 +876,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) surrsrcconn.block (false); // Have to be manually called to handle initial state update surrsrcChanged(); - - + + surroundconn.block (true); if (pedited && !pedited->colorappearance.surround) { @@ -896,8 +896,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update surroundChanged(); - - + + wbmodelconn.block (true); if (pedited && !pedited->colorappearance.wbmodel) { @@ -932,9 +932,9 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update algoChanged(); - // surrconn.block (true); - // surrsource->set_active (pp->colorappearance.surrsource); - // surrconn.block (false); + // surrconn.block (true); + // surrsource->set_active (pp->colorappearance.surrsource); + // surrconn.block (false); gamutconn.block (true); gamut->set_active (pp->colorappearance.gamut); gamutconn.block (false); @@ -951,7 +951,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_active (pp->colorappearance.sharpcie); // sharpcieconn.block (false); - // lastsurr = pp->colorappearance.surrsource; +// lastsurr = pp->colorappearance.surrsource; lastgamut = pp->colorappearance.gamut; // lastbadpix=pp->colorappearance.badpix; lastdatacie = pp->colorappearance.datacie; @@ -1026,7 +1026,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.qcontrast = qcontrast->getValue (); pp->colorappearance.colorh = colorh->getValue (); pp->colorappearance.rstprotection = rstprotection->getValue (); - // pp->colorappearance.surrsource = surrsource->get_active(); + // pp->colorappearance.surrsource = surrsource->get_active(); pp->colorappearance.gamut = gamut->get_active(); // pp->colorappearance.badpix = badpix->get_active(); pp->colorappearance.datacie = datacie->get_active(); @@ -1092,7 +1092,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.surrsrc = surrsrc->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.algo = algo->get_active_text() != M ("GENERAL_UNCHANGED"); - // pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); + // pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); pedited->colorappearance.gamut = !gamut->get_inconsistent(); // pedited->colorappearance.badpix = !badpix->get_inconsistent(); pedited->colorappearance.datacie = !datacie->get_inconsistent(); @@ -1121,8 +1121,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) } else if (surrsrc->get_active_row_number() == 3) { pp->colorappearance.surrsrc = "ExtremelyDark"; } - - + + if (surround->get_active_row_number() == 0) { pp->colorappearance.surround = "Average"; } else if (surround->get_active_row_number() == 1) { @@ -1139,7 +1139,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.wbmodel = "RawTCAT02"; } else if (wbmodel->get_active_row_number() == 2) { pp->colorappearance.wbmodel = "free"; - + } if (algo->get_active_row_number() == 0) { @@ -1452,7 +1452,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit void ColorAppearance::autoCamChanged (double ccam, double ccamout) { nextCcam = ccam; - nextCcamout = ccamout; + nextCcamout = ccamout; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->autoCamComputed_(); @@ -1468,7 +1468,7 @@ bool ColorAppearance::autoCamComputed_ () disableListener (); // degree->setEnabled (true); degree->setValue (nextCcam); - degreeout->setValue (nextCcamout); + degreeout->setValue (nextCcamout); enableListener (); return false; @@ -1492,7 +1492,7 @@ bool ColorAppearance::adapCamComputed_ () disableListener (); // degree->setEnabled (true); adapscen->setValue (nextCadap); -// ybscen->setValue (nextYbscn); +// ybscen->setValue (nextYbscn); enableListener (); return false; @@ -1500,7 +1500,7 @@ bool ColorAppearance::adapCamComputed_ () void ColorAppearance::ybCamChanged (int ybsc) { - nextYbscn = ybsc; + nextYbscn = ybsc; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->ybCamComputed_(); @@ -1516,7 +1516,7 @@ bool ColorAppearance::ybCamComputed_ () disableListener (); // degree->setEnabled (true); // adapscen->setValue (nextCadap); - ybscen->setValue (nextYbscn); + ybscen->setValue (nextYbscn); enableListener (); return false; @@ -1551,7 +1551,7 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) if (a == degree) { listener->panelChanged (EvCATDegree, a->getTextValue()); } else if (a == degreeout) { - listener->panelChanged (EvCATDegreeout, a->getTextValue()); + listener->panelChanged (EvCATDegreeout, a->getTextValue()); } else if (a == adapscen) { listener->panelChanged (EvCATAdapscen, a->getTextValue()); } else if (a == ybscen) { @@ -1615,7 +1615,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) } lastAutoDegreeout = degreeout->getAutoValue(); - + if (adapscen->getAutoInconsistent()) { adapscen->setAutoInconsistent (false); adapscen->setAutoValue (false); @@ -1633,7 +1633,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) } lastAutoybscen = ybscen->getAutoValue(); - + } if (listener && (multiImage || getEnabled()) ) { @@ -1647,7 +1647,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoDegree, M ("GENERAL_DISABLED")); } } - + if (a == degreeout) { if (degreeout->getAutoInconsistent()) { listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_UNCHANGED")); @@ -1657,7 +1657,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_DISABLED")); } } - + if (a == adapscen) { if (adapscen->getAutoInconsistent()) { @@ -1678,7 +1678,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoyb, M ("GENERAL_DISABLED")); } } - + } } @@ -1718,13 +1718,14 @@ void ColorAppearance::surroundChanged () void ColorAppearance::wbmodelChanged () { if (wbmodel->get_active_row_number() == 0 || wbmodel->get_active_row_number() == 1) { - tempsc->hide(); - greensc->hide(); - } - if (wbmodel->get_active_row_number() == 2){ - tempsc->show(); - greensc->show(); - } + tempsc->hide(); + greensc->hide(); + } + + if (wbmodel->get_active_row_number() == 2) { + tempsc->show(); + greensc->show(); + } if (listener && (multiImage || getEnabled()) ) { listener->panelChanged (EvCATMethodWB, wbmodel->get_active_text ()); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 4afed28cb..3829475ae 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -117,7 +117,7 @@ private: Adjuster* greensc; MyExpander* expadjust; - + MyComboBoxText* toneCurveMode; MyComboBoxText* toneCurveMode2; MyComboBoxText* toneCurveMode3; @@ -150,7 +150,7 @@ private: DiagonalCurveEditor* shape2; DiagonalCurveEditor* shape3; double nextCcam, nextCcamout, nextCadap; - int nextYbscn; + int nextYbscn; bool lastAutoDegree; bool lastAutoAdapscen; bool lastAutoDegreeout; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index eb0b77085..ea9248ddc 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1732,7 +1732,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.autodegreeout) { toEdit.colorappearance.autodegreeout = mods.colorappearance.autodegreeout; } - + if (colorappearance.surround) { toEdit.colorappearance.surround = mods.colorappearance.surround; } @@ -1740,7 +1740,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.surrsrc) { toEdit.colorappearance.surrsrc = mods.colorappearance.surrsrc; } - + if (colorappearance.autoadapscen) { toEdit.colorappearance.autoadapscen = mods.colorappearance.autoadapscen; } @@ -1756,7 +1756,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.ybscen) { toEdit.colorappearance.ybscen = mods.colorappearance.ybscen; } - + if (colorappearance.adaplum) { toEdit.colorappearance.adaplum = dontforceSet && options.baBehav[ADDSET_CAT_ADAPTVIEWING] ? toEdit.colorappearance.adaplum + mods.colorappearance.adaplum : mods.colorappearance.adaplum; } @@ -1788,7 +1788,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.greensc) { toEdit.colorappearance.greensc = mods.colorappearance.greensc; } - + if (colorappearance.ybout) { toEdit.colorappearance.ybout = mods.colorappearance.ybout; } From 779f4dd12e0109e2c1790ff5df9785a35add0deb Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 18 Aug 2017 13:20:14 +0200 Subject: [PATCH 019/126] Speedup for raw CA correction --- rtengine/CA_correct_RT.cc | 449 +++++++++++++++++++++++++------------- 1 file changed, 301 insertions(+), 148 deletions(-) diff --git a/rtengine/CA_correct_RT.cc b/rtengine/CA_correct_RT.cc index aea20d8c9..0c0cc3f12 100644 --- a/rtengine/CA_correct_RT.cc +++ b/rtengine/CA_correct_RT.cc @@ -27,6 +27,8 @@ #include "rawimagesource.h" #include "rt_math.h" #include "median.h" +#define BENCHMARK +#include "StopWatch.h" namespace { @@ -113,6 +115,7 @@ using namespace rtengine; void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const double cablue, const double caautostrength, array2D &rawData) { + BENCHFUN // multithreaded and partly vectorized by Ingo Weyrich constexpr int ts = 128; constexpr int tsh = ts / 2; @@ -136,7 +139,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const // local variables const int width = W, height = H; //temporary array to store simple interpolation of G - float *Gtmp = (float (*)) calloc ((height) * (width), sizeof * Gtmp); + float *Gtmp = (float (*)) malloc ((height * width + ((height * width) & 1)) / 2 * sizeof * Gtmp); // temporary array to avoid race conflicts, only every second pixel needs to be saved here float *RawDataTmp = (float*) malloc( (height * width + ((height * width) & 1)) * sizeof(float) / 2); @@ -185,7 +188,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const float blockavethr[2][2] = {{0, 0}, {0, 0}}, blocksqavethr[2][2] = {{0, 0}, {0, 0}}, blockdenomthr[2][2] = {{0, 0}, {0, 0}}; // assign working space - constexpr int buffersize = 3 * sizeof(float) * ts * ts + 6 * sizeof(float) * ts * tsh + 8 * 64 + 63; + constexpr int buffersize = sizeof(float) * ts * ts + 8 * sizeof(float) * ts * tsh + 8 * 64 + 63; char *buffer = (char *) malloc(buffersize); char *data = (char*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); @@ -194,22 +197,21 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const //rgb data in a tile float* rgb[3]; rgb[0] = (float (*)) data; - rgb[1] = (float (*)) (data + 1 * sizeof(float) * ts * ts + 1 * 64); - rgb[2] = (float (*)) (data + 2 * sizeof(float) * ts * ts + 2 * 64); + rgb[1] = (float (*)) (data + sizeof(float) * ts * tsh + 1 * 64); + rgb[2] = (float (*)) (data + sizeof(float) * (ts * ts + ts * tsh) + 2 * 64); //high pass filter for R/B in vertical direction - float *rbhpfh = (float (*)) (data + 3 * sizeof(float) * ts * ts + 3 * 64); + float *rbhpfh = (float (*)) (data + 2 * sizeof(float) * ts * ts + 3 * 64); //high pass filter for R/B in horizontal direction - float *rbhpfv = (float (*)) (data + 3 * sizeof(float) * ts * ts + sizeof(float) * ts * tsh + 4 * 64); + float *rbhpfv = (float (*)) (data + 2 * sizeof(float) * ts * ts + sizeof(float) * ts * tsh + 4 * 64); //low pass filter for R/B in horizontal direction - float *rblpfh = (float (*)) (data + 4 * sizeof(float) * ts * ts + 5 * 64); + float *rblpfh = (float (*)) (data + 3 * sizeof(float) * ts * ts + 5 * 64); //low pass filter for R/B in vertical direction - float *rblpfv = (float (*)) (data + 4 * sizeof(float) * ts * ts + sizeof(float) * ts * tsh + 6 * 64); + float *rblpfv = (float (*)) (data + 3 * sizeof(float) * ts * ts + sizeof(float) * ts * tsh + 6 * 64); //low pass filter for colour differences in horizontal direction - float *grblpfh = (float (*)) (data + 5 * sizeof(float) * ts * ts + 7 * 64); + float *grblpfh = (float (*)) (data + 4 * sizeof(float) * ts * ts + 7 * 64); //low pass filter for colour differences in vertical direction - float *grblpfv = (float (*)) (data + 5 * sizeof(float) * ts * ts + sizeof(float) * ts * tsh + 8 * 64); - //colour differences + float *grblpfv = (float (*)) (data + 4 * sizeof(float) * ts * ts + sizeof(float) * ts * tsh + 8 * 64); float *grbdiff = rbhpfh; // there is no overlap in buffer usage => share //green interpolated to optical sample points for R/B float *gshift = rbhpfv; // there is no overlap in buffer usage => share @@ -236,13 +238,38 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const // rgb values should be floating point numbers between 0 and 1 // after white balance multipliers are applied - for (int rr = rrmin; rr < rrmax; rr++) - for (int row = rr + top, cc = ccmin; cc < ccmax; cc++) { - int col = cc + left; +#ifdef __SSE2__ + vfloat c65535v = F2V(65535.f); +#endif + + for (int rr = rrmin; rr < rrmax; rr++) { + int row = rr + top; + int cc = ccmin; + int col = cc + left; +#ifdef __SSE2__ + int c0 = FC(rr, cc); + if(c0 == 1) { + rgb[c0][rr * ts + cc] = rawData[row][col] / 65535.f; + cc++; + col++; + c0 = FC(rr, cc); + } + int indx1 = rr * ts + cc; + for (; cc < ccmax - 7; cc+=8, col+=8, indx1 += 8) { + vfloat val1 = LVFU(rawData[row][col]) / c65535v; + vfloat val2 = LVFU(rawData[row][col + 4]) / c65535v; + vfloat nonGreenv = _mm_shuffle_ps(val1,val2,_MM_SHUFFLE( 2,0,2,0 )); + STVFU(rgb[c0][indx1 >> 1], nonGreenv); + STVFU(rgb[1][indx1], val1); + STVFU(rgb[1][indx1 + 4], val2); + } +#endif + for (; cc < ccmax; cc++, col++) { int c = FC(rr, cc); int indx1 = rr * ts + cc; - rgb[c][indx1] = (rawData[row][col]) / 65535.0f; + rgb[c][indx1 >> ((c & 1) ^ 1)] = rawData[row][col] / 65535.f; } + } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //fill borders @@ -250,7 +277,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = ccmin; cc < ccmax; cc++) { int c = FC(rr, cc); - rgb[c][rr * ts + cc] = rgb[c][(border2 - rr) * ts + cc]; + rgb[c][(rr * ts + cc) >> ((c & 1) ^ 1)] = rgb[c][((border2 - rr) * ts + cc) >> ((c & 1) ^ 1)]; } } @@ -258,7 +285,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = ccmin; cc < ccmax; cc++) { int c = FC(rr, cc); - rgb[c][(rrmax + rr)*ts + cc] = (rawData[(height - rr - 2)][left + cc]) / 65535.0f; + rgb[c][((rrmax + rr)*ts + cc) >> ((c & 1) ^ 1)] = rawData[(height - rr - 2)][left + cc] / 65535.f; } } @@ -266,7 +293,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = rrmin; rr < rrmax; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][rr * ts + cc] = rgb[c][rr * ts + border2 - cc]; + rgb[c][(rr * ts + cc) >> ((c & 1) ^ 1)] = rgb[c][(rr * ts + border2 - cc) >> ((c & 1) ^ 1)]; } } @@ -274,7 +301,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = rrmin; rr < rrmax; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][rr * ts + ccmax + cc] = (rawData[(top + rr)][(width - cc - 2)]) / 65535.0f; + rgb[c][(rr * ts + ccmax + cc) >> ((c & 1) ^ 1)] = rawData[(top + rr)][(width - cc - 2)] / 65535.f; } } @@ -283,7 +310,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rr)*ts + cc] = (rawData[border2 - rr][border2 - cc]) / 65535.0f; + rgb[c][(rr * ts + cc) >> ((c & 1) ^ 1)] = rawData[border2 - rr][border2 - cc] / 65535.f; } } @@ -291,7 +318,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rrmax + rr)*ts + ccmax + cc] = (rawData[(height - rr - 2)][(width - cc - 2)]) / 65535.0f; + rgb[c][((rrmax + rr)*ts + ccmax + cc) >> ((c & 1) ^ 1)] = rawData[(height - rr - 2)][(width - cc - 2)] / 65535.f; } } @@ -299,7 +326,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rr)*ts + ccmax + cc] = (rawData[(border2 - rr)][(width - cc - 2)]) / 65535.0f; + rgb[c][(rr * ts + ccmax + cc) >> ((c & 1) ^ 1)] = rawData[(border2 - rr)][(width - cc - 2)] / 65535.f; } } @@ -307,7 +334,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rrmax + rr)*ts + cc] = (rawData[(height - rr - 2)][(border2 - cc)]) / 65535.0f; + rgb[c][((rrmax + rr)*ts + cc) >> ((c & 1) ^ 1)] = rawData[(height - rr - 2)][(border2 - cc)] / 65535.f; } } @@ -328,30 +355,45 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const #ifdef __SSE2__ for (; cc < cc1 - 9; cc+=8, indx+=8) { //compute directional weights using image gradients - vfloat wtuv = onev / SQRV(epsv + vabsf(LC2VFU(rgb[1][indx + v1]) - LC2VFU(rgb[1][indx - v1])) + vabsf(LC2VFU(rgb[c][indx]) - LC2VFU(rgb[c][indx - v2])) + vabsf(LC2VFU(rgb[1][indx - v1]) - LC2VFU(rgb[1][indx - v3]))); - vfloat wtdv = onev / SQRV(epsv + vabsf(LC2VFU(rgb[1][indx - v1]) - LC2VFU(rgb[1][indx + v1])) + vabsf(LC2VFU(rgb[c][indx]) - LC2VFU(rgb[c][indx + v2])) + vabsf(LC2VFU(rgb[1][indx + v1]) - LC2VFU(rgb[1][indx + v3]))); - vfloat wtlv = onev / SQRV(epsv + vabsf(LC2VFU(rgb[1][indx + 1]) - LC2VFU(rgb[1][indx - 1])) + vabsf(LC2VFU(rgb[c][indx]) - LC2VFU(rgb[c][indx - 2])) + vabsf(LC2VFU(rgb[1][indx - 1]) - LC2VFU(rgb[1][indx - 3]))); - vfloat wtrv = onev / SQRV(epsv + vabsf(LC2VFU(rgb[1][indx - 1]) - LC2VFU(rgb[1][indx + 1])) + vabsf(LC2VFU(rgb[c][indx]) - LC2VFU(rgb[c][indx + 2])) + vabsf(LC2VFU(rgb[1][indx + 1]) - LC2VFU(rgb[1][indx + 3]))); + vfloat rgb1mv1v = LC2VFU(rgb[1][indx - v1]); + vfloat rgb1pv1v = LC2VFU(rgb[1][indx + v1]); + vfloat rgbcv = LVFU(rgb[c][indx >> 1]); + vfloat temp1v = epsv + vabsf(rgb1mv1v - rgb1pv1v); + vfloat wtuv = onev / SQRV(temp1v + vabsf(rgbcv - LVFU(rgb[c][(indx - v2) >> 1])) + vabsf(rgb1mv1v - LC2VFU(rgb[1][indx - v3]))); + vfloat wtdv = onev / SQRV(temp1v + vabsf(rgbcv - LVFU(rgb[c][(indx + v2) >> 1])) + vabsf(rgb1pv1v - LC2VFU(rgb[1][indx + v3]))); + vfloat rgb1m1v = LC2VFU(rgb[1][indx - 1]); + vfloat rgb1p1v = LC2VFU(rgb[1][indx + 1]); + vfloat temp2v = epsv + vabsf(rgb1m1v - rgb1p1v); + vfloat wtlv = onev / SQRV(temp2v + vabsf(rgbcv - LVFU(rgb[c][(indx - 2) >> 1])) + vabsf(rgb1m1v - LC2VFU(rgb[1][indx - 3]))); + vfloat wtrv = onev / SQRV(temp2v + vabsf(rgbcv - LVFU(rgb[c][(indx + 2) >> 1])) + vabsf(rgb1p1v - LC2VFU(rgb[1][indx + 3]))); //store in rgb array the interpolated G value at R/B grid points using directional weighted average - STC2VFU(rgb[1][indx], (wtuv * LC2VFU(rgb[1][indx - v1]) + wtdv * LC2VFU(rgb[1][indx + v1]) + wtlv * LC2VFU(rgb[1][indx - 1]) + wtrv * LC2VFU(rgb[1][indx + 1])) / (wtuv + wtdv + wtlv + wtrv)); + STC2VFU(rgb[1][indx], (wtuv * rgb1mv1v + wtdv * rgb1pv1v + wtlv * rgb1m1v + wtrv * rgb1p1v) / (wtuv + wtdv + wtlv + wtrv)); } #endif for (; cc < cc1 - 3; cc+=2, indx+=2) { //compute directional weights using image gradients - float wtu = 1.f / SQR(eps + fabsf(rgb[1][indx + v1] - rgb[1][indx - v1]) + fabsf(rgb[c][indx] - rgb[c][indx - v2]) + fabsf(rgb[1][indx - v1] - rgb[1][indx - v3])); - float wtd = 1.f / SQR(eps + fabsf(rgb[1][indx - v1] - rgb[1][indx + v1]) + fabsf(rgb[c][indx] - rgb[c][indx + v2]) + fabsf(rgb[1][indx + v1] - rgb[1][indx + v3])); - float wtl = 1.f / SQR(eps + fabsf(rgb[1][indx + 1] - rgb[1][indx - 1]) + fabsf(rgb[c][indx] - rgb[c][indx - 2]) + fabsf(rgb[1][indx - 1] - rgb[1][indx - 3])); - float wtr = 1.f / SQR(eps + fabsf(rgb[1][indx - 1] - rgb[1][indx + 1]) + fabsf(rgb[c][indx] - rgb[c][indx + 2]) + fabsf(rgb[1][indx + 1] - rgb[1][indx + 3])); + float wtu = 1.f / SQR(eps + fabsf(rgb[1][indx + v1] - rgb[1][indx - v1]) + fabsf(rgb[c][indx >> 1] - rgb[c][(indx - v2) >> 1]) + fabsf(rgb[1][indx - v1] - rgb[1][indx - v3])); + float wtd = 1.f / SQR(eps + fabsf(rgb[1][indx - v1] - rgb[1][indx + v1]) + fabsf(rgb[c][indx >> 1] - rgb[c][(indx + v2) >> 1]) + fabsf(rgb[1][indx + v1] - rgb[1][indx + v3])); + float wtl = 1.f / SQR(eps + fabsf(rgb[1][indx + 1] - rgb[1][indx - 1]) + fabsf(rgb[c][indx >> 1] - rgb[c][(indx - 2) >> 1]) + fabsf(rgb[1][indx - 1] - rgb[1][indx - 3])); + float wtr = 1.f / SQR(eps + fabsf(rgb[1][indx - 1] - rgb[1][indx + 1]) + fabsf(rgb[c][indx >> 1] - rgb[c][(indx + 2) >> 1]) + fabsf(rgb[1][indx + 1] - rgb[1][indx + 3])); //store in rgb array the interpolated G value at R/B grid points using directional weighted average rgb[1][indx] = (wtu * rgb[1][indx - v1] + wtd * rgb[1][indx + v1] + wtl * rgb[1][indx - 1] + wtr * rgb[1][indx + 1]) / (wtu + wtd + wtl + wtr); } if (row > -1 && row < height) { - for(int col = max(left + 3, 0), indx = rr * ts + 3 - (left < 0 ? (left+3) : 0); col < min(cc1 + left - 3, width); col++, indx++) { - Gtmp[row * width + col] = rgb[1][indx]; + int offset = (FC(row,max(left + 3, 0)) & 1); + int col = max(left + 3, 0) + offset; + int indx = rr * ts + 3 - (left < 0 ? (left+3) : 0) + offset; +#ifdef __SSE2__ + for(; col < min(cc1 + left - 3, width) - 7; col+=8, indx+=8) { + STVFU(Gtmp[(row * width + col) >> 1], LC2VFU(rgb[1][indx])); + } +#endif + for(; col < min(cc1 + left - 3, width); col+=2, indx+=2) { + Gtmp[(row * width + col) >> 1] = rgb[1][indx]; } } @@ -361,47 +403,53 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const vfloat zd25v = F2V(0.25f); #endif for (int rr = 4; rr < rr1 - 4; rr++) { - int cc = 4 + (FC(rr, 2) & 1), indx = rr * ts + cc, c = FC(rr, cc); + int cc = 4 + (FC(rr, 2) & 1); + int indx = rr * ts + cc; + int c = FC(rr, cc); #ifdef __SSE2__ for (; cc < cc1 - 10; cc += 8, indx += 8) { vfloat rgb1v = LC2VFU(rgb[1][indx]); - vfloat rgbcv = LC2VFU(rgb[c][indx]); - vfloat temp1v = vabsf(vabsf((rgb1v - rgbcv) - (LC2VFU(rgb[1][indx + v4]) - LC2VFU(rgb[c][indx + v4]))) + - vabsf(LC2VFU(rgb[1][indx - v4]) - LC2VFU(rgb[c][indx - v4]) - rgb1v + rgbcv) - - vabsf(LC2VFU(rgb[1][indx - v4]) - LC2VFU(rgb[c][indx - v4]) - LC2VFU(rgb[1][indx + v4]) + LC2VFU(rgb[c][indx + v4]))); + vfloat rgbcv = LVFU(rgb[c][indx >> 1]); + vfloat rgb1mv4 = LC2VFU(rgb[1][indx - v4]); + vfloat rgb1pv4 = LC2VFU(rgb[1][indx + v4]); + vfloat temp1v = vabsf(vabsf((rgb1v - rgbcv) - (rgb1pv4 - LVFU(rgb[c][(indx + v4) >> 1]))) + + vabsf(rgb1mv4 - LVFU(rgb[c][(indx - v4) >> 1]) - rgb1v + rgbcv) - + vabsf(rgb1mv4 - LVFU(rgb[c][(indx - v4) >> 1]) - rgb1pv4 + LVFU(rgb[c][(indx + v4) >> 1]))); STVFU(rbhpfv[indx >> 1], temp1v); - vfloat temp2v = vabsf(vabsf((rgb1v - rgbcv) - (LC2VFU(rgb[1][indx + 4]) - LC2VFU(rgb[c][indx + 4]))) + - vabsf(LC2VFU(rgb[1][indx - 4]) - LC2VFU(rgb[c][indx - 4]) - rgb1v + rgbcv) - - vabsf(LC2VFU(rgb[1][indx - 4]) - LC2VFU(rgb[c][indx - 4]) - LC2VFU(rgb[1][indx + 4]) + LC2VFU(rgb[c][indx + 4]))); + vfloat rgb1m4 = LC2VFU(rgb[1][indx - 4]); + vfloat rgb1p4 = LC2VFU(rgb[1][indx + 4]); + vfloat temp2v = vabsf(vabsf((rgb1v - rgbcv) - (rgb1p4 - LVFU(rgb[c][(indx + 4) >> 1]))) + + vabsf(rgb1m4 - LVFU(rgb[c][(indx - 4) >> 1]) - rgb1v + rgbcv) - + vabsf(rgb1m4 - LVFU(rgb[c][(indx - 4) >> 1]) - rgb1p4 + LVFU(rgb[c][(indx + 4) >> 1]))); STVFU(rbhpfh[indx >> 1], temp2v); //low and high pass 1D filters of G in vertical/horizontal directions rgb1v = vmul2f(rgb1v); - vfloat glpfvv = zd25v * (rgb1v + LC2VFU(rgb[1][indx + v2]) + LC2VFU(rgb[1][indx - v2])); - vfloat glpfhv = zd25v * (rgb1v + LC2VFU(rgb[1][indx + 2]) + LC2VFU(rgb[1][indx - 2])); + vfloat glpfvv = (rgb1v + LC2VFU(rgb[1][indx + v2]) + LC2VFU(rgb[1][indx - v2])); + vfloat glpfhv = (rgb1v + LC2VFU(rgb[1][indx + 2]) + LC2VFU(rgb[1][indx - 2])); rgbcv = vmul2f(rgbcv); - STVFU(rblpfv[indx >> 1], epsv + vabsf(glpfvv - zd25v * (rgbcv + LC2VFU(rgb[c][indx + v2]) + LC2VFU(rgb[c][indx - v2])))); - STVFU(rblpfh[indx >> 1], epsv + vabsf(glpfhv - zd25v * (rgbcv + LC2VFU(rgb[c][indx + 2]) + LC2VFU(rgb[c][indx - 2])))); - STVFU(grblpfv[indx >> 1], glpfvv + zd25v * (rgbcv + LC2VFU(rgb[c][indx + v2]) + LC2VFU(rgb[c][indx - v2]))); - STVFU(grblpfh[indx >> 1], glpfhv + zd25v * (rgbcv + LC2VFU(rgb[c][indx + 2]) + LC2VFU(rgb[c][indx - 2]))); + STVFU(rblpfv[indx >> 1], zd25v * vabsf(glpfvv - (rgbcv + LVFU(rgb[c][(indx + v2) >> 1]) + LVFU(rgb[c][(indx - v2) >> 1])))); + STVFU(rblpfh[indx >> 1], zd25v * vabsf(glpfhv - (rgbcv + LVFU(rgb[c][(indx + 2) >> 1]) + LVFU(rgb[c][(indx - 2) >> 1])))); + STVFU(grblpfv[indx >> 1], zd25v * (glpfvv + (rgbcv + LVFU(rgb[c][(indx + v2) >> 1]) + LVFU(rgb[c][(indx - v2) >> 1])))); + STVFU(grblpfh[indx >> 1], zd25v * (glpfhv + (rgbcv + LVFU(rgb[c][(indx + 2) >> 1]) + LVFU(rgb[c][(indx - 2) >> 1])))); } #endif for (; cc < cc1 - 4; cc += 2, indx += 2) { - rbhpfv[indx >> 1] = fabsf(fabsf((rgb[1][indx] - rgb[c][indx]) - (rgb[1][indx + v4] - rgb[c][indx + v4])) + - fabsf((rgb[1][indx - v4] - rgb[c][indx - v4]) - (rgb[1][indx] - rgb[c][indx])) - - fabsf((rgb[1][indx - v4] - rgb[c][indx - v4]) - (rgb[1][indx + v4] - rgb[c][indx + v4]))); - rbhpfh[indx >> 1] = fabsf(fabsf((rgb[1][indx] - rgb[c][indx]) - (rgb[1][indx + 4] - rgb[c][indx + 4])) + - fabsf((rgb[1][indx - 4] - rgb[c][indx - 4]) - (rgb[1][indx] - rgb[c][indx])) - - fabsf((rgb[1][indx - 4] - rgb[c][indx - 4]) - (rgb[1][indx + 4] - rgb[c][indx + 4]))); + rbhpfv[indx >> 1] = fabsf(fabsf((rgb[1][indx] - rgb[c][indx >> 1]) - (rgb[1][indx + v4] - rgb[c][(indx + v4) >> 1])) + + fabsf((rgb[1][indx - v4] - rgb[c][(indx - v4) >> 1]) - (rgb[1][indx] - rgb[c][indx >> 1])) - + fabsf((rgb[1][indx - v4] - rgb[c][(indx - v4) >> 1]) - (rgb[1][indx + v4] - rgb[c][(indx + v4) >> 1]))); + rbhpfh[indx >> 1] = fabsf(fabsf((rgb[1][indx] - rgb[c][indx >> 1]) - (rgb[1][indx + 4] - rgb[c][(indx + 4) >> 1])) + + fabsf((rgb[1][indx - 4] - rgb[c][(indx - 4) >> 1]) - (rgb[1][indx] - rgb[c][indx >> 1])) - + fabsf((rgb[1][indx - 4] - rgb[c][(indx - 4) >> 1]) - (rgb[1][indx + 4] - rgb[c][(indx + 4) >> 1]))); //low and high pass 1D filters of G in vertical/horizontal directions - float glpfv = 0.25f * (2.f * rgb[1][indx] + rgb[1][indx + v2] + rgb[1][indx - v2]); - float glpfh = 0.25f * (2.f * rgb[1][indx] + rgb[1][indx + 2] + rgb[1][indx - 2]); - rblpfv[indx >> 1] = eps + fabsf(glpfv - 0.25f * (2.f * rgb[c][indx] + rgb[c][indx + v2] + rgb[c][indx - v2])); - rblpfh[indx >> 1] = eps + fabsf(glpfh - 0.25f * (2.f * rgb[c][indx] + rgb[c][indx + 2] + rgb[c][indx - 2])); - grblpfv[indx >> 1] = glpfv + 0.25f * (2.f * rgb[c][indx] + rgb[c][indx + v2] + rgb[c][indx - v2]); - grblpfh[indx >> 1] = glpfh + 0.25f * (2.f * rgb[c][indx] + rgb[c][indx + 2] + rgb[c][indx - 2]); + float glpfv = (2.f * rgb[1][indx] + rgb[1][indx + v2] + rgb[1][indx - v2]); + float glpfh = (2.f * rgb[1][indx] + rgb[1][indx + 2] + rgb[1][indx - 2]); + rblpfv[indx >> 1] = 0.25f * fabsf(glpfv - (2.f * rgb[c][indx >> 1] + rgb[c][(indx + v2) >> 1] + rgb[c][(indx - v2) >> 1])); + rblpfh[indx >> 1] = 0.25f * fabsf(glpfh - (2.f * rgb[c][indx >> 1] + rgb[c][(indx + 2) >> 1] + rgb[c][(indx - 2) >> 1])); + grblpfv[indx >> 1] = 0.25f * (glpfv + (2.f * rgb[c][indx >> 1] + rgb[c][(indx + v2) >> 1] + rgb[c][(indx - v2) >> 1])); + grblpfh[indx >> 1] = 0.25f * (glpfh + (2.f * rgb[c][indx >> 1] + rgb[c][(indx + 2) >> 1] + rgb[c][(indx - 2) >> 1])); } } @@ -414,10 +462,9 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const } #ifdef __SSE2__ - vfloat zd3125v = F2V(0.3125f); - vfloat zd09375v = F2V(0.09375f); + vfloat zd3v = F2V(0.3f); vfloat zd1v = F2V(0.1f); - vfloat zd125v = F2V(0.125f); + vfloat zd5v = F2V(0.5f); #endif // along line segments, find the point along each segment that minimizes the colour variance @@ -439,29 +486,27 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const //solve for the interpolation position that minimizes colour difference variance over the tile //vertical - vfloat gdiffv = zd3125v * (LC2VFU(rgb[1][indx + ts]) - LC2VFU(rgb[1][indx - ts])) + zd09375v * (LC2VFU(rgb[1][indx + ts + 1]) - LC2VFU(rgb[1][indx - ts + 1]) + LC2VFU(rgb[1][indx + ts - 1]) - LC2VFU(rgb[1][indx - ts - 1])); - vfloat deltgrbv = LC2VFU(rgb[c][indx]) - LC2VFU(rgb[1][indx]); + vfloat temp1 = zd3v * (LC2VFU(rgb[1][indx + ts + 1]) - LC2VFU(rgb[1][indx - ts - 1])); + vfloat temp2 = zd3v * (LC2VFU(rgb[1][indx - ts + 1]) - LC2VFU(rgb[1][indx + ts - 1])); + vfloat gdiffvv = (LC2VFU(rgb[1][indx + ts]) - LC2VFU(rgb[1][indx - ts])) + (temp1 - temp2); + vfloat deltgrbv = LVFU(rgb[c][indx >> 1]) - LC2VFU(rgb[1][indx]); - vfloat gradwtv = vabsf(zd25v * LVFU(rbhpfv[indx >> 1]) + zd125v * (LVFU(rbhpfv[(indx >> 1) + 1]) + LVFU(rbhpfv[(indx >> 1) - 1])) ) * (LVFU(grblpfv[(indx >> 1) - v1]) + LVFU(grblpfv[(indx >> 1) + v1])) / (epsv + zd1v * (LVFU(grblpfv[(indx >> 1) - v1]) + LVFU(grblpfv[(indx >> 1) + v1])) + LVFU(rblpfv[(indx >> 1) - v1]) + LVFU(rblpfv[(indx >> 1) + v1])); + vfloat gradwtvv = (LVFU(rbhpfv[indx >> 1]) + zd5v * (LVFU(rbhpfv[(indx >> 1) + 1]) + LVFU(rbhpfv[(indx >> 1) - 1]))) * (LVFU(grblpfv[(indx >> 1) - v1]) + LVFU(grblpfv[(indx >> 1) + v1])) / (epsv + zd1v * (LVFU(grblpfv[(indx >> 1) - v1]) + LVFU(grblpfv[(indx >> 1) + v1])) + LVFU(rblpfv[(indx >> 1) - v1]) + LVFU(rblpfv[(indx >> 1) + v1])); - coeff00v += gradwtv * deltgrbv * deltgrbv; - coeff01v += gradwtv * gdiffv * deltgrbv; - coeff02v += gradwtv * gdiffv * gdiffv; + coeff00v += gradwtvv * deltgrbv * deltgrbv; + coeff01v += gradwtvv * gdiffvv * deltgrbv; + coeff02v += gradwtvv * gdiffvv * gdiffvv; //horizontal - gdiffv = zd3125v * (LC2VFU(rgb[1][indx + 1]) - LC2VFU(rgb[1][indx - 1])) + zd09375v * (LC2VFU(rgb[1][indx + 1 + ts]) - LC2VFU(rgb[1][indx - 1 + ts]) + LC2VFU(rgb[1][indx + 1 - ts]) - LC2VFU(rgb[1][indx - 1 - ts])); + vfloat gdiffhv = (LC2VFU(rgb[1][indx + 1]) - LC2VFU(rgb[1][indx - 1])) + (temp1 + temp2); - gradwtv = vabsf(zd25v * LVFU(rbhpfh[indx >> 1]) + zd125v * (LVFU(rbhpfh[(indx >> 1) + v1]) + LVFU(rbhpfh[(indx >> 1) - v1])) ) * (LVFU(grblpfh[(indx >> 1) - 1]) + LVFU(grblpfh[(indx >> 1) + 1])) / (epsv + zd1v * (LVFU(grblpfh[(indx >> 1) - 1]) + LVFU(grblpfh[(indx >> 1) + 1])) + LVFU(rblpfh[(indx >> 1) - 1]) + LVFU(rblpfh[(indx >> 1) + 1])); + vfloat gradwthv = (LVFU(rbhpfh[indx >> 1]) + zd5v * (LVFU(rbhpfh[(indx >> 1) + v1]) + LVFU(rbhpfh[(indx >> 1) - v1]))) * (LVFU(grblpfh[(indx >> 1) - 1]) + LVFU(grblpfh[(indx >> 1) + 1])) / (epsv + zd1v * (LVFU(grblpfh[(indx >> 1) - 1]) + LVFU(grblpfh[(indx >> 1) + 1])) + LVFU(rblpfh[(indx >> 1) - 1]) + LVFU(rblpfh[(indx >> 1) + 1])); - coeff10v += gradwtv * deltgrbv * deltgrbv; - coeff11v += gradwtv * gdiffv * deltgrbv; - coeff12v += gradwtv * gdiffv * gdiffv; - - // In Mathematica, - // f[x_]=Expand[Total[Flatten[ - // ((1-x) RotateLeft[Gint,shift1]+x RotateLeft[Gint,shift2]-cfapad)^2[[dv;;-1;;2,dh;;-1;;2]]]]]; - // extremum = -.5Coefficient[f[x],x]/Coefficient[f[x],x^2] + coeff10v += gradwthv * deltgrbv * deltgrbv; + coeff11v += gradwthv * gdiffhv * deltgrbv; + coeff12v += gradwthv * gdiffhv * gdiffhv; } + coeff[0][0][c>>1] += vhadd(coeff00v); coeff[0][1][c>>1] += vhadd(coeff01v); coeff[0][2][c>>1] += vhadd(coeff02v); @@ -476,19 +521,19 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const //solve for the interpolation position that minimizes colour difference variance over the tile //vertical - float gdiff = 0.3125f * (rgb[1][indx + ts] - rgb[1][indx - ts]) + 0.09375f * (rgb[1][indx + ts + 1] - rgb[1][indx - ts + 1] + rgb[1][indx + ts - 1] - rgb[1][indx - ts - 1]); - float deltgrb = (rgb[c][indx] - rgb[1][indx]); + float gdiff = (rgb[1][indx + ts] - rgb[1][indx - ts]) + 0.3f * (rgb[1][indx + ts + 1] - rgb[1][indx - ts + 1] + rgb[1][indx + ts - 1] - rgb[1][indx - ts - 1]); + float deltgrb = (rgb[c][indx >> 1] - rgb[1][indx]); - float gradwt = fabsf(0.25f * rbhpfv[indx >> 1] + 0.125f * (rbhpfv[(indx >> 1) + 1] + rbhpfv[(indx >> 1) - 1]) ) * (grblpfv[(indx >> 1) - v1] + grblpfv[(indx >> 1) + v1]) / (eps + 0.1f * (grblpfv[(indx >> 1) - v1] + grblpfv[(indx >> 1) + v1]) + rblpfv[(indx >> 1) - v1] + rblpfv[(indx >> 1) + v1]); + float gradwt = (rbhpfv[indx >> 1] + 0.5f * (rbhpfv[(indx >> 1) + 1] + rbhpfv[(indx >> 1) - 1]) ) * (grblpfv[(indx >> 1) - v1] + grblpfv[(indx >> 1) + v1]) / (eps + 0.1f * (grblpfv[(indx >> 1) - v1] + grblpfv[(indx >> 1) + v1]) + rblpfv[(indx >> 1) - v1] + rblpfv[(indx >> 1) + v1]); coeff[0][0][c>>1] += gradwt * deltgrb * deltgrb; coeff[0][1][c>>1] += gradwt * gdiff * deltgrb; coeff[0][2][c>>1] += gradwt * gdiff * gdiff; //horizontal - gdiff = 0.3125f * (rgb[1][indx + 1] - rgb[1][indx - 1]) + 0.09375f * (rgb[1][indx + 1 + ts] - rgb[1][indx - 1 + ts] + rgb[1][indx + 1 - ts] - rgb[1][indx - 1 - ts]); + gdiff = (rgb[1][indx + 1] - rgb[1][indx - 1]) + 0.3f * (rgb[1][indx + 1 + ts] - rgb[1][indx - 1 + ts] + rgb[1][indx + 1 - ts] - rgb[1][indx - 1 - ts]); - gradwt = fabsf(0.25f * rbhpfh[indx >> 1] + 0.125f * (rbhpfh[(indx >> 1) + v1] + rbhpfh[(indx >> 1) - v1]) ) * (grblpfh[(indx >> 1) - 1] + grblpfh[(indx >> 1) + 1]) / (eps + 0.1f * (grblpfh[(indx >> 1) - 1] + grblpfh[(indx >> 1) + 1]) + rblpfh[(indx >> 1) - 1] + rblpfh[(indx >> 1) + 1]); + gradwt = (rbhpfh[indx >> 1] + 0.5f * (rbhpfh[(indx >> 1) + v1] + rbhpfh[(indx >> 1) - v1]) ) * (grblpfh[(indx >> 1) - 1] + grblpfh[(indx >> 1) + 1]) / (eps + 0.1f * (grblpfh[(indx >> 1) - 1] + grblpfh[(indx >> 1) + 1]) + rblpfh[(indx >> 1) - 1] + rblpfh[(indx >> 1) + 1]); coeff[1][0][c>>1] += gradwt * deltgrb * deltgrb; coeff[1][1][c>>1] += gradwt * gdiff * deltgrb; @@ -501,6 +546,19 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const } } + for (int dir = 0; dir < 2; dir++) { + for (int k = 0; k < 3; k++) { + for (int c = 0; c < 2; c++) { + coeff[dir][k][c] *= 0.25f; + if(k == 1) { + coeff[dir][k][c] *= 0.3125f; + } else if(k == 2) { + coeff[dir][k][c] *= SQR(0.3125f); + } + } + } + } + for (int c = 0; c < 2; c++) { for (int dir = 0; dir < 2; dir++) { // vert/hor @@ -719,26 +777,51 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const // rgb values should be floating point number between 0 and 1 // after white balance multipliers are applied - for (int rr = rrmin; rr < rrmax; rr++) - for (int row = rr + top, cc = ccmin; cc < ccmax; cc++) { - int col = cc + left; +#ifdef __SSE2__ + vfloat c65535v = F2V(65535.f); + vmask gmask = _mm_set_epi32(0, 0xffffffff, 0, 0xffffffff); +#endif + for (int rr = rrmin; rr < rrmax; rr++) { + int row = rr + top; + int cc = ccmin; + int col = cc + left; + int indx = row * width + col; + int indx1 = rr * ts + cc; +#ifdef __SSE2__ + int c = FC(rr, cc); + if(c & 1) { + rgb[1][indx1] = rawData[row][col] / 65535.f; + indx++; + indx1++; + cc++; + col++; + c = FC(rr, cc); + } + for (; cc < ccmax - 7; cc += 8, col += 8, indx += 8, indx1 += 8) { + vfloat val1v = LVFU(rawData[row][col]) / c65535v; + vfloat val2v = LVFU(rawData[row][col + 4]) / c65535v; + STVFU(rgb[c][indx1 >> 1], _mm_shuffle_ps(val1v, val2v, _MM_SHUFFLE(2, 0, 2, 0))); + vfloat gtmpv = LVFU(Gtmp[indx >> 1]); + STVFU(rgb[1][indx1], vself(gmask, PERMUTEPS(gtmpv, _MM_SHUFFLE(1, 1, 0, 0)), val1v)); + STVFU(rgb[1][indx1 + 4], vself(gmask, PERMUTEPS(gtmpv, _MM_SHUFFLE(3, 3, 2, 2)), val2v)); + } +#endif + for (; cc < ccmax; cc++, col++, indx++, indx1++) { int c = FC(rr, cc); - int indx = row * width + col; - int indx1 = rr * ts + cc; - rgb[c][indx1] = (rawData[row][col]) / 65535.0f; + rgb[c][indx1 >> ((c & 1) ^ 1)] = rawData[row][col] / 65535.f; if ((c & 1) == 0) { - rgb[1][indx1] = Gtmp[indx]; + rgb[1][indx1] = Gtmp[indx >> 1]; } } - + } // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //fill borders if (rrmin > 0) { for (int rr = 0; rr < border; rr++) for (int cc = ccmin; cc < ccmax; cc++) { int c = FC(rr, cc); - rgb[c][rr * ts + cc] = rgb[c][(border2 - rr) * ts + cc]; + rgb[c][(rr * ts + cc) >> ((c & 1) ^ 1)] = rgb[c][((border2 - rr) * ts + cc) >> ((c & 1) ^ 1)]; rgb[1][rr * ts + cc] = rgb[1][(border2 - rr) * ts + cc]; } } @@ -747,8 +830,10 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = ccmin; cc < ccmax; cc++) { int c = FC(rr, cc); - rgb[c][(rrmax + rr)*ts + cc] = (rawData[(height - rr - 2)][left + cc]) / 65535.0f; - rgb[1][(rrmax + rr)*ts + cc] = Gtmp[(height - rr - 2) * width + left + cc]; + rgb[c][((rrmax + rr)*ts + cc) >> ((c & 1) ^ 1)] = (rawData[(height - rr - 2)][left + cc]) / 65535.f; + if ((c & 1) == 0) { + rgb[1][(rrmax + rr)*ts + cc] = Gtmp[((height - rr - 2) * width + left + cc) >> 1]; + } } } @@ -756,7 +841,7 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = rrmin; rr < rrmax; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][rr * ts + cc] = rgb[c][rr * ts + border2 - cc]; + rgb[c][(rr * ts + cc) >> ((c & 1) ^ 1)] = rgb[c][(rr * ts + border2 - cc) >> ((c & 1) ^ 1)]; rgb[1][rr * ts + cc] = rgb[1][rr * ts + border2 - cc]; } } @@ -765,8 +850,10 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = rrmin; rr < rrmax; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][rr * ts + ccmax + cc] = (rawData[(top + rr)][(width - cc - 2)]) / 65535.0f; - rgb[1][rr * ts + ccmax + cc] = Gtmp[(top + rr) * width + (width - cc - 2)]; + rgb[c][(rr * ts + ccmax + cc) >> ((c & 1) ^ 1)] = (rawData[(top + rr)][(width - cc - 2)]) / 65535.f; + if ((c & 1) == 0) { + rgb[1][rr * ts + ccmax + cc] = Gtmp[((top + rr) * width + (width - cc - 2)) >> 1]; + } } } @@ -775,8 +862,10 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rr)*ts + cc] = (rawData[border2 - rr][border2 - cc]) / 65535.0f; - rgb[1][(rr)*ts + cc] = Gtmp[(border2 - rr) * width + border2 - cc]; + rgb[c][(rr * ts + cc) >> ((c & 1) ^ 1)] = (rawData[border2 - rr][border2 - cc]) / 65535.f; + if ((c & 1) == 0) { + rgb[1][rr * ts + cc] = Gtmp[((border2 - rr) * width + border2 - cc) >> 1]; + } } } @@ -784,8 +873,10 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rrmax + rr)*ts + ccmax + cc] = (rawData[(height - rr - 2)][(width - cc - 2)]) / 65535.0f; - rgb[1][(rrmax + rr)*ts + ccmax + cc] = Gtmp[(height - rr - 2) * width + (width - cc - 2)]; + rgb[c][((rrmax + rr)*ts + ccmax + cc) >> ((c & 1) ^ 1)] = (rawData[(height - rr - 2)][(width - cc - 2)]) / 65535.f; + if ((c & 1) == 0) { + rgb[1][(rrmax + rr)*ts + ccmax + cc] = Gtmp[((height - rr - 2) * width + (width - cc - 2)) >> 1]; + } } } @@ -793,8 +884,10 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rr)*ts + ccmax + cc] = (rawData[(border2 - rr)][(width - cc - 2)]) / 65535.0f; - rgb[1][(rr)*ts + ccmax + cc] = Gtmp[(border2 - rr) * width + (width - cc - 2)]; + rgb[c][(rr * ts + ccmax + cc) >> ((c & 1) ^ 1)] = (rawData[(border2 - rr)][(width - cc - 2)]) / 65535.f; + if ((c & 1) == 0) { + rgb[1][rr * ts + ccmax + cc] = Gtmp[((border2 - rr) * width + (width - cc - 2)) >> 1]; + } } } @@ -802,8 +895,10 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 0; rr < border; rr++) for (int cc = 0; cc < border; cc++) { int c = FC(rr, cc); - rgb[c][(rrmax + rr)*ts + cc] = (rawData[(height - rr - 2)][(border2 - cc)]) / 65535.0f; - rgb[1][(rrmax + rr)*ts + cc] = Gtmp[(height - rr - 2) * width + (border2 - cc)]; + rgb[c][((rrmax + rr)*ts + cc) >> ((c & 1) ^ 1)] = (rawData[(height - rr - 2)][(border2 - cc)]) / 65535.f; + if ((c & 1) == 0) { + rgb[1][(rrmax + rr)*ts + cc] = Gtmp[((height - rr - 2) * width + (border2 - cc)) >> 1]; + } } } @@ -813,24 +908,20 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const if (!autoCA) { //manual CA correction; use red/blue slider values to set CA shift parameters for (int rr = 3; rr < rr1 - 3; rr++) - for (int row = rr + top, cc = 3, indx = rr * ts + cc; cc < cc1 - 3; cc++, indx++) { - int col = cc + left; + for (int cc = 3, indx = rr * ts + cc; cc < cc1 - 3; cc++, indx++) { int c = FC(rr, cc); if (c != 1) { //compute directional weights using image gradients - float wtu = 1.0 / SQR(eps + fabsf(rgb[1][(rr + 1) * ts + cc] - rgb[1][(rr - 1) * ts + cc]) + fabsf(rgb[c][(rr) * ts + cc] - rgb[c][(rr - 2) * ts + cc]) + fabsf(rgb[1][(rr - 1) * ts + cc] - rgb[1][(rr - 3) * ts + cc])); - float wtd = 1.0 / SQR(eps + fabsf(rgb[1][(rr - 1) * ts + cc] - rgb[1][(rr + 1) * ts + cc]) + fabsf(rgb[c][(rr) * ts + cc] - rgb[c][(rr + 2) * ts + cc]) + fabsf(rgb[1][(rr + 1) * ts + cc] - rgb[1][(rr + 3) * ts + cc])); - float wtl = 1.0 / SQR(eps + fabsf(rgb[1][(rr) * ts + cc + 1] - rgb[1][(rr) * ts + cc - 1]) + fabsf(rgb[c][(rr) * ts + cc] - rgb[c][(rr) * ts + cc - 2]) + fabsf(rgb[1][(rr) * ts + cc - 1] - rgb[1][(rr) * ts + cc - 3])); - float wtr = 1.0 / SQR(eps + fabsf(rgb[1][(rr) * ts + cc - 1] - rgb[1][(rr) * ts + cc + 1]) + fabsf(rgb[c][(rr) * ts + cc] - rgb[c][(rr) * ts + cc + 2]) + fabsf(rgb[1][(rr) * ts + cc + 1] - rgb[1][(rr) * ts + cc + 3])); + float wtu = 1.f / SQR(eps + fabsf(rgb[1][(rr + 1) * ts + cc] - rgb[1][(rr - 1) * ts + cc]) + fabsf(rgb[c][(rr * ts + cc) >> 1] - rgb[c][((rr - 2) * ts + cc) >> 1]) + fabsf(rgb[1][(rr - 1) * ts + cc] - rgb[1][(rr - 3) * ts + cc])); + float wtd = 1.f / SQR(eps + fabsf(rgb[1][(rr - 1) * ts + cc] - rgb[1][(rr + 1) * ts + cc]) + fabsf(rgb[c][(rr * ts + cc) >> 1] - rgb[c][((rr + 2) * ts + cc) >> 1]) + fabsf(rgb[1][(rr + 1) * ts + cc] - rgb[1][(rr + 3) * ts + cc])); + float wtl = 1.f / SQR(eps + fabsf(rgb[1][rr * ts + cc + 1] - rgb[1][rr * ts + cc - 1]) + fabsf(rgb[c][(rr * ts + cc) >> 1] - rgb[c][(rr * ts + cc - 2) >> 1]) + fabsf(rgb[1][rr * ts + cc - 1] - rgb[1][rr * ts + cc - 3])); + float wtr = 1.f / SQR(eps + fabsf(rgb[1][rr * ts + cc - 1] - rgb[1][rr * ts + cc + 1]) + fabsf(rgb[c][(rr * ts + cc) >> 1] - rgb[c][(rr * ts + cc + 2) >> 1]) + fabsf(rgb[1][rr * ts + cc + 1] - rgb[1][rr * ts + cc + 3])); //store in rgb array the interpolated G value at R/B grid points using directional weighted average rgb[1][indx] = (wtu * rgb[1][indx - v1] + wtd * rgb[1][indx + v1] + wtl * rgb[1][indx - 1] + wtr * rgb[1][indx + 1]) / (wtu + wtd + wtl + wtr); } - if (row > -1 && row < height && col > -1 && col < width) { - Gtmp[row * width + col] = rgb[1][indx]; - } } float hfrac = -((float)(hblock - 0.5) / (hblsz - 2) - 0.5); @@ -884,34 +975,39 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const for (int rr = 4; rr < rr1 - 4; rr++) { int cc = 4 + (FC(rr, 2) & 1); int c = FC(rr, cc); + int indx = (rr * ts + cc) >> 1; + int indxfc = (rr + shiftvfloor[c]) * ts + cc + shifthceil[c]; + int indxff = (rr + shiftvfloor[c]) * ts + cc + shifthfloor[c]; + int indxcc = (rr + shiftvceil[c]) * ts + cc + shifthceil[c]; + int indxcf = (rr + shiftvceil[c]) * ts + cc + shifthfloor[c]; #ifdef __SSE2__ vfloat shifthfracv = F2V(shifthfrac[c]); vfloat shiftvfracv = F2V(shiftvfrac[c]); - for (; cc < cc1 - 10; cc += 8) { + for (; cc < cc1 - 10; cc += 8, indxfc += 8, indxff += 8, indxcc += 8, indxcf += 8, indx += 4) { //perform CA correction using colour ratios or colour differences - vfloat Ginthfloorv = vintpf(shifthfracv, LC2VFU(rgb[1][(rr + shiftvfloor[c]) * ts + cc + shifthceil[c]]), LC2VFU(rgb[1][(rr + shiftvfloor[c]) * ts + cc + shifthfloor[c]])); - vfloat Ginthceilv = vintpf(shifthfracv, LC2VFU(rgb[1][(rr + shiftvceil[c]) * ts + cc + shifthceil[c]]), LC2VFU(rgb[1][(rr + shiftvceil[c]) * ts + cc + shifthfloor[c]])); + vfloat Ginthfloorv = vintpf(shifthfracv, LC2VFU(rgb[1][indxfc]), LC2VFU(rgb[1][indxff])); + vfloat Ginthceilv = vintpf(shifthfracv, LC2VFU(rgb[1][indxcc]), LC2VFU(rgb[1][indxcf])); //Gint is bilinear interpolation of G at CA shift point vfloat Gintv = vintpf(shiftvfracv, Ginthceilv, Ginthfloorv); //determine R/B at grid points using colour differences at shift point plus interpolated G value at grid point //but first we need to interpolate G-R/G-B to grid points... - STVFU(grbdiff[((rr)*ts + cc) >> 1], Gintv - LC2VFU(rgb[c][(rr) * ts + cc])); - STVFU(gshift[((rr)*ts + cc) >> 1], Gintv); + STVFU(grbdiff[indx], Gintv - LVFU(rgb[c][indx])); + STVFU(gshift[indx], Gintv); } #endif - for (; cc < cc1 - 4; cc += 2) { + for (; cc < cc1 - 4; cc += 2, indxfc += 2, indxff += 2, indxcc += 2, indxcf += 2, ++indx) { //perform CA correction using colour ratios or colour differences - float Ginthfloor = intp(shifthfrac[c], rgb[1][(rr + shiftvfloor[c]) * ts + cc + shifthceil[c]], rgb[1][(rr + shiftvfloor[c]) * ts + cc + shifthfloor[c]]); - float Ginthceil = intp(shifthfrac[c], rgb[1][(rr + shiftvceil[c]) * ts + cc + shifthceil[c]], rgb[1][(rr + shiftvceil[c]) * ts + cc + shifthfloor[c]]); + float Ginthfloor = intp(shifthfrac[c], rgb[1][indxfc], rgb[1][indxff]); + float Ginthceil = intp(shifthfrac[c], rgb[1][indxcc], rgb[1][indxcf]); //Gint is bilinear interpolation of G at CA shift point float Gint = intp(shiftvfrac[c], Ginthceil, Ginthfloor); //determine R/B at grid points using colour differences at shift point plus interpolated G value at grid point //but first we need to interpolate G-R/G-B to grid points... - grbdiff[((rr)*ts + cc) >> 1] = Gint - rgb[c][(rr) * ts + cc]; - gshift[((rr)*ts + cc) >> 1] = Gint; + grbdiff[indx] = Gint - rgb[c][indx]; + gshift[indx] = Gint; } } @@ -920,54 +1016,105 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const shiftvfrac[0] /= 2.f; shiftvfrac[2] /= 2.f; - // this loop does not deserve vectorization in mainly because the most expensive part with the divisions does not happen often (less than 1/10 in my tests) - for (int rr = 8; rr < rr1 - 8; rr++) - for (int cc = 8 + (FC(rr, 2) & 1), c = FC(rr, cc), indx = rr * ts + cc; cc < cc1 - 8; cc += 2, indx += 2) { +#ifdef __SSE2__ + vfloat zd25v = F2V(0.25f); + vfloat onev = F2V(1.f); + vfloat zd5v = F2V(0.5f); + vfloat epsv = F2V(eps); +#endif + for (int rr = 8; rr < rr1 - 8; rr++) { + int cc = 8 + (FC(rr, 2) & 1); + int c = FC(rr, cc); + int GRBdir0 = GRBdir[0][c]; + int GRBdir1 = GRBdir[1][c]; + vfloat shifthfracc = F2V(shifthfrac[c]); + vfloat shiftvfracc = F2V(shiftvfrac[c]); +#ifdef __SSE2__ + for (int indx = rr * ts + cc; cc < cc1 - 14; cc += 8, indx += 8) { + //interpolate colour difference from optical R/B locations to grid locations + vfloat grbdiffinthfloor = vintpf(shifthfracc, LVFU(grbdiff[(indx - GRBdir1) >> 1]), LVFU(grbdiff[indx >> 1])); + vfloat grbdiffinthceil = vintpf(shifthfracc, LVFU(grbdiff[((rr - GRBdir0) * ts + cc - GRBdir1) >> 1]), LVFU(grbdiff[((rr - GRBdir0) * ts + cc) >> 1])); + //grbdiffint is bilinear interpolation of G-R/G-B at grid point + vfloat grbdiffint = vintpf(shiftvfracc, grbdiffinthceil, grbdiffinthfloor); - float grbdiffold = rgb[1][indx] - rgb[c][indx]; + //now determine R/B at grid points using interpolated colour differences and interpolated G value at grid point + vfloat cinv = LVFU(rgb[c][indx >> 1]); + vfloat rinv = LC2VFU(rgb[1][indx]); + vfloat RBint = rinv - grbdiffint; + vmask cmask = vmaskf_ge(vabsf(RBint - cinv), zd25v * (RBint + cinv)); + if(_mm_movemask_ps((vfloat)cmask)) { + // if for any of the 4 pixels the condition is true, do the math for all 4 pixels and mask the unused out at the end + //gradient weights using difference from G at CA shift points and G at grid points + vfloat p0 = onev / (epsv + vabsf(rinv - LVFU(gshift[indx >> 1]))); + vfloat p1 = onev / (epsv + vabsf(rinv - LVFU(gshift[(indx - GRBdir1) >> 1]))); + vfloat p2 = onev / (epsv + vabsf(rinv - LVFU(gshift[((rr - GRBdir0) * ts + cc) >> 1]))); + vfloat p3 = onev / (epsv + vabsf(rinv - LVFU(gshift[((rr - GRBdir0) * ts + cc - GRBdir1) >> 1]))); + + grbdiffint = vself(cmask, (p0 * LVFU(grbdiff[indx >> 1]) + p1 * LVFU(grbdiff[(indx - GRBdir1) >> 1]) + + p2 * LVFU(grbdiff[((rr - GRBdir0) * ts + cc) >> 1]) + p3 * LVFU(grbdiff[((rr - GRBdir0) * ts + cc - GRBdir1) >> 1])) / (p0 + p1 + p2 + p3), grbdiffint); + + } + vfloat grbdiffold = rinv - cinv; + RBint = rinv - grbdiffint; + RBint = vself(vmaskf_gt(vabsf(grbdiffold), vabsf(grbdiffint)), RBint, cinv); + RBint = vself(vmaskf_lt(grbdiffold * grbdiffint, ZEROV), rinv - zd5v * (grbdiffold + grbdiffint), RBint); + STVFU(rgb[c][indx >> 1], RBint); + } +#endif + for (int c = FC(rr, cc), indx = rr * ts + cc; cc < cc1 - 8; cc += 2, indx += 2) { + float grbdiffold = rgb[1][indx] - rgb[c][indx >> 1]; //interpolate colour difference from optical R/B locations to grid locations - float grbdiffinthfloor = intp(shifthfrac[c], grbdiff[(indx - GRBdir[1][c]) >> 1], grbdiff[indx >> 1]); - float grbdiffinthceil = intp(shifthfrac[c], grbdiff[((rr - GRBdir[0][c]) * ts + cc - GRBdir[1][c]) >> 1], grbdiff[((rr - GRBdir[0][c]) * ts + cc) >> 1]); + float grbdiffinthfloor = intp(shifthfrac[c], grbdiff[(indx - GRBdir1) >> 1], grbdiff[indx >> 1]); + float grbdiffinthceil = intp(shifthfrac[c], grbdiff[((rr - GRBdir0) * ts + cc - GRBdir1) >> 1], grbdiff[((rr - GRBdir0) * ts + cc) >> 1]); //grbdiffint is bilinear interpolation of G-R/G-B at grid point float grbdiffint = intp(shiftvfrac[c], grbdiffinthceil, grbdiffinthfloor); //now determine R/B at grid points using interpolated colour differences and interpolated G value at grid point float RBint = rgb[1][indx] - grbdiffint; - if (fabsf(RBint - rgb[c][indx]) < 0.25f * (RBint + rgb[c][indx])) { + if (fabsf(RBint - rgb[c][indx >> 1]) < 0.25f * (RBint + rgb[c][indx >> 1])) { if (fabsf(grbdiffold) > fabsf(grbdiffint) ) { - rgb[c][indx] = RBint; + rgb[c][indx >> 1] = RBint; } } else { //gradient weights using difference from G at CA shift points and G at grid points - float p0 = 1.0f / (eps + fabsf(rgb[1][indx] - gshift[indx >> 1])); - float p1 = 1.0f / (eps + fabsf(rgb[1][indx] - gshift[(indx - GRBdir[1][c]) >> 1])); - float p2 = 1.0f / (eps + fabsf(rgb[1][indx] - gshift[((rr - GRBdir[0][c]) * ts + cc) >> 1])); - float p3 = 1.0f / (eps + fabsf(rgb[1][indx] - gshift[((rr - GRBdir[0][c]) * ts + cc - GRBdir[1][c]) >> 1])); + float p0 = 1.f / (eps + fabsf(rgb[1][indx] - gshift[indx >> 1])); + float p1 = 1.f / (eps + fabsf(rgb[1][indx] - gshift[(indx - GRBdir1) >> 1])); + float p2 = 1.f / (eps + fabsf(rgb[1][indx] - gshift[((rr - GRBdir0) * ts + cc) >> 1])); + float p3 = 1.f / (eps + fabsf(rgb[1][indx] - gshift[((rr - GRBdir0) * ts + cc - GRBdir1) >> 1])); - grbdiffint = (p0 * grbdiff[indx >> 1] + p1 * grbdiff[(indx - GRBdir[1][c]) >> 1] + - p2 * grbdiff[((rr - GRBdir[0][c]) * ts + cc) >> 1] + p3 * grbdiff[((rr - GRBdir[0][c]) * ts + cc - GRBdir[1][c]) >> 1]) / (p0 + p1 + p2 + p3) ; + grbdiffint = (p0 * grbdiff[indx >> 1] + p1 * grbdiff[(indx - GRBdir1) >> 1] + + p2 * grbdiff[((rr - GRBdir0) * ts + cc) >> 1] + p3 * grbdiff[((rr - GRBdir0) * ts + cc - GRBdir1) >> 1]) / (p0 + p1 + p2 + p3) ; //now determine R/B at grid points using interpolated colour differences and interpolated G value at grid point if (fabsf(grbdiffold) > fabsf(grbdiffint) ) { - rgb[c][indx] = rgb[1][indx] - grbdiffint; + rgb[c][indx >> 1] = rgb[1][indx] - grbdiffint; } } //if colour difference interpolation overshot the correction, just desaturate if (grbdiffold * grbdiffint < 0) { - rgb[c][indx] = rgb[1][indx] - 0.5f * (grbdiffold + grbdiffint); + rgb[c][indx >> 1] = rgb[1][indx] - 0.5f * (grbdiffold + grbdiffint); } } + } // copy CA corrected results to temporary image matrix for (int rr = border; rr < rr1 - border; rr++) { int c = FC(rr + top, left + border + (FC(rr + top, 2) & 1)); - - for (int row = rr + top, cc = border + (FC(rr, 2) & 1), indx = (row * width + cc + left) >> 1; cc < cc1 - border; cc += 2, indx++) { - RawDataTmp[indx] = 65535.0f * rgb[c][(rr) * ts + cc]; + int row = rr + top; + int cc = border + (FC(rr, 2) & 1); + int indx = (row * width + cc + left) >> 1; + int indx1 = (rr * ts + cc) >> 1; +#ifdef __SSE2__ + for (; indx < (row * width + cc1 - border - 7 + left) >> 1; indx+=4, indx1 += 4) { + STVFU(RawDataTmp[indx], c65535v * LVFU(rgb[c][indx1])); + } +#endif + for (; indx < (row * width + cc1 - border + left) >> 1; indx++, indx1++) { + RawDataTmp[indx] = 65535.f * rgb[c][indx1]; } } @@ -993,17 +1140,23 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const // copy temporary image matrix back to image matrix #pragma omp for - for(int row = 0; row < height; row++) - for(int col = 0 + (FC(row, 0) & 1), indx = (row * width + col) >> 1; col < width; col += 2, indx++) { + for(int row = 0; row < height; row++) { + int col = FC(row, 0) & 1; + int indx = (row * width + col) >> 1; +#ifdef __SSE2__ + for(; col < width - 7; col += 8, indx += 4) { + STC2VFU(rawData[row][col], LVFU(RawDataTmp[indx])); + } +#endif + for(; col < width; col += 2, indx++) { rawData[row][col] = RawDataTmp[indx]; } + } } // clean up free(buffer); - - } free(Gtmp); From 6d44b6e79d1d9fa8d83e8202231e31454f09d683 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Fri, 18 Aug 2017 13:29:21 +0200 Subject: [PATCH 020/126] TP_COLORAPP_ review --- rtdata/languages/default | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index bdd1c9c3b..efe159340 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1277,10 +1277,10 @@ TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Ed TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. TP_COLORAPP_ADAPTSCENE;Scene absolute luminance -TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) -TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. TP_COLORAPP_ALGO;Algorithm TP_COLORAPP_ALGO_ALL;All TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1300,8 +1300,8 @@ TP_COLORAPP_CHROMA_TOOLTIP;Chroma in CIECAM02 differs from L*a*b* and RGB chroma TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation TP_COLORAPP_CONTRAST;Contrast (J) TP_COLORAPP_CONTRAST_Q;Contrast (Q) -TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. TP_COLORAPP_CURVEEDITOR1;Tone curve 1 TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1328,7 +1328,7 @@ TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's TP_COLORAPP_NEUTRAL;Reset TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values TP_COLORAPP_RSTPRO;Red & skin-tones protection -TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. TP_COLORAPP_SHARPCIE;--unused-- TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- TP_COLORAPP_SURROUND;Surround @@ -1352,8 +1352,8 @@ TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] TP_COLORAPP_WBRT;WB [RT] + [output] -TP_COLORAPP_YB;Yb%(mean luminance) -TP_COLORAPP_YBSCENE;Yb%(mean luminance) +TP_COLORAPP_YB;Yb% (mean luminance) +TP_COLORAPP_YBSCENE;Yb% (mean luminance) TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance TP_COLORTONING_AB;o C/L TP_COLORTONING_AUTOSAT;Automatic From 1cb222efbda3f4a52fc5e2a0c84d4dde7bea2353 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 19 Aug 2017 11:15:17 +0200 Subject: [PATCH 021/126] Add 2 history msg --- rtdata/languages/default | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtdata/languages/default b/rtdata/languages/default index 9ba56bc76..0a34c86f6 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -713,6 +713,8 @@ HISTORY_MSG_479;CAM02 - CAT02 adaptation out HISTORY_MSG_480;CAM02 - Automatic CAT02 out HISTORY_MSG_481;CAM02 - Temp scene HISTORY_MSG_482;CAM02 - Green scene +HISTORY_MSG_483;CAM02 - Yb scene +HISTORY_MSG_484;CAM02 - Auto Yb scene HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot From 7394aa3806a9503ddaae0018d417b01448e4e4b0 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sat, 19 Aug 2017 15:12:24 +0200 Subject: [PATCH 022/126] Fix issue #4019 --- rtdata/themes/RawTherapee-GTK3-20_.css | 2 +- rtgui/curveeditor.cc | 2 +- rtgui/curveeditorgroup.cc | 2 +- rtgui/popupcommon.cc | 7 +++++-- rtgui/popupcommon.h | 12 ++++++++++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index f661198af..ff780a4e3 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -189,7 +189,7 @@ button { } /* Curve mode buttons and drop-downs */ -button:checked.Left, button:checked.Left + button { +button:checked.Left { background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); background-color: #585858; } diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc index f8beff547..9f2dbffab 100644 --- a/rtgui/curveeditor.cc +++ b/rtgui/curveeditor.cc @@ -217,7 +217,7 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd curveType->set_tooltip_text(M("CURVEEDITOR_TYPE")); // TODO: Does this signal have to be blocked when on curve type change ? curveType->signal_toggled().connect ( sigc::mem_fun(*this, &CurveEditor::curveTypeToggled) ); - typeconn = curveType->signal_changed().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) ); + typeconn = curveType->signal_item_selected().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) ); } void CurveEditor::setCurve (const std::vector& p) diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index 29c8f5f84..e8f636f8b 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -194,7 +194,7 @@ void CurveEditorGroup::curveListComplete() */ void CurveEditorGroup::typeSelectionChanged (CurveEditor* ce, int n) { - // Same type : do nothing + // Same curve and same type : do nothing if (ce == displayedCurve && n == (int)ce->selected) { return; } diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index 47d9efe66..c79c69011 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -100,9 +100,12 @@ bool PopUpCommon::addEntry (const Glib::ustring& fileName, const Glib::ustring& void PopUpCommon::entrySelected (int i) { - // Emit a a signal if the selected item has changed + // Emit a signal if the selected item has changed if (setSelected (i)) - message (selected); + messageChanged (selected); + + // Emit a signal in all case (i.e. propagate the signal_activate event) + messageItemSelected (selected); } void PopUpCommon::setItemSensitivity (int index, bool isSensitive) { diff --git a/rtgui/popupcommon.h b/rtgui/popupcommon.h index 8875f402e..f4bdb581f 100644 --- a/rtgui/popupcommon.h +++ b/rtgui/popupcommon.h @@ -42,7 +42,9 @@ class PopUpCommon public: typedef sigc::signal type_signal_changed; + typedef sigc::signal type_signal_item_selected; type_signal_changed signal_changed(); + type_signal_item_selected signal_item_selected(); Gtk::Grid* buttonGroup; // this is the widget to be packed PopUpCommon (Gtk::Button* button, const Glib::ustring& label = ""); @@ -57,7 +59,8 @@ public: void setItemSensitivity (int i, bool isSensitive); private: - type_signal_changed message; + type_signal_changed messageChanged; + type_signal_item_selected messageItemSelected; std::vector imageFilenames; std::vector images; @@ -78,7 +81,12 @@ protected: inline PopUpCommon::type_signal_changed PopUpCommon::signal_changed () { - return message; + return messageChanged; +} + +inline PopUpCommon::type_signal_item_selected PopUpCommon::signal_item_selected () +{ + return messageItemSelected; } inline int PopUpCommon::getEntryCount () const From 87b84b3c7bb6b062f45700366a6a31f13501e297 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 19 Aug 2017 15:36:38 +0200 Subject: [PATCH 023/126] Reworded DCP tooltips and generateTranslationDiffs --- rtdata/languages/Catala | 40 +++++++++++------- rtdata/languages/Chinese (Simplified) | 42 ++++++++++++------- rtdata/languages/Chinese (Traditional) | 42 ++++++++++++------- rtdata/languages/Czech | 14 ++++++- rtdata/languages/Dansk | 42 ++++++++++++------- rtdata/languages/Deutsch | 14 ++++++- rtdata/languages/English (UK) | 42 ++++++++++++------- rtdata/languages/English (US) | 42 ++++++++++++------- rtdata/languages/Espanol | 20 +++++++-- rtdata/languages/Euskara | 42 ++++++++++++------- rtdata/languages/Francais | 14 ++++++- rtdata/languages/Greek | 42 ++++++++++++------- rtdata/languages/Hebrew | 42 ++++++++++++------- rtdata/languages/Italiano | 20 +++++++-- rtdata/languages/Japanese | 14 ++++++- rtdata/languages/Latvian | 42 ++++++++++++------- rtdata/languages/Magyar | 42 ++++++++++++------- rtdata/languages/Nederlands | 14 ++++++- rtdata/languages/Norsk BM | 42 ++++++++++++------- rtdata/languages/Polish | 20 +++++++-- rtdata/languages/Polish (Latin Characters) | 20 +++++++-- rtdata/languages/Portugues (Brasil) | 42 ++++++++++++------- rtdata/languages/Russian | 26 ++++++++---- rtdata/languages/Serbian (Cyrilic Characters) | 22 +++++++--- rtdata/languages/Serbian (Latin Characters) | 22 +++++++--- rtdata/languages/Slovak | 42 ++++++++++++------- rtdata/languages/Suomi | 42 ++++++++++++------- rtdata/languages/Swedish | 18 ++++++-- rtdata/languages/Turkish | 42 ++++++++++++------- rtdata/languages/default | 10 ++--- 30 files changed, 633 insertions(+), 285 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 19d1ac3b2..ff700b720 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1308,6 +1308,12 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1562,11 +1568,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1586,8 +1592,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1598,6 +1604,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1609,9 +1616,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1630,11 +1639,14 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1767,15 +1779,15 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. !TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 4a9120abb..2fd87fe5e 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1226,6 +1226,12 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1503,11 +1509,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1527,8 +1533,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1539,6 +1545,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1547,9 +1554,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_LABEL_SCENE;Scene Conditions !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1562,11 +1571,14 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_TCMODE_LABEL1;Curve mode 1 !TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1701,17 +1713,17 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. !TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1721,7 +1733,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_LABCURVE_CHROMA_TOOLTIP;To apply B&W toning, set Chromaticity to -100. !TP_LABCURVE_CURVEEDITOR_A_RANGE1;Green Saturated !TP_LABCURVE_CURVEEDITOR_A_RANGE2;Green Pastel diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index e2d457c14..61a805d6c 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -966,6 +966,12 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1363,11 +1369,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1387,8 +1393,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1399,6 +1405,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1410,9 +1417,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1431,11 +1440,14 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1625,17 +1637,17 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1649,7 +1661,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index d9646626c..31b2255bb 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2174,8 +2174,20 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !PREFERENCES_D50_OLD;5000K !PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_LANG;Language !PREFERENCES_THEME;Theme -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index fc4451910..de3163d21 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -962,6 +962,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1361,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1385,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1397,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1408,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1429,11 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1623,17 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1647,7 +1659,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 48218cc8d..346cdf264 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -2194,8 +2194,20 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !PREFERENCES_D50_OLD;5000K !PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_LANG;Language !PREFERENCES_THEME;Theme -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index de265b960..85d44e3ea 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -790,6 +790,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1325,11 +1331,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Editor Tabs Mode,\nAlt-[ - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1345,8 +1351,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1355,6 +1361,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1365,9 +1372,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1384,11 +1393,14 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1585,17 +1597,17 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERA;Camera standard !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCUSTOM;Custom @@ -1611,7 +1623,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_ICM_WORKINGPROFILE;Working Profile !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 2f32e4419..801f34603 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -710,6 +710,12 @@ !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1275,11 +1281,11 @@ !TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Editor Tabs Mode,\nAlt-[ - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1299,8 +1305,8 @@ !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1311,6 +1317,7 @@ !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1322,9 +1329,11 @@ !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1343,11 +1352,14 @@ !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1564,17 +1576,17 @@ !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERA;Camera standard !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. @@ -1596,7 +1608,7 @@ !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_ICM_WORKINGPROFILE;Working Profile !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 057c30f88..7fd2b54ab 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1701,6 +1701,12 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1833,7 +1839,13 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 @@ -1879,11 +1891,11 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index bc7f738f4..94c651b08 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -962,6 +962,12 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1361,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1385,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1397,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1408,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1429,11 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1623,17 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1647,7 +1659,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 9d9f32b3b..0e590543c 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -2136,8 +2136,20 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !PREFERENCES_D50_OLD;5000K !PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_LANG;Language !PREFERENCES_THEME;Theme -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index ec127d7cd..f3dbcca91 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -961,6 +961,12 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1360,11 +1366,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1384,8 +1390,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1396,6 +1402,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1407,9 +1414,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1428,11 +1437,14 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1622,17 +1634,17 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1646,7 +1658,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index 9dc402fd7..d7821b45c 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -962,6 +962,12 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1361,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1385,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1397,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1408,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1429,11 +1438,14 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1623,17 +1635,17 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1647,7 +1659,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index d26005bfa..2f993423b 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1574,6 +1574,12 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1704,7 +1710,13 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1806,11 +1818,11 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 1ce714311..fdd5baad7 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1952,6 +1952,12 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -2014,7 +2020,13 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_DIRPYRDENOISE_3X3;3×3 !TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft !TP_DIRPYRDENOISE_5X5;5×5 diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index c0ee7ec5f..9a2d837b1 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -962,6 +962,12 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1361,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1385,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1397,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1408,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1429,11 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1623,17 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1647,7 +1659,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 557c31685..2ba03b396 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1237,6 +1237,12 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1513,11 +1519,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1537,8 +1543,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1549,6 +1555,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1560,9 +1567,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1581,11 +1590,14 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1729,22 +1741,22 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. !TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift !TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction. !TP_LABCURVE_CHROMATICITY;Chromaticity diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 2963f835f..19e0c0130 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -2146,6 +2146,12 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !PREFERENCES_D50_OLD;5000K !PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 @@ -2153,7 +2159,13 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file !PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_THEME;Theme -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel !TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 12f9ce694..a29bb08b6 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -961,6 +961,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1360,11 +1366,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1384,8 +1390,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1396,6 +1402,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1407,9 +1414,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1428,11 +1437,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1622,17 +1634,17 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1646,7 +1658,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 4ca9931d4..d683a1ac5 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1658,6 +1658,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1781,7 +1787,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 @@ -1827,11 +1839,11 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 53f4593b8..84000eb6e 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1658,6 +1658,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1781,7 +1787,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 @@ -1827,11 +1839,11 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index 3f1416110..eb2fe00a4 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -962,6 +962,12 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1361,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1385,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1397,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1408,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1429,11 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1623,17 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1647,7 +1659,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index e8e120883..8d580c3fc 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1517,6 +1517,12 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1668,6 +1674,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_HUE_TOOLTIP;Hue (h) - angle between 0° and 360°. !TP_COLORAPP_LABEL;CIE Color Appearance Model 2002 !TP_COLORAPP_LABEL_CAM02;Image Adjustments @@ -1675,9 +1682,11 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SURROUND;Surround !TP_COLORAPP_SURROUND_AVER;Average !TP_COLORAPP_SURROUND_DARK;Dark @@ -1694,11 +1703,14 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1807,13 +1819,13 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index be9d945e4..2a9e96bc0 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1550,6 +1550,12 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1696,7 +1702,13 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1806,13 +1818,13 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index 6cfde941a..333c71203 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1550,6 +1550,12 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1696,7 +1702,13 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1806,13 +1818,13 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 747ec5af5..f2bb37943 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -1024,6 +1024,12 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1400,11 +1406,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1424,8 +1430,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1436,6 +1442,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1447,9 +1454,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1468,11 +1477,14 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1651,17 +1663,17 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1675,7 +1687,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift !TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction. !TP_LABCURVE_CHROMATICITY;Chromaticity diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index ed92a41a8..8bb8dddad 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -963,6 +963,12 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1361,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1385,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1397,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1408,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1429,11 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1623,17 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1647,7 +1659,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 7c14dca46..0a75c54ea 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1945,6 +1945,12 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1996,7 +2002,13 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PREFERENCES_THEME;Theme !PROFILEPANEL_PDYNAMIC;Dynamic !TP_CBDL_METHOD;Process located -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Chroma opacity as a function of luminance oC=f(L) !TP_COLORTONING_LABEL;Color Toning !TP_COLORTONING_METHOD_TOOLTIP;"L*a*b* blending", "RGB sliders" and "RGB curves" use interpolated color blending.\n"Color balance (Shadows/Midtones/Highlights)" and "Saturation 2 colors" use direct colors.\n\nThe Black-and-White tool can be enabled when using any color toning method, which allows for color toning. @@ -2016,8 +2028,8 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE;Save Reference Image diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index 5d260d926..74b38ed6c 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -962,6 +962,12 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_476;CAM02 - Temp out !HISTORY_MSG_477;CAM02 - Green out !HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1360,11 +1366,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1384,8 +1390,8 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1396,6 +1402,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1407,9 +1414,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1428,11 +1437,14 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] -!TP_COLORAPP_YB;Yb (mean luminance) +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1622,17 +1634,17 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1646,7 +1658,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift diff --git a/rtdata/languages/default b/rtdata/languages/default index 0a34c86f6..bf400c39f 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1575,17 +1575,17 @@ TP_HSVEQUALIZER_LABEL;HSV Equalizer TP_HSVEQUALIZER_SAT;S TP_HSVEQUALIZER_VAL;V TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. TP_ICM_APPLYHUESATMAP;Base table -TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. TP_ICM_APPLYLOOKTABLE;Look table -TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. TP_ICM_BPC;Black Point Compensation TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. TP_ICM_INPUTCAMERA;Camera standard TP_ICM_INPUTCAMERAICC;Auto-matched camera profile TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. @@ -1607,7 +1607,7 @@ TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. TP_ICM_TONECURVE;Tone curve -TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. TP_ICM_WORKINGPROFILE;Working Profile TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction TP_IMPULSEDENOISE_THRESH;Threshold From 66ba9127acfa27e732c57587e2c12e8d4e8ed8a7 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sun, 20 Aug 2017 00:57:30 +0200 Subject: [PATCH 024/126] Solving issue #3998 --- rtgui/main.cc | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/rtgui/main.cc b/rtgui/main.cc index 455749fdd..731de81cd 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -261,8 +261,30 @@ RTWindow *create_rt_window() #endif Glib::RefPtr regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); - Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); - if (!regex->match(options.theme + ".css") || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { + Glib::ustring filename; + Glib::MatchInfo mInfo; + bool match = regex->match(options.theme + ".css", mInfo); + if (match) { + // save old theme (name + version) + Glib::ustring initialTheme(options.theme); + + // update version + auto pos = options.theme.find("-GTK3-"); + Glib::ustring themeRootName(options.theme.substr(0, pos)); + if (GTK_MINOR_VERSION < 20) { + options.theme = themeRootName + "-GTK3-_19"; + } else { + options.theme = themeRootName + "-GTK3-20_"; + } + // check if this version exist + if (!Glib::file_test(Glib::build_filename(argv0, "themes", options.theme + ".css"), Glib::FILE_TEST_EXISTS)) { + // set back old theme version if the actual one doesn't exist yet + options.theme = initialTheme; + } + } + filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); + + if (!match || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { options.theme = "RawTherapee-GTK"; // We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only if (GTK_MINOR_VERSION < 20) { From 1e5382a03ba7680c1bd89ee66aa85e0dd8c7c832 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 20 Aug 2017 11:45:54 +0200 Subject: [PATCH 025/126] Etend to double range color histogram Ciecam mode --- rtengine/improcfun.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 7518416cb..6d6fccc88 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1113,13 +1113,13 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } if (curveMode3 == ColorAppearanceParams::TC_MODE_CHROMA) { - chsacol = 327.; + chsacol = 400.;//327.; colch = 0; } else if (curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { chsacol = 450.0; colch = 1; } else if (curveMode3 == ColorAppearanceParams::TC_MODE_COLORF) { - chsacol = 327.0; + chsacol = 400.;//327.0; colch = 2; } @@ -1382,13 +1382,13 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } if (curveMode3 == ColorAppearanceParams::TC_MODE_CHROMA) { - chsacol = 327.; + chsacol = 400.;//327.; colch = 0; } else if (curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { chsacol = 450.0; colch = 1; } else if (curveMode3 == ColorAppearanceParams::TC_MODE_COLORF) { - chsacol = 327.0; + chsacol = 400.;//327.0; colch = 2; } @@ -2812,13 +2812,13 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int hist16JCAM[posl]++; if (curveMode3 == ColorAppearanceParams::TC_MODE_CHROMA) { - chsacol = 327.f; + chsacol = 400.f;//327.f; colch = ncie_C_p; } else if (curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { chsacol = 450.0f; colch = 100.f * sqrtf (ncie_C_p / ncie->Q_p[i][j]); } else { /*if(curveMode3 == ColorAppearanceParams::TC_MODE_COLORF)*/ - chsacol = 327.0f; + chsacol = 400.f;//327.0f; colch = ncie->M_p[i][j]; } From 6723013110138bb4812200bcd222a5ec519b2a29 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 20 Aug 2017 19:14:32 +0200 Subject: [PATCH 026/126] Added L* middle gray preview background color, #4027 --- .../Dark/actions/previewmodeBC1-off.png | Bin 2789 -> 6086 bytes .../images/Dark/actions/previewmodeBC1-on.png | Bin 2789 -> 6087 bytes .../Dark/actions/previewmodeBC2-off.png | Bin 2756 -> 6085 bytes .../images/Dark/actions/previewmodeBC2-on.png | Bin 2757 -> 6084 bytes .../Dark/actions/previewmodeBC3-off.png | Bin 0 -> 6080 bytes .../images/Dark/actions/previewmodeBC3-on.png | Bin 0 -> 6079 bytes rtgui/cropwindow.cc | 2 ++ rtgui/guiutils.cc | 3 +- rtgui/previewmodepanel.cc | 33 ++++++++++++++++++ rtgui/previewmodepanel.h | 5 ++- 10 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 rtdata/images/Dark/actions/previewmodeBC3-off.png create mode 100644 rtdata/images/Dark/actions/previewmodeBC3-on.png diff --git a/rtdata/images/Dark/actions/previewmodeBC1-off.png b/rtdata/images/Dark/actions/previewmodeBC1-off.png index d5071108af7e0028a895490f27981c99fae8ef01..d10a7e506b5eadc28e1f0555362240115765eba4 100644 GIT binary patch literal 6086 zcmeHLXH*m0+8%nBB2DyQh|;776o`c0oAizlLVy4X5CTaMFjAxlB1DQbDS~1_svy#& zBUO445CrLmB25vvc)s)9@6Y$={J1~vTF$IJd*n6f0&$i#l8Qf$y z8R>{?3J@YvGRy=*cTJ2N(nD=}iL13d;NW28VX|6WakTISg6{ha4BdO?mM36*u<0Ul z3*9-XzER1PFeki~Hsi&!y7jhp=r3cX(5J2DgX zFM~7uDuIZ(Xx@I#B2sda%ZUwkE%$kz=rd0%^U=Jk2FAAjy(y!ASQ?2xvb!c*u9JMk_wlQb+UM1cY&5vFH}KDy_9if%8L-cFkv;U5lzTi%Zsy^Zw<1 z1B}|BkKdQaiA+pWx78%YaZ#VFF+R_BcW1mZ#zGiV3r&S2uPHFUUJE!PA1kolKL7dl zMUOC!bzrIHK;t;=l4U2itLNcM(*f5->SB<$i$}TyrRDIi9 zx56lW&$9SXbXZ`l1uEnD z762GLQKy^8#>fzg@Igz$U42}Tk_5ExX%+yWq(bn8BfO9}kPFfsg@J)L-Zg+hC|4NR z`l^w%k*@~Q1Em{;MVbd0TOfkG5Q?r~6=g;x0`!ysjl{u01hhBCA4-6M|Kf$7-v0_q zfkA&ka9%L5jgbjR!v~85$w|sdN=s-FP=OGzG9yR{>*@wI)71W(;`9jy_Q2tMp;A(K zJYEtnE9rxEmy%IbRFsm2NI@VHrw9puA_fO1NMQUg{i66E4o###0(&YQ$_E4b#R+%u z3BbX?;L~x?-{h`{e{=f=V7>ohc11`by^&}n2Ins&BPk>G7v2>C)%L-n;ivOaXt+C4 z$`|7fmim>g)Zgizu3qZj%m0B-PW>irQVxNDTl=6PSL&X#ju`iqg<9G4b%h`S^SI_=5B_ zH2(La1^{$pvQqFC7NguzeRcSt+#YF8QH_l{7Eqmh(SRmA?VPg+)frj2Qh_{5b}db6 zF10W)ZQNaODL6KgF+e`P zHhc-Ud7_t|{GKOzfI4O@tf$j8rrM;XXgrL$G(@{)=zvqESw!ZW79D44ZQ5C$@y+r+ z@b!C-vf2>$Y=XZs2lCl>!@$$&g7eY5TReWI+^J-VIeYMkAy=WF)=#So8EtSkN)k9` zo$`#BUP~cZXscQMlV&X^a6xoS?EXnCP3DC=2WFV%b8mw&E=i=~u7UiF@d?P%bmp4H zeN|`97S{sl@7^``L3Xs{RHnwcEENN72m6|59V2dUMn<&1wz)ZRtu$bcjbd)S(|sML zvd^5i8&Z0d>=Xn8;%rUPfx)G%8#FlxSzvp=VN8yd5+u4}f7ocfpBu9%s0ZpOk(KG} z?Y;IDYtuFtcAR^%yeYpkydT%Pd@RB`l|^pkEM#1ot0^5YAB+qRa-$`;=AJ(yMxXe7 zc6!__9YJoK^(W*-`+j`rM~uk}{5Ix5A)lqQxP5GX_5?omxI$qRY|5uh;rUYL0bdT~ z{HQW1kBx%EU$uhj=%f7YUlB#(`q5#O1hNj_q>p{gytC z9103u$}1+o6;-Mw%1h2?yh$)$TK+~J>M&_G8Y>EJT}l**wMX$+|z`K zPxY(^g|I4}0*fT6>oc^P0uxT>OdS`#=uBHn@r{idE&$QI!wIs~WrC2p1!(8#iK@pY z^qe%UYB6lA9O~cug`QDgiF%$3ea7&EA4=m$Dpn8ghk0H`5!26_r3L@Hc|fxKT56U!OeLgNSNWJ4HI5Y8ZDi3xof7=&lW_uJ+FHH@to5#9vbGUvzvp- z(>9fTcEbZ=$ABii(KyVx^f6}18^>P5F%^x`a8jSqPRO5emgeQtrbC2pwQ0hWWW1yc z(vH%sx{2K&H)h#;tu9<8v^I3!pp+Oc=X)i$O4~~oOEkv(*6c5^KaG`bC(h;hDLGIS zbKp7g-0~3_jXhrqHth)4gF)HxeXXgp=QkY>D1Iu0W`m6S1r*qt=sP3gBd(}3&2r2N z%yK2_S_n^YgvU6{(YkPLDQq$NJv_L7Sz|!>ZK8{=`as|Se1JFr8xVs$dTA6Wq(i2e zU!ND+*4jpF+cU&Qltv^_+q=|h#%sQ7dCW?%aJjgZ?dadv|ZMf+* zQ$CSYkuMg^mQgDjMujOR4f%WK?yg8z31l1@S?@8aU+_YnUb@>&{uFlSX0y@DyVPA2*LO5VPAQ-oeOAp{*Nealq zS+9<)P7gFM$?TZz?5$4qNA14aA@6wY&@nqxc~KR=4-Hq-sK|XK&{s0;I~MIa@A42i z`5mP?yF58_03F9q@6MN%f zZ#}vD<|%q++;);-&3Np{&Byhz%k801Y*DXS@4(#x#F>>dhEdQccAXkT<`=bgcHyhS zh30jGXWd!c-}vW$i@29?9~DBfM)y7WErhvgw`Yjl6{5Kq%c zQBU!Xl3#MruFZagot`p;5>KPdIKW`{#|}bTNI|4p=l~UMs~f88BO)kwZO3CNLwdBN ztc0#BAeAWZW5s^_76(M>d@{Zfl(iI0wy7AFElrRo!6z*QSL-oqjTR#aBk{X0CS^ zJKylTps7i<7d+%4zTirVnMxCNR5y4$B6sgd&6r>ube&eg|;wJV7cGtgZ!FZndHRK&_<=x7{>rN845ywk*sg(h%IRRU%HKSfHr5sf1 z-+MJD#z(}9p1*xXT0%sMP$%kQZk>yrz1vjUb2B63-sRW>t!DeRsv(RPdI7UO<5r5^ zcypt5ZO%)uP%v5WqP}gxXuZr~;Yvp2I>Y2)*UPRmYmIB4*Q?71QHzP# zL6^x|F?3}#WvE`I14gLoeNkL@^IiQm+gFp3+@~zFEOj%GdbFp7w>au2Aq`KM*X>Bm z7Ro3r%-7fHN}qLue;X=IL&(?rpA?t3J}W3r9u$05S#-vH%5l#Tt-^OgIH;IdPM0ln|Io|P%bo40kc!9b z1-E@)W{Tlyt3kZG=nz*+cp+T<^dxDfKr9s|<+K*C48yn1epr4HXnn&G;jmhb38|~= zd;WS|_{HOiAFmE4>AY#7K4a5Md=5}TU+i33ZG8IU{yF}) zUG>+AQoGY#hqn8R7rhD5p*BBtS4 zUb`v!9kmd#qB;2F`~0$KU(xwKE2ZUNTwUNpa!aKiV|_9%yv_uN8@4_-A*UfST@2%6EUeVo>JOgb{zHQhjr3OC$f2t~ zb3ga{JLmbG-#G^Wif^Dmm;oyQkS>&n!+hMCi=$(h_+9`5BESJF065$%e^JmP?{I*c zpO*(S3k{O-Uj_m2<~Be*05@2^Ax!39`v3b;wVIGg4#YMRY<+L1$NTyGq zOixIaF^rM17%dQGRT(FJ=DB~yd}db}^U{SpG$tHn5igx5<1UmpWJ~!dBY`LvXAAf_ zDBna`KTVo0K>01o^mINae+vK%MW##m++>t3QKpE)!#q%)4*-FZG>a2vv4o#1L1TeO zhA2-gNJ^G4jkzXFD+dQQ)0dx<#+OJ~AslWhN6ce-WTcBY!aM*zzgdwS(~Hn|6>1m_$BI}K{ngZ5wAl3oEgOE`Ko=*{iGX`e|xj#tCp}6fVOo2 zsNVak>F)zTz6gNUYqQ?NknKydL?Uvuu*k{DF&FT;=CX!B&#zNYf-tSyQmf2PfQ0Uf9TEuaUC0Sj0I zd*B3Iffw)x!5|z&gJpmVl0iBUgB(x*)_`JA3buglpc?E2e|4Z9G=XEF4V(n$z(sHs zTnD$neJ}_{z;iGG-hgQcg76R(qCskqHe>*qLDmo(S^#-LflwF}4aGxAkPwnW1<+ck z6e@?Rq5V)j^gVO}ItN{b`k=ee5Htq;4!wsFm;%#bP1q2&fZ4Dc8~}&IOW`Cq6V8W= z;LUIqTnit8e_P>m@KyL0JP1FBClP><5eA}zun;!lfdnHlNFpLeRw5-xB~pttAst9J zaswGe#*udz9EOHrVptd_j4vhv!^LD`R$?|`sxgN#t(Y#%4a^W`0`mz=#cE*9u#Q+i z>|$&ZHV0dbt;8P0wqP${Z(&EUZ*Vvq180P@$NA!-e{m_e<+x3_-MD7lSzI4(7&nQ> zU7(H7adacP zA3cR$O8<`DOP^3yQnpc!RL)hdQ9h+S$Uqo|3_nI1ql|Hkahvg8MN`F1g|D(vrAeh< zWlD99s;eqrwM4a9^_J>;HKv-ETB_PswKlbf>KJuX^-%R3^*!nr)W_%0=Qz#b&MBF5 ze{9Y@4OqieBTQqt#sQ5UjY&-{O&?8>=1$G?n&VmwEmy4+tqQHvT4UNY?FHHb?F#KP z+RvEEOgCm4vx?cpoY2wG@zs&)?APhlnbtMZjnFOBZPtCLN77^KCF)h^b?Qy%YwHK; z7w9+Y-!mW@unm$8b{KRUOc@#(Mj5U*e{3^+YNTr9XOwT$X!O9CYV2a1XtRZuTd7ycr zd7JqQ3w?_ii>(&j7N0C_Ez>OPEbm(>S@~NPT6I|cZf$DKwXU(gIgdKed)}&ff9>;L z+L+n!ZT8sQv8CAt*{-+kwEbvjZzr~EvKzD4w~x2qWk0~CvqRXM*q0oz4(<-C98NmC zbF_1mI39ES&57ld>eS%$biUDi{`|W6!_K~%$Fsz<*GtJO!mHZrk+-gQl6Rx` zgpaMya-XxlSl+GUMFG_Tj{{8u#ep3`aFBn{wx9s~}#6t}2h(VKAhfAF&K`w_+w z(umGT`N-JF`pBs$aK!NnGfS1i67tsX6iZjZsoM8+J9nOx$vWc!klSlig**xO5u zmgX+Kyi9#r+Okt|@^PHFnqJhf-(KqSBhv3F-0aCxlAE zRAE#o%-o(iAr259%!0C(X0=P`5|N}wYAjtR9m-yiU6cJbCo<=F zu41k*w5A(kxnCG`!AdU1PCavAB3(z0>-=8!#IL8+td++qiS%rxISt zl~T*n%F+*;xSOtgWA#ndH#3_PH}{s=mF?Mr+ala@d#lUV!{v(Q`Q^jgg0{6*Fe^$b zUT=@ve!0@7a_padr-t>dP54&1u zEhVi`YhLR_TXNfAdvtr>3I7wF9ZnrBKbrq|=%micnp4WB%1)C`7oDCtlYeINtmy3c zxukQ$opGJ_&o4fIvn#Z#_d>vhOBcN_p6_<+K6A3)~~b2mJ1T)gRb^XjdIxB6~J+`cmqJ1}^McjxKd zw7W0wW#5~=zxo08LCHgfhn0^s9@YMA@^kZ`-QcMq&!L{jiyq$}<_XN9&(jKRr3-J$C)sl4m2&MbD?li+@%8b=M2ye-}Ue=K5RD#NvsOm*ST*zi)b_ z_Uh1Uo7bI_A(M~Zq`#S-DtW8+_V7FQyYBZ$A001CkNK#Dz0D2_=0Dyx40Qvs_0D$QL0Cg|`0P0`>06Lfe02gnPU&TfM z000SalXVvpClX0SK~xwSV_;xlI7}lv#0&-i?wT@3+{6`R00000NkvXXu0mjfd3{Z= diff --git a/rtdata/images/Dark/actions/previewmodeBC1-on.png b/rtdata/images/Dark/actions/previewmodeBC1-on.png index f71b2796572bc9c23f7193d4e1a9d187a60efd7d..014627cbeb0b6b8f062039ffda9dcfbf68ac54c7 100644 GIT binary patch literal 6087 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 diff --git a/rtdata/images/Dark/actions/previewmodeBC2-off.png b/rtdata/images/Dark/actions/previewmodeBC2-off.png index 5c9b2d0e872788744de4d32dad5a282f99f2e4b3..bd3862a0e26e0063adee93aab56c206adbc03dca 100644 GIT binary patch literal 6085 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 delta 2701 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 Hu0mjftn5t; diff --git a/rtdata/images/Dark/actions/previewmodeBC2-on.png b/rtdata/images/Dark/actions/previewmodeBC2-on.png index 8f5b9207e76ce6e1fb01e135145a7dff91c241f3..31630af594eb421a0e5dc59384706c1023efa37e 100644 GIT binary patch literal 6084 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 IM6N<$f*s{f8~^|S diff --git a/rtdata/images/Dark/actions/previewmodeBC3-off.png b/rtdata/images/Dark/actions/previewmodeBC3-off.png new file mode 100644 index 0000000000000000000000000000000000000000..87923e02f04cf5c11d587703b8cdc6c519912e52 GIT binary patch literal 6080 zcmeHLXH-+$x(&ToX(D0_(uF`kz)0x5C{20`A%p-4Ap{btIdl+|DhSdA#DX-H4oZ_l z^8nHm5DrL}A{~Jn&pYqFKkv`^aev$~+S<~ZD(XtXM@1Y*0q*ob?VYkCk1?}Xo~5DW z+)z=pH1l=mu?)+R-4-eIonll-T(!EKNlnx0^5;|Dzz{{;)ZU*H!cFTcK@5|ZuvEys zJ_(_a?rU7L>)$PGVg;r+Z>elb(%pAvkKl?k*3H|}%PkWH z8^3cXX&RILd>1??-#R8cx_)`kB8pU;?5sE$SiL_f6CHk$YbxQ#56z|N`N%-Tj%rs> ze}z|sh2)xH=S8=SFN}Ip&+N4Dsxj3st&$<7;~LMq>GSk`eq)w56nZ>TK2+epkR%xM zB(z!tg}vJQptBz5U`7xVT(fx0zzIix5tI8KcD43M=2@%Wc^EN5{9FW=eW<}~?w0Qm z?1O-R{5ezkhndy_WA?NHU00N6HmNxU9V{J=DtNxxUK*p726`HQO=KD+IbLQj?w(BT zwEKcG*KT@EA2dS+0K0)_nDCtWfZH3cLEY`Mt@?&}=2|@}S-q zwUhP6-FqA5Axrg{&bOdd={I5PCT01DSH%Ys-)hIOUqBzcFHQ_DdtI((S`FA>Rdcx-SV(jzJnqS8`HR8Mkkx_>tPwQH<&p38UG=Nd9 zUI$E)9{b|8ScVsrx_0}23mT0hAbu7!EdDK9n;a|kSzeLIc$e3sfR)gr-s0nD?=4uk zp&H*#(uH2&G-J9GOEk}_ktO#uO;mVd-uiqiJ8*PNTa9nyadEkw!4G-Kv%cheNCyBg zd7&xW$JW#YitxqA!rgt{kg_BUj*mMobkHEjG>%U7b=KnKL zNG!!Q5h?Zva7NakSSwnTrl}?XP<5Z>2b|)~^qnQoZtXw{%1J63|DnY}ppjdUeh?+}Rhn80}0z{t} z1F8ZgM3Y_L3MT^#I$U|o&4U!GtqBVY&6$}qmr!Be`OW(<)JE8710cESq`rw@%S=|x zBVU?ZFuI?ZP>MLFV%-GL^Z{I}Aqv!5uy(S6nlN_9B<0)zh>@&J?2ra1CpASb5jM{Z zvoqfE#|_cOk4NZkj|S}3Or?mq&Y75mEKNUJv%06@%G2Rq zB6sN1;1Fz2pO(qeHkYeztmo*^@Z|ld$LrBiy{}y!F1#zP*i+N^kVb=-5$gM_MY~~D zCmAlmFhHW6IVLc)s&j*`0HFZb-ftaO|8#T;F!uyYvUtyR1}B%Bi%13z9{hfxFeNvuKwcospYvd_;`M;${5I8P>ss#xqPx<0rmWt8o7v* zirZhKmgeLS=wBzKQBPCoTLkMCUgi;B5mI2)XYv{XAok#;F-24_&8b zJSPXY*5L=SC$v(rPYa<>n2v;@bWY?7t;i2BPoC_E@Yv~gMw5v0O2~7zoHo{Ry1mHu zFBv#cli)xk%j`Oi*OB8=23pd0l+Ub2|wd;ibP@fGyH9S9o&E z6JpPVA-~o>E)e-6e#wWx)xbR!ht+n`n$f#oJmV@SAgITHh}`PZfv3uQ%avrEWLftG z^#MIt74CMr@mA8?GWY-=#Phn|tqiH^u3W6t9`{>w5aKFJQ0NYtEAmryq^jU1@(}ry zqjK8%|18{}J^J3e& z+lXxkri7@fsQa`IZp}JLI*lF49V~`Tj~_g~J1^Cv+GEs{mP(U4Y(bL5NGeN~jzG%= z%PlS1Eoz2%&xOY;yp{0JJMYS*^cyg_jVtAfA0flwo-rW10(6;+=8jX=1j{6{waUH z$E10uTu9AHa{+B!9ZUf~@XctIIdlH4;!9z2QKe;}_G}8s$lOKVR^DNYJSW<@EIJ~( zXKZVnkom|K@4{p~WW#K3UraD4zlFB8)15HBt{wDpTXzA?o1IW&RBaUfyIqFl?S!Yr zQZ}!&b|0-MG+dpE&NF&hwEqD$l0MS(G0H2z>%{B(3UsCSBg=@x$4h8VMFBx3L0-Wr zL51w6*;Ltw+5Or3uQu&jUtD3&J0T@54UA z&cSkEsHW#lqomw@y^!OejUC}V^F8>X;$h#xZAfbKD6zz^;qjsAvo%M{-chgPs0P|uQV+l?(&1RH|bUE?xXd-3fEhH zLMjW7;%Q@}wxfD+iGa(Iasqql%99j+2sk ztl;Rew2IWcG_@>vvU$3E^(1!p+ed{^^>Bn(dOf7ZQiJ!zWS1!*Iw!i=?w;K>JKvi2 znpuB8ILN=#_L<1 zYjfVBrJ@<4myGO6##-c$OILED*O@*Y_df4sUu#?YvR+p+j9yH^FK;((S2Q>^nXDa+&pr^`eeLuC-pRAo|Gd$v` z9g!M)Fw&y_9!7dI@T{WQxv^!N^Q+ltVHw*jTk{O01>3GoZx*$ex;PrP}MyQJ2mGO-;w%5gj? zf$3Z~3&9?n=v#CfpsW_ZNX}SJIqf-N)CJE-2ep&S*$UOD-v_t{`0|`oGKtu|(5}N} zmU#ZI21Mf}$HXSmGx55zv(%Xq=}Z{dWi4PCM(mvZefe3S%`GQ{<7yo?thssc>C1KT zXZe#yFOEMk_|QXr$ETMB9igPa_voc}ru#XWzK5S1!b2w3-`?om_C7WfJ{pJs0TkXCBt-Jj?1BtEkt&RuHI~nhu zwZD{cAr8{_tA(fSd4yLSym<+gFy|Nwhj#u4TVUm%y#N%nzzkL6a>If_ohyTmTSbn0EWI>0TKcP6N<>87(h_zNRuMPhE$cV zbfhUA6c7X{!l6hNfg8^|@4i3p&-rnG+%epHtX;k}*WBNlW9~7&wW3U~=y7w1asU9p zZJ@7XPQMG$8zUPF{hIRP@F)NM6L=bkX zOX@`6{Y&>(v4xI2*jG<~bdt9$+LZaGmcN@@(?rI3ud1#}GvB*@B$O}G2${8}n^`Ch zHEOg^nLEDRShoWa`yROLGA_1$9vP{^v4G4YNCv(bH=iHo`|!NI_f+_wCTeafy1nR( z;iV@MQb~r7o+v^^ zzLUJ<^R>0i(>8TZCXz!%YJwye(;r~DxMa}X`u;B96OX4 zXN*-yQT-s0;E#{+evS-58T)+ah5|XI%9Z&mhEsPpy-i9OLSJHfQk`Sl1gGT#p2^x~ zFb4}MH+y*8-#!WO=XfuZ1|`15o=Jji5&yRJSKxp-$C#DHndYy^(SF{wVlO}c%l z2pZi{{Ne^;YZCI#mNo|&4VDBuz=lkf6}VlKyJYQ4)6U|{65|W~b*~9qt6cpvtB%?o zuWWy1)VD``xDiPTw>4|rte!bFTg2U2h%Zl0d-cii zX=V-C^DwKLmKC_L`RJ(8!a#oy`NxA^pXn}<%b59+xZC$Gzbm4+r!T^k15R&WR300U zP;d-B$Yv?ulV$4u(kubvMT_%p8vvYXlI5ueNs?6^=Y?7e46+~~chyN4Q1986j} z4`~mX9&JNBSl_qPeU18m4UH#}(Z39hh!*1a`EybBOnlZ zKlpEQ4Eo>PBtIX|znC#-DAp58z!J&6Pz5;!=wEmY8m{Z*LqO5T;|VAn7D^)GAkbgg zLjO*eK6~iDr~fO5|NQa$BmYR_-*Wwy>mMobkHEj(^;@ogq`*G{|901Zms}kGS3qHj z^s0$MFOPu35Dj{1#e~x|(FB0fdz?Q}%mBav$7^ewn!0(By?ougNMHkP?f+fP0Dyi} zW-`Una#)DgTSp1V>6RCe)?TUO2G^-P?$be~9&?srJOWcHJ)O(Ihty#b)C`5N#N39I zLZTx=oZpJw2WK}s3z(Vt!^*74v$J(6DU+vgH$5KKZ6k0iH;1Z$`?dR3wPYKP5T&e; zQ`57C_hO<8(0d@RRe-Sza4u7XF=!#0LiE+dh#SUnM|U7>Au5#SbAU>0ZP+|{_0S+K z>8)^NA5+vwXma}U}xA(!qv$ZSR5 zu?hOhbwkv?3jvu(6Q79`Srhg)6G};towkPz84DJ8BY#?*NN+{CGK4^)mKlzmGiWY= zNUSw!ebT8F08U7+ox6J&&75)Kj~#R3!m+9#qDy>8ac5s%`skSA{6xl*qV^%zmqSCkUt3+B1Q#2K2PRR0HTo|?)wj8FH*c2i zCpiTmfEZgd!i}KPmKEk~Gz?hZZWvMGVE{`n+V8!w-p+}d6E^_2m%tP{dU`H=^|5K4 z4n4>@Tv%1v7~GC&SvZj58P803BT&FGKV4ngXVD)K6yVB|(2{d}-#_xu`?J%-Ci(D$ zH&edU+(^=gL~sA7+#BCV96&0WdUNXs7Do?JBM&Q7haqO7Y9RM#3im~`8D@snLUMUQ z{Jt6$jQbx{ZUw3GHq^2WMzvHOo}ZsAZ^TZEC#3IO?2$bi)5E`BF0|d;%byJb=`+Zf z0x}wm^9*O4k9dY4NGxJ+gqcF+d6}(1Li!B&5S}tkwGp;x4fYYxjWBmpPEn1cZXihw zR#k4fkj~HW*C1jTt20wf*qk#cHc`BG0D)L!rmj?1kyr-X%kIs#-Wc(6rXXYzu_8T-U@5_ zoJ4}uiuQzYPA!uJ9e7TKeVpQ4_1n2{nL(X~;|t;C6V1IXa+<4|n_VY2jw$@!GwtX& z!$)Fx&FcHtXCxFujnAx@iU=?x^^WB%nN1YUN(s3uyPtd_a4i-d>aMq$P0ZCbgB4wM zQ?z3zguK+=%RciVYTlE~SIs{jNz``In$*3QH|Z=dBC5-Z4qI#0LB%V0$mgf-r&@LS zcY$5GV0T(v1WQDO1N+9d|%KRfDs@Cht$H@;0({gvW-+l2MScwlRy!&pG#VODuA^SMgT1$Wfz<+Ws%rk+XQgwCHlfGQ)^>wn@_0qMzi+ zSXXLoW-P+0&yPoB8NSHfevcbS9H<=(clUGOcmKW!U+f&@9Izieh38cg5oH$@6df0Z zr9DXlrR}D5r)^iR+HpNU`y63cXXiTxALARdueekp={MsSL|!MS`H3yY`(=`?zYTqx z=xdr+*f8JN`ZoTaw)uP`VZ&pCmCKpYgR%H+aG0icMb7iny(JT*kx0ypOCol_Q_0;J zwxuE`|EGK~Di_aBDC>VTJd^M^3I7Biw!jEG26HNBD3>dr?B49Q{i^)+)%kXzETM0* zaM|m2qBcI~d2A*sb8VPy2&IcJf4C9Q-LHtHS!Ew8qRK~cu&!*yP?7wYb1&WOtv_zQ zEF?^h+J0nTx-zow>Vh^HHGNF5AI8$L`IF4T{}E3?hyq z(h<1YXSGAr%x&GkJ^z&ru`RPL)UMKQ*Us2Z@#gZ{ncavV*Y*%=!`pLv6y`UedQc66 zm|VYItNjok8^cWo3bPtVAG_Vj4Ya(3s?=+V9ekv%ez3lml(^D`4Y&Dp`QehX64p+? z6wVY1&FFSpxJpDX^0i)~UW`tfPH}9lSiVS0>|#u-E=`ZV`&GPZQySPpjk#uQ)|HtA zKj&+8-7){QjNjk`n+_Y-r4CiHgU+W9uX(yOToJw(CM1KMesXojR?;>zmb;3buX>+Q zoy~}1qJ^)Acj(ZX9iuD^t{5a4^gE~!mAA2F6d%I6gQ4@gsl#jr{&BDKS?7_ZH%p(FUzhje=i+=8)@#>G9YHl?=jH`l z1Yc0v{;apd+uGL9O7vdi9=&UL;``$3#K}N)OUY}K#oo{Hebs3)K@)Ei|ek})UWe?H66++-LO zhI*Z8Q?97*1Er~Gm3rU9;_{ZF{Nkh`JD(FLgvD-c-Tbsoxw4ZvuhyYDx*j&fvo|J1 zXjwK5B<>mOnYZcVEayH;Pg;ySZaEUvMGvVv6=Mr&url1c9{wJoEJxK83UMo_b$5X? zO1QNeU31DIrk46t@^#^1{AB*Q6a>_1$!`HcX_$i%#;1DtxJ9Y5b_vYnpdwfm_$IB<0N?WN9@Pbcpl6RYa1zvK_y zoao%M-JUz;NsSD)`KiBXHjB=0+f@Iy{|WAb@NpfuS+Qa;pTLTKRyx;!Iao*4u1fFX zXTukD`XBAiEJ*i0KHh6}`S`7@wV>eYdFutI?Yj3j*P6U~8aBIidSV)88XR`&Hj)~j zHocH_qV%$Ks|6=)xds>SJa7DXW<_KrU{bI4VQTL|$iC^O*$R4Cvf(O^aG#LS0W)Lj z_n+bvAwPOm2}bLin*cz71OSAD1Hcb@C}bW0{Nw>((HQ{XsQ@5M%BVKGOz&WEG1Aik z4u755b%hD^2s=sN))xR|um5TwSBcPHJMFAw0}~|c6q^7qi<}$b^DBBt$UsNaQlua4 m>E^c6tHJoDS>ucbEDV&=#1O&ww(bHQ0T>{!=oD)?hyDwGBVH^3 literal 0 HcmV?d00001 diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 8af0541fe..5ae65691e 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -1324,6 +1324,8 @@ void CropWindow::expose (Cairo::RefPtr cr) cr->set_source_rgb (0, 0, 0); } else if (backColor == 2) { cr->set_source_rgb (1, 1, 1); + } else if (backColor == 3) { + cr->set_source_rgb (0.467, 0.467, 0.467); } cr->set_line_width (0.); diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index 989ff2758..a72889404 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -247,9 +247,10 @@ void drawCrop (Cairo::RefPtr cr, int imx, int imy, int imw, int cr->set_source_rgb (0, 0, 0); } else if (options.bgcolor == 2) { cr->set_source_rgb (1, 1, 1); + } else if (options.bgcolor == 3) { + cr->set_source_rgb (0.467, 0.467, 0.467); } - cr->rectangle (imx, imy, imw + 0.5, round(c1y) + 0.5); cr->rectangle (imx, round(imy + c2y) + 0.5, imw + 0.5, round(imh - c2y) + 0.5); cr->rectangle (imx, round(imy + c1y) + 0.5, round(c1x) + 0.5, round(c2y - c1y + 1) + 0.5); diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index 50beb8b66..fe7957ce8 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -32,6 +32,7 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) iBC0 = new RTImage ("previewmodeBC0-on.png"); iBC1 = new RTImage ("previewmodeBC1-on.png"); iBC2 = new RTImage ("previewmodeBC2-on.png"); + iBC3 = new RTImage ("previewmodeBC3-on.png"); igR = new RTImage ("previewmodeR-off.png"); igG = new RTImage ("previewmodeG-off.png"); @@ -41,6 +42,7 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) igBC0 = new RTImage ("previewmodeBC0-off.png"); igBC1 = new RTImage ("previewmodeBC1-off.png"); igBC2 = new RTImage ("previewmodeBC2-off.png"); + igBC3 = new RTImage ("previewmodeBC3-off.png"); backColor0 = Gtk::manage (new Gtk::ToggleButton ()); backColor0->set_relief(Gtk::RELIEF_NONE); @@ -52,6 +54,11 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) backColor1->set_tooltip_markup (M("MAIN_TOOLTIP_BACKCOLOR1")); backColor1->set_image(options.bgcolor == 1 ? *iBC1 : *igBC1); + backColor3 = Gtk::manage (new Gtk::ToggleButton ()); + backColor3->set_relief(Gtk::RELIEF_NONE); + backColor3->set_tooltip_markup (M("MAIN_TOOLTIP_BACKCOLOR3")); + backColor3->set_image(options.bgcolor == 2 ? *iBC3 : *igBC3); + backColor2 = Gtk::manage (new Gtk::ToggleButton ()); backColor2->set_relief(Gtk::RELIEF_NONE); backColor2->set_tooltip_markup (M("MAIN_TOOLTIP_BACKCOLOR2")); @@ -91,11 +98,13 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) backColor0->set_active (options.bgcolor == 0); backColor1->set_active (options.bgcolor == 1); backColor2->set_active (options.bgcolor == 2); + backColor3->set_active (options.bgcolor == 3); vbbackColor = Gtk::manage (new Gtk::VBox ()); vbbackColor->pack_start (*backColor0, Gtk::PACK_SHRINK, 0); vbbackColor->pack_start (*backColor1, Gtk::PACK_SHRINK, 0); vbbackColor->pack_start (*backColor2, Gtk::PACK_SHRINK, 0); + vbbackColor->pack_start (*backColor3, Gtk::PACK_SHRINK, 0); pack_start (*vbbackColor, Gtk::PACK_SHRINK, 0); pack_start (*previewR, Gtk::PACK_SHRINK, 0); @@ -113,6 +122,7 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) connbackColor0 = backColor0->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor0) ); connbackColor1 = backColor1->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor1) ); connbackColor2 = backColor2->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor2) ); + connbackColor3 = backColor3->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor3) ); //show_all (); } @@ -127,6 +137,7 @@ PreviewModePanel::~PreviewModePanel () delete iBC0; delete iBC1; delete iBC2; + delete iBC3; delete igR; delete igG; delete igB; @@ -135,6 +146,7 @@ PreviewModePanel::~PreviewModePanel () delete igBC0; delete igBC1; delete igBC2; + delete igBC3; } //toggle Functions below are for shortcuts void PreviewModePanel::toggleR () @@ -170,6 +182,10 @@ void PreviewModePanel::togglebackColor2 () { backColor2->set_active(!backColor2->get_active()); } +void PreviewModePanel::togglebackColor3 () +{ + backColor3->set_active(!backColor3->get_active()); +} void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) { @@ -240,6 +256,10 @@ int PreviewModePanel::GetbackColor() backColor = 2; } + if (backColor3->get_active ()) { + backColor = 3; + } + return backColor; } @@ -250,6 +270,8 @@ void PreviewModePanel::togglebackColor() if(backColor == 0) { togglebackColor1(); } else if(backColor == 1) { + togglebackColor3(); + } else if(backColor == 3) { togglebackColor2(); } else { togglebackColor0(); @@ -262,6 +284,7 @@ void PreviewModePanel::buttonToggled_backColor (Gtk::ToggleButton* tbbackColor) connbackColor0.block(true); connbackColor1.block(true); connbackColor2.block(true); + connbackColor3.block(true); // control the state of the buttons // Exactly 1 button at a time must remain pressed @@ -277,6 +300,10 @@ void PreviewModePanel::buttonToggled_backColor (Gtk::ToggleButton* tbbackColor) backColor2->set_active(true); } + if (tbbackColor == backColor3 && !backColor3->get_active()) { + backColor3->set_active(true); + } + if (tbbackColor != backColor0) { backColor0->set_active(false); } @@ -289,14 +316,20 @@ void PreviewModePanel::buttonToggled_backColor (Gtk::ToggleButton* tbbackColor) backColor2->set_active(false); } + if (tbbackColor != backColor3) { + backColor3->set_active(false); + } + // set image based on button's state backColor0->set_image(backColor0->get_active() ? *iBC0 : *igBC0); backColor1->set_image(backColor1->get_active() ? *iBC1 : *igBC1); backColor2->set_image(backColor2->get_active() ? *iBC2 : *igBC2); + backColor3->set_image(backColor3->get_active() ? *iBC3 : *igBC3); connbackColor0.block(false); connbackColor1.block(false); connbackColor2.block(false); + connbackColor3.block(false); //TODO not sure if queue_draw is necessary, but will need to reach to backColor of the Before view imageArea->queue_draw (); diff --git a/rtgui/previewmodepanel.h b/rtgui/previewmodepanel.h index d3bf3c8e4..83ec69d96 100644 --- a/rtgui/previewmodepanel.h +++ b/rtgui/previewmodepanel.h @@ -34,6 +34,7 @@ protected: Gtk::ToggleButton* backColor0; Gtk::ToggleButton* backColor1; Gtk::ToggleButton* backColor2; + Gtk::ToggleButton* backColor3; Gtk::VBox* vbbackColor; ImageArea* imageArea; @@ -45,6 +46,7 @@ protected: Gtk::Image* iBC0, *igBC0; Gtk::Image* iBC1, *igBC1; Gtk::Image* iBC2, *igBC2; + Gtk::Image* iBC3, *igBC3; public: explicit PreviewModePanel (ImageArea* ia); @@ -58,9 +60,10 @@ public: void togglebackColor0(); void togglebackColor1(); void togglebackColor2(); + void togglebackColor3(); void togglebackColor(); - sigc::connection connR, connB, connG, connL, connFocusMask, connbackColor0, connbackColor1, connbackColor2; + sigc::connection connR, connB, connG, connL, connFocusMask, connbackColor0, connbackColor1, connbackColor2, connbackColor3; void buttonToggled(Gtk::ToggleButton* tbpreview); void buttonToggled_backColor(Gtk::ToggleButton* tbbackColor); From bfd410dc68793d0019ddb9f07aa418280a666ba7 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 20 Aug 2017 19:25:22 +0200 Subject: [PATCH 027/126] Background color button order: theme, black, middle gray, white. #4027 --- rtgui/previewmodepanel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index fe7957ce8..ec1324970 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -103,8 +103,8 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) vbbackColor = Gtk::manage (new Gtk::VBox ()); vbbackColor->pack_start (*backColor0, Gtk::PACK_SHRINK, 0); vbbackColor->pack_start (*backColor1, Gtk::PACK_SHRINK, 0); - vbbackColor->pack_start (*backColor2, Gtk::PACK_SHRINK, 0); vbbackColor->pack_start (*backColor3, Gtk::PACK_SHRINK, 0); + vbbackColor->pack_start (*backColor2, Gtk::PACK_SHRINK, 0); pack_start (*vbbackColor, Gtk::PACK_SHRINK, 0); pack_start (*previewR, Gtk::PACK_SHRINK, 0); From 00779e8242ec0d203d5209b842e7ad965aa1a808 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 20 Aug 2017 20:40:56 +0200 Subject: [PATCH 028/126] Added L* middle gray preview background color, changed button icons, #4027 --- .../Dark/actions/previewmodeBC0-off.png | Bin 2746 -> 2829 bytes .../images/Dark/actions/previewmodeBC0-on.png | Bin 2776 -> 2832 bytes .../Dark/actions/previewmodeBC1-off.png | Bin 6086 -> 2819 bytes .../images/Dark/actions/previewmodeBC1-on.png | Bin 6087 -> 2820 bytes .../Dark/actions/previewmodeBC2-off.png | Bin 6085 -> 2820 bytes .../images/Dark/actions/previewmodeBC2-on.png | Bin 6084 -> 2821 bytes .../Dark/actions/previewmodeBC3-off.png | Bin 6080 -> 2824 bytes .../images/Dark/actions/previewmodeBC3-on.png | Bin 6079 -> 2826 bytes rtgui/previewmodepanel.cc | 14 +++++++------- rtgui/previewmodepanel.h | 1 - 10 files changed, 7 insertions(+), 8 deletions(-) diff --git a/rtdata/images/Dark/actions/previewmodeBC0-off.png b/rtdata/images/Dark/actions/previewmodeBC0-off.png index 05a75ee25d1103cfcf938057694d858980dc60c0..c106c8170d215f02f91dff199639002c62b90b3c 100644 GIT binary patch literal 2829 zcmV+o3-a`dP)uJ@VVD_UC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$Or zQF$}6R&?d%y_c8YA7_1QpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X6{c}T{8k*B#$jdxfFg<9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv z1)yUy0P^?0*fb9UASvow`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q z{wNRKos+;6rV8ldy0Owz(}jF`W(JeRp&R{qi2rfmU!TJ;gp(Kmm5I1s5m_f-n#TRsj}B0%?E`vOzxB2#P=n*a3EfYETOrKoe*ICqM@{4K9Go;5xVgZi5G4 z1dM~{UdP6d+Yd3o?MrAqM0Kc|iV92owdyL5UC#5<>aVCa44|hpM4E zs0sQWIt5*Tu0n&*J!lk~f_{hI!w5`*sjxDv4V%CW*ah~3!{C*0BD@;TgA3v9a1~q+ zAA{TB3-ERLHar49hi4Ih5D^-ph8Q6X#0?2VqLBoIkE}zAkxHZUgRb+f=nat zP#6>iMMoK->`~sRLq)(kHo*Vn{;LcG6+edD1=7D>9j^O?D{Qg|tCDK{ym)H7&wDr6*;uGTJg8GHjVbnL{!cWyUB7MT6o-VNo_w8Yq`2<5Ub)hw4L3rj}5@qxMs0 zWMyP6Wy582WNT#4$d1qunl{acmP#w5ouJ*Jy_Zv#bCKi7ZIf$}8d zZdVy&)LYdbX%I9R8VMQ|8r>Q*nyQ)sn)#Z|n)kKvS`4iu ztvy=3T65Yu+7a4Yv^%sXb>ww?bn(=Yu(!=O6^iuTp>)p_Y^{w=i z^lS773}6Fm1Fpe-gF!>Ip{*g$u-szvGhed;vo5pW&GpS$<~8QGEXWp~7V9lKEnZq0SaK{6Sl+dwSOr*Z zvFf(^Xl-N7w{EeXveC4Ov)N}e%%C!Y7^RFWwrE>d+x51mZQt2h+X?JW*!^a2WS?Sx z)P8cQ&Qi|OhNWW;>JChYI)@QQx?`Nj^#uJBl~d&PK+RZLOLos~K(b5>qmrMN0})tOkySZ3_W zICNY@+|jrX%s^&6b2i>5eqa0y%Z;^%^_=a@u3%4b9605ii3Ep)@`TAmhs0fpQ%O!q zl}XcFH*PieWwLj2ZSq`7V9Mc?h17`D)-+sNT-qs~3@?S(ldh7UlRlVXkWrK|vf6I- z?$tAVKYn8-l({mqQ$Q8{O!WzMg`0(=S&msXS#Pt$vrpzo=kRj+a`kh!z=6$;c zwT88(J6|n-WB%w`m$h~4pmp)YIh_ z3ETV2tjiAU!0h1dxU-n=E9e!)6|Z;4?!H=SSy{V>ut&IOq{_dl zbFb#!9eY1iCsp6Bajj|Hr?hX|zPbJE{X++w546-O*Ot`2Kgd0Jx6Z4syT zu9enWavU5N9)I?I-1m1*_?_rJ$vD~agVqoG+9++s?NEDe`%Fht$4F;X=in*dQ{7$m zU2Q)a|9JSc+Uc4zvS-T963!N$T{xF_ZuWe}`RNOZ7sk3{yB}PPym+f8xTpV;-=!;; zJuhGEb?H5K#o@~7t9DmUU1MD9xNd#Dz0azz?I)|B+WM{g+Xrk0I&awC=o(x)cy`EX z=)z6+o0o6-+`4{y+3mqQ%kSJBju{@g%f35#FZJHb`&swrA8dGtepviS>QUumrN{L@ z>;2q1Vm)$Z)P1z?N$8UYW2~{~zhwUMVZ87u`Dx{Z>O|9|`Q+&->FRy-Sjp7DHs zy69KwU-!MxeeuI@&cF4|M9z%AfP?@5 z`Tzg`fam}Kbua(`>RI+y?e7jT@qQ9J+u00v@9M??Vs0RI60puMM)0000$NklYLU|?YQ|NlP&Ho(Zp$iT!v0E{Yt1{Op8{{eS{gM$NJN3bw3Ffe3gWyNBXoHlLR f;-L}LguDp=Ko1NjM)XoO00000NkvXXu0mjf>xOCB literal 2746 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 A&;S4c diff --git a/rtdata/images/Dark/actions/previewmodeBC0-on.png b/rtdata/images/Dark/actions/previewmodeBC0-on.png index a1f462cb2021fbd58171c3af4627f202575c9397..f885bb4f82874981057d50b7a3d71b8f43c2e15f 100644 GIT binary patch literal 2832 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 delta 3420 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 diff --git a/rtdata/images/Dark/actions/previewmodeBC2-off.png b/rtdata/images/Dark/actions/previewmodeBC2-off.png index bd3862a0e26e0063adee93aab56c206adbc03dca..548fce401ced0abd4a7386684cc3751a2c1be964 100644 GIT binary patch delta 120 zcmX@A-y){i8Q|y6%O%Cdz`(%k>ERLtq&a|CjDrnG{=IxRVe>7X>0CbMo-U3d8t0Q! z5)u-A{QqyyYz)GzB&!dHcS6cRPGK358 VE_~gz_6X2022WQ%mvv4FO#s(MDYyUt delta 3421 zcmZn>JE~vb8Q|y6%O%Cdz`(%k>ERLtq{V=knS%{TPGA3Dn1O-mR8>esNl;?BLP1e} zT4qkFLP=#oszPc-W*P%S#jU4P12^4P;BoyQ={mhZrR7MG!Hk*j7My<1I(f-S@B2RS zzr%&41)L7pIvo1>_&3M>4*@!IlV&}iRD5KzmsU)D;D-v^a6iMf??X@S?w$8m@l;;I zjI_$@pLhP%e)H=^LgwxM^y&@U9{=FmBAv&W+IL1nrh1a~gb%69WBF6RuYNiG>6`6+ z*@}m5KVLeJC#l5M=HY?mB70sI37m28(JDGFUOG=Ke%hXWPxqERjH?ms|GBqpV;+Cy zG^Hcbt$!9>+%~y>-}OArFRy!EggtrAHnDm-|E=DOwLPDsVtpmOo^B8qE$;|zQkGDS zylXV+Vd#|HrA<#Fl9)HjNms~iWYs#NQW&tvZz|hd?ffeSM~|pW7d<<+DM#;E>+PmV zX^Rf3xmGao#933SYK(F`_8Q*P?xvlBH=_pE7PSXs2(;DDP7bKhqf>Dr!Y`r7enF}e&3 zEtJ?yT(uIGF1cYpO{RLqs`?DBRkN;M*_v^7Qt-7oo1a#?hYEWyn|Aih+KAGRPhQ|c2y&QCT+HBMOrB~0z zTJ_bRzw7ipuFCf1kua;vE7R@Xe%U-{hcO$!Waf(#huiv%Ud_F=?3Yh(+=*Jh-g>jG zo;ter)d9^n--tCmD_t~MvZGK*V7n)S^epwwFQy3j7fp`T>2Y4jleI+HZ@DKA%Vp0s z&F|jGJ+XT#X7X3i{GaSjgNuK;ixL;zeqvWt?Y#E<|GnEfVwV?WNu@qWY7S04&j0=6 z_0J!+GyePTVC2C0f6YVnnVWx1E?Z`)0ZifbiCEKiWv9I zW7+Eobw9oy{CB8}Wn0eA3Dx$h?#eL}9vUWRPO#63T$ya3Cc|}jLHWDoKVo7gzxMR~ z_%$@NlF=wzx^| z#0uTKVr7sK5Hnm-i<66hftQ(|rvNfDF)6>a#8ycOD6arDJS7=!c0p-TeGb^@lw|$X zoYdUZypm#lLp?)%u!fXmE4Tcj+(e)OnYoGSsrm(Z=}P(_=jub<3-rG}JODtBAQ{w? ztb-g|a9e`Qe(KtS!+xM8xa`NFgB)SJUZI-(cx}P$Y!dA!(-so#r@AfJ?1xxFqW`fO zgjbA^SEyq@AzN@ekreyMw}lk@X<-Y7{cuZ2@jr$sgaqKW;8sWl`-!lH3ieZE3(@w| z$QD%lku9M@_@f#Q=ONny7sOytYCk?(xDZXM)I4B2svOv0V))BQo6~bBI5n0T@pc@CmjA?33pdJu=iKnkC`$G;90XELF>7jRkLgJn-jv*44lmGnx l|G%D1ib0J{igA`C4}+2$3)A*jO?*Hl44$rjF6*2UngEv}Hbejb diff --git a/rtdata/images/Dark/actions/previewmodeBC2-on.png b/rtdata/images/Dark/actions/previewmodeBC2-on.png index 31630af594eb421a0e5dc59384706c1023efa37e..820f04c2018fc1a563ff0da64c5f25002bdd496d 100644 GIT binary patch delta 121 zcmX@2-zuiq8Q|y6%O%Cdz`(%k>ERLtq&a|CjDrnG{=IxRVe?I%>0G`Ro-U3d8t0S$ z{Qv*Ip3SC#)ocDy#r!iz92j`mSbJLboIDZmzy5&i$pZ%tG@PE>)6>J_th9o?nTa8A X7Vp9f`&OI+n#SPi>gTe~DWM4fRwyhn delta 3421 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 diff --git a/rtdata/images/Dark/actions/previewmodeBC3-on.png b/rtdata/images/Dark/actions/previewmodeBC3-on.png index ef36664d63b759062269cffa05784e654ebc5dec..69209dc4f391134bb680414c846306df8ae6a773 100644 GIT binary patch delta 126 zcmdn5-zBEl8Q|y6%O%Cdz`(%k>ERLtq&a|CjDrnG{=IxRVe?g<>0Cj!o-U3d8t0RB z^!5LrZ(!fx@N%=oliryU91RB-Fg)WERLtq{V=knS%{TPGA3Dn1O-mXjMo=Nl;?BLP1e} zT4qkFLP=#oszPc-W*P%S#jUqfqbJ=~5ODn;={n6}e?|l!Q{YtDl%G2la*oTTubOl+ zy+vigRg(h#1qJ_p*c~#D5%K2AniuS;`RLN3R_%H&%ed=PgRgwur-7yg>Gv}pZ>hQY!{~7a zBgbK}!UdW^jNVr_)WsNI3#d0W;^MBs1_IcGWzb+B>etG5cxsqQq&lf#9BVm*BV#CC?ew$M(%Cly_GB&MJ{9bQq zdh3dsVQk&M1#Fvt>$04Ed_>JyAX!!5yC(zpEcMMZJg2JfJgFmgY?%R@=_bzQmsQxB zs)TMYu-?tS(|;%HW&20R_A864?W%Xw^C_8q$2~89#n+$rv%7C>EBl?DGjJhu4Gx*oRfx93f_62}Xb8>YOC51aNXqL;D#&<3ma=O^pV#Vx)r%X0Mf z>Q$eZj8a5iq&zws&%nT$l?k*h!q>+tIX_n~F(p4KRj(qqfT14f5C$9jih{)C?9>v4 zq}24xJX@vryZ0+8WTx0Eg`4^s_!c;)W@LI)6{QAO`Gq7`WhYyvDB0U_*;H5oO~_3x zNmQuF&B-gas<2f88*Bw+gM{^!6u?SKvTc(&FEc++0c2)kQhsTPt&$Q@UIA)&N;2H+g3_WKkjeG>Darb& zIjOm+c_qdAhI)qjU=1nBR&M!4xrsmnGIJBtQ}qk-(v|dqcG>7d-3#=;K0E+Gjvx=z zlcJ4mTX0)~#eN#tf@wd@5-j#(DkfV5W(#fus9`^0Tc}|_CAJW6KW%J5vmeP4YJ@+U z=`b#mEifTWnqvEjvIWy#mOqmYei3vRhs+_3jn5V?M3X8t57>?>2R4`({x>*m zRGiKg%vs`sfLkset_relief(Gtk::RELIEF_NONE); backColor3->set_tooltip_markup (M("MAIN_TOOLTIP_BACKCOLOR3")); - backColor3->set_image(options.bgcolor == 2 ? *iBC3 : *igBC3); + backColor3->set_image(options.bgcolor == 3 ? *iBC3 : *igBC3); backColor2 = Gtk::manage (new Gtk::ToggleButton ()); backColor2->set_relief(Gtk::RELIEF_NONE); @@ -100,12 +100,12 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) backColor2->set_active (options.bgcolor == 2); backColor3->set_active (options.bgcolor == 3); - vbbackColor = Gtk::manage (new Gtk::VBox ()); - vbbackColor->pack_start (*backColor0, Gtk::PACK_SHRINK, 0); - vbbackColor->pack_start (*backColor1, Gtk::PACK_SHRINK, 0); - vbbackColor->pack_start (*backColor3, Gtk::PACK_SHRINK, 0); - vbbackColor->pack_start (*backColor2, Gtk::PACK_SHRINK, 0); - pack_start (*vbbackColor, Gtk::PACK_SHRINK, 0); + pack_start (*backColor0, Gtk::PACK_SHRINK, 0); + pack_start (*backColor1, Gtk::PACK_SHRINK, 0); + pack_start (*backColor3, Gtk::PACK_SHRINK, 0); + pack_start (*backColor2, Gtk::PACK_SHRINK, 0); + + pack_start (*Gtk::manage (new Gtk::VSeparator ()), Gtk::PACK_SHRINK, 2); pack_start (*previewR, Gtk::PACK_SHRINK, 0); pack_start (*previewG, Gtk::PACK_SHRINK, 0); diff --git a/rtgui/previewmodepanel.h b/rtgui/previewmodepanel.h index 83ec69d96..19136d770 100644 --- a/rtgui/previewmodepanel.h +++ b/rtgui/previewmodepanel.h @@ -35,7 +35,6 @@ protected: Gtk::ToggleButton* backColor1; Gtk::ToggleButton* backColor2; Gtk::ToggleButton* backColor3; - Gtk::VBox* vbbackColor; ImageArea* imageArea; Gtk::Image* iR, *igR; From 02b33ec1114a7538ef666fb9c35776378ede7137 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 20 Aug 2017 20:47:35 +0200 Subject: [PATCH 029/126] Added middle grey tooltip to languages/default --- rtdata/languages/default | 1 + 1 file changed, 1 insertion(+) diff --git a/rtdata/languages/default b/rtdata/languages/default index bf400c39f..352c4f92e 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -819,6 +819,7 @@ MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w MAIN_TOOLTIP_BACKCOLOR0;Background color of the preview: Theme-based\nShortcut: 9 MAIN_TOOLTIP_BACKCOLOR1;Background color of the preview: Black\nShortcut: 9 MAIN_TOOLTIP_BACKCOLOR2;Background color of the preview: White\nShortcut: 9 +MAIN_TOOLTIP_BACKCOLOR3;Background color of the preview: Middle grey\nShortcut: 9 MAIN_TOOLTIP_BEFOREAFTERLOCK;Lock / Unlock the Before view\n\nLock: keep the Before view unchanged.\nUseful to evaluate the cumulative effect of multiple tools.\nAdditionally, comparisons can be made to any state in the History.\n\nUnlock: the Before view will follow the After view one step behind, showing the image before the effect of the currently used tool. MAIN_TOOLTIP_HIDEHP;Show/Hide the left panel (including the history).\nShortcut: l MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication.\nShortcut: < From 2786478882e8f1328c5e50d62a5e70ff9ba1af7f Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 20 Aug 2017 21:50:11 +0200 Subject: [PATCH 030/126] Visible panel resizing handles in RT theme, closes #4020 --- rtdata/themes/RawTherapee-GTK3-20_.css | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index ff780a4e3..398bb97d4 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -639,18 +639,11 @@ paned box, paned grid { } paned > separator { - border-width: 1px; - border-color: #484848; - margin: 0; - padding: 0; -} -paned.horizontal > separator { - min-width: 2px; - border-style: none solid; -} -paned.vertical > separator { - min-height: 2px; - border-style: solid none; + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #404040; + padding: 0px; + margin: 4px; } #PlacesPaned { From 52bd71c12e2651e0b86b4976b11bbfc448310e6e Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 20 Aug 2017 22:10:04 +0200 Subject: [PATCH 031/126] Made previewmodeF-off.png more visible on dark themes --- .../images/Dark/actions/previewmodeF-off.png | Bin 3080 -> 3659 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/rtdata/images/Dark/actions/previewmodeF-off.png b/rtdata/images/Dark/actions/previewmodeF-off.png index 519de02bcc7405bfe5ac9cd0124bdd63a44c36e7..1236da5a10d439811ea70e97f5e1b93d32b3de78 100644 GIT binary patch literal 3659 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 delta 3075 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 Date: Mon, 21 Aug 2017 13:28:24 +0200 Subject: [PATCH 032/126] Update TooWaBlue theme to v 2.54 Reason: "New middle gray preview background color and vertical togglebuttons" #4029 --- rtdata/themes/TooWaBlue-GTK3-20_.css | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index e009c6d9a..deb46c87a 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2017 TooWaBoo - Version 2.53 - requires RT 5.0 (Gtk+ >= 3.20) + Version 2.54 - requires RT 5.0 (Gtk+ >= 3.20) RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1035,37 +1035,15 @@ window.csd:not(.fullscreen) #MainNotebook > header.top { margin-right: 0; } -#EditorTopPanel > box:nth-child(9) > button.image-button:not(:nth-child(6)) { +#EditorTopPanel > box:nth-child(9) > button.image-button:not(:last-child) { min-width: 0; padding-left: 0.33334em; padding-right: 0.33334em; } -#EditorTopPanel > box:nth-child(9) > button.image-button:nth-child(6) { +#EditorTopPanel > box:nth-child(9) > button.image-button:last-child { -gtk-icon-shadow: none; } -#EditorTopPanel > box > box > button { - min-height: 0.625em; - min-width: 0; - margin: 0 0.16667em; - padding: 0 0.16667em; - border: 0.08334em solid transparent; - background-color: transparent; - background-image: none; - box-shadow: none; -} -#EditorTopPanel > box > box > button:hover { - background-color: transparent; - background-image: none; - border: 0.08334em solid transparent; - box-shadow: none; -} -#EditorTopPanel > box > box > button:checked { - background-color: transparent; - background-image: none; - border: 0.08334em solid @bg-button-border; - box-shadow: none; -} /*Button editor bottom*/ #EditorZoomPanel label { From abe5268a10526267f705e4490836098b7d3bdfed Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 21 Aug 2017 13:46:22 +0200 Subject: [PATCH 033/126] Removed timing code --- rtengine/CA_correct_RT.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/rtengine/CA_correct_RT.cc b/rtengine/CA_correct_RT.cc index 0c0cc3f12..1df27c5fb 100644 --- a/rtengine/CA_correct_RT.cc +++ b/rtengine/CA_correct_RT.cc @@ -27,8 +27,6 @@ #include "rawimagesource.h" #include "rt_math.h" #include "median.h" -#define BENCHMARK -#include "StopWatch.h" namespace { @@ -115,8 +113,7 @@ using namespace rtengine; void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const double cablue, const double caautostrength, array2D &rawData) { - BENCHFUN -// multithreaded and partly vectorized by Ingo Weyrich +// multithreaded and vectorized by Ingo Weyrich constexpr int ts = 128; constexpr int tsh = ts / 2; //shifts to location of vertical and diagonal neighbors @@ -413,14 +410,14 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const vfloat rgb1mv4 = LC2VFU(rgb[1][indx - v4]); vfloat rgb1pv4 = LC2VFU(rgb[1][indx + v4]); vfloat temp1v = vabsf(vabsf((rgb1v - rgbcv) - (rgb1pv4 - LVFU(rgb[c][(indx + v4) >> 1]))) + - vabsf(rgb1mv4 - LVFU(rgb[c][(indx - v4) >> 1]) - rgb1v + rgbcv) - - vabsf(rgb1mv4 - LVFU(rgb[c][(indx - v4) >> 1]) - rgb1pv4 + LVFU(rgb[c][(indx + v4) >> 1]))); + vabsf(rgb1mv4 - LVFU(rgb[c][(indx - v4) >> 1]) - rgb1v + rgbcv) - + vabsf(rgb1mv4 - LVFU(rgb[c][(indx - v4) >> 1]) - rgb1pv4 + LVFU(rgb[c][(indx + v4) >> 1]))); STVFU(rbhpfv[indx >> 1], temp1v); vfloat rgb1m4 = LC2VFU(rgb[1][indx - 4]); vfloat rgb1p4 = LC2VFU(rgb[1][indx + 4]); vfloat temp2v = vabsf(vabsf((rgb1v - rgbcv) - (rgb1p4 - LVFU(rgb[c][(indx + 4) >> 1]))) + - vabsf(rgb1m4 - LVFU(rgb[c][(indx - 4) >> 1]) - rgb1v + rgbcv) - - vabsf(rgb1m4 - LVFU(rgb[c][(indx - 4) >> 1]) - rgb1p4 + LVFU(rgb[c][(indx + 4) >> 1]))); + vabsf(rgb1m4 - LVFU(rgb[c][(indx - 4) >> 1]) - rgb1v + rgbcv) - + vabsf(rgb1m4 - LVFU(rgb[c][(indx - 4) >> 1]) - rgb1p4 + LVFU(rgb[c][(indx + 4) >> 1]))); STVFU(rbhpfh[indx >> 1], temp2v); //low and high pass 1D filters of G in vertical/horizontal directions From a8c4039fe725fa5f14b45f848363e4daeefa9ec3 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 21 Aug 2017 15:42:33 +0200 Subject: [PATCH 034/126] Update TooWaBoo theme to v2.55, background & color buttons --- rtdata/themes/TooWaBlue-GTK3-20_.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index deb46c87a..5006d1715 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2017 TooWaBoo - Version 2.54 - requires RT 5.0 (Gtk+ >= 3.20) + Version 2.55 - requires RT 5.0 (Gtk+ >= 3.20) RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1037,8 +1037,8 @@ window.csd:not(.fullscreen) #MainNotebook > header.top { #EditorTopPanel > box:nth-child(9) > button.image-button:not(:last-child) { min-width: 0; - padding-left: 0.33334em; - padding-right: 0.33334em; + padding-left: 0.25em; + padding-right: 0.25em; } #EditorTopPanel > box:nth-child(9) > button.image-button:last-child { From 610f3e48532372a939f15d5f0ab2572b0dcfec0d Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Mon, 21 Aug 2017 18:42:15 +0200 Subject: [PATCH 035/126] added option to manually save the collapsed/expanded state of tools --- rtdata/languages/default | 2 ++ rtgui/editorpanel.cc | 8 ++++++++ rtgui/editorpanel.h | 1 + rtgui/options.cc | 5 +++++ rtgui/options.h | 1 + rtgui/preferences.cc | 17 +++++++++++++++++ rtgui/preferences.h | 3 +++ rtgui/rtwindow.cc | 30 ++++++++++++++++++++++++++++++ rtgui/rtwindow.h | 2 ++ rtgui/toolpanelcoord.cc | 17 +++++++++++++---- rtgui/toolpanelcoord.h | 2 ++ 11 files changed, 84 insertions(+), 4 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index bf400c39f..9ef2747c8 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1129,6 +1129,8 @@ PREFERENCES_TISTD;Standard PREFERENCES_TP_LABEL;Tool panel: PREFERENCES_TP_USEICONORTEXT;Use tab icons instead of text PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar +PREFERENCES_AUTOSAVE_TP_OPEN;Automatically save tools collapsed/expanded\nstate before exiting +PREFERENCES_SAVE_TP_OPEN_NOW;Save tools collapsed/expanded state now PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 8d2d6251a..ef77d7952 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -919,6 +919,14 @@ void EditorPanel::writeOptions() } } + +void EditorPanel::writeToolExpandedStatus(std::vector &tpOpen) +{ + if (tpc) { + tpc->writeToolExpandedStatus(tpOpen); + } +} + void EditorPanel::showTopPanel (bool show) { if (tbTopPanel_1->get_active() != show) { diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index d3d0eeaf7..473ec0022 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -74,6 +74,7 @@ public: } void writeOptions(); + void writeToolExpandedStatus(std::vector &tpOpen); void showTopPanel (bool show); bool isRealized() diff --git a/rtgui/options.cc b/rtgui/options.cc index 7293a3a63..c4d31a25d 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -405,6 +405,7 @@ void Options::setDefaults () editorToSendTo = 1; favoriteDirs.clear(); tpOpen.clear (); + autoSaveTpOpen = true; //crvOpen.clear (); parseExtensions.clear (); parseExtensionsEnabled.clear (); @@ -1434,6 +1435,9 @@ int Options::readFromFile (Glib::ustring fname) if (keyFile.has_key ("GUI", "ToolPanelsExpanded")) { tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded"); } + if (keyFile.has_key("GUI", "ToolPanelsExpandedAutoSave")) { + autoSaveTpOpen = keyFile.get_boolean("GUI", "ToolPanelsExpandedAutoSave"); + } if (keyFile.has_key ("GUI", "MultiDisplayMode")) { multiDisplayMode = keyFile.get_integer ("GUI", "MultiDisplayMode"); @@ -2100,6 +2104,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); Glib::ArrayHandle tpopen = tpOpen; keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); + keyFile.set_boolean("GUI", "ToolPanelsExpandedAutoSave", autoSaveTpOpen); keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); diff --git a/rtgui/options.h b/rtgui/options.h index 13025ee7c..c83b71d81 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -206,6 +206,7 @@ public: std::vector parseExtensionsEnabled; // List of bool to retain extension or not std::vector parsedExtensions; // List containing all retained extensions (lowercase) std::vector tpOpen; + bool autoSaveTpOpen; //std::vector crvOpen; std::vector baBehav; rtengine::Settings rtSettings; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index f0f35300f..1c8dbdc25 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -986,8 +986,21 @@ Gtk::Widget* Preferences::getGeneralPanel () workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1); workflowGrid->attach_next_to (*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1); workflowGrid->attach_next_to (*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1); + ckbAutoSaveTpOpen = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_AUTOSAVE_TP_OPEN"))); + workflowGrid->attach_next_to(*ckbAutoSaveTpOpen, *hb4label, Gtk::POS_BOTTOM, 1, 1); + btnSaveTpOpenNow = Gtk::manage(new Gtk::Button(M("PREFERENCES_SAVE_TP_OPEN_NOW"))); + setExpandAlignProperties(btnSaveTpOpenNow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to(*btnSaveTpOpenNow, *ckbAutoSaveTpOpen, Gtk::POS_RIGHT, 1, 1); + + auto save_tp_open_now = + [&]() -> void + { + parent->writeToolExpandedStatus(moptions.tpOpen); + }; + btnSaveTpOpenNow->signal_clicked().connect(save_tp_open_now); fworklflow->add (*workflowGrid); + mvbsd->attach_next_to (*fworklflow, Gtk::POS_TOP, 2, 1); // --------------------------------------------- @@ -1792,6 +1805,8 @@ void Preferences::storePreferences () moptions.overwriteOutputFile = chOverwriteOutputFile->get_active (); moptions.UseIconNoText = ckbUseIconNoText->get_active(); + moptions.autoSaveTpOpen = ckbAutoSaveTpOpen->get_active(); + moptions.rgbDenoiseThreadLimit = rgbDenoiseTreadLimitSB->get_value_as_int(); moptions.clutCacheSize = clutCacheSizeSB->get_value_as_int(); moptions.maxInspectorBuffers = maxInspectorBuffersSB->get_value_as_int(); @@ -2009,6 +2024,8 @@ void Preferences::fillPreferences () ckbHideTPVScrollbar->set_active (moptions.hideTPVScrollbar); ckbUseIconNoText->set_active (moptions.UseIconNoText); + ckbAutoSaveTpOpen->set_active(moptions.autoSaveTpOpen); + rgbDenoiseTreadLimitSB->set_value (moptions.rgbDenoiseThreadLimit); clutCacheSizeSB->set_value (moptions.clutCacheSize); maxInspectorBuffersSB->set_value (moptions.maxInspectorBuffers); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 1a86c64a9..655777b0a 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -201,6 +201,9 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::CheckButton* ckbHideTPVScrollbar; Gtk::CheckButton* ckbUseIconNoText; + Gtk::CheckButton* ckbAutoSaveTpOpen; + Gtk::Button* btnSaveTpOpenNow; + DynamicProfilePanel *dynProfilePanel; Glib::ustring storedValueRaw; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index c51d1b7f0..5199db399 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -680,6 +680,36 @@ bool RTWindow::on_delete_event(GdkEventAny* event) return false; } + +void RTWindow::writeToolExpandedStatus(std::vector &tpOpen) +{ + if ((isSingleTabMode() || gimpPlugin) && epanel->isRealized()) { + epanel->writeToolExpandedStatus(tpOpen); + } else { + // Storing the options of the last EditorPanel before Gtk destroys everything + // Look at the active panel first, if any, otherwise look at the first one (sorted on the filename) + if (epanels.size()) { + int page = mainNB->get_current_page(); + Gtk::Widget *w = mainNB->get_nth_page(page); + bool optionsWritten = false; + + for (std::map::iterator i = epanels.begin(); i != epanels.end(); ++i) { + if (i->second == w) { + i->second->writeToolExpandedStatus(tpOpen); + optionsWritten = true; + } + } + + if (!optionsWritten) { + // fallback solution: save the options of the first editor panel + std::map::iterator i = epanels.begin(); + i->second->writeToolExpandedStatus(tpOpen); + } + } + } +} + + void RTWindow::showPreferences () { Preferences *pref = new Preferences (this); diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index faad5f849..70d12d68e 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -119,6 +119,8 @@ public: void closeOpenEditors(); void setEditorMode(bool tabbedUI); void createSetmEditor(); + + void writeToolExpandedStatus(std::vector &tpOpen); }; #endif diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index b06463eff..f05167749 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -597,14 +597,23 @@ void ToolPanelCoordinator::writeOptions () { crop->writeOptions (); - options.tpOpen.clear (); + + if (options.autoSaveTpOpen) { + writeToolExpandedStatus(options.tpOpen); + } +} + + +void ToolPanelCoordinator::writeToolExpandedStatus(std::vector &tpOpen) +{ + tpOpen.clear (); for (size_t i = 0; i < expList.size(); i++) { - options.tpOpen.push_back (expList.at(i)->get_expanded ()); + tpOpen.push_back (expList.at(i)->get_expanded ()); } - wavelet->writeOptions(options.tpOpen); - retinex->writeOptions(options.tpOpen); + wavelet->writeOptions(tpOpen); + retinex->writeOptions(tpOpen); } diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index cfb85e372..4ce02ab14 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -239,6 +239,8 @@ public: // read/write the "expanded" state of the expanders & read/write the crop panel settings (ratio, guide type, etc.) void readOptions (); void writeOptions (); + void writeToolExpandedStatus(std::vector &tpOpen); + // wbprovider interface void getAutoWB (double& temp, double& green, double equal, double tempBias) From f409f1333ec9e29cb0c9d4cbc50383e8bbac7f7e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 22 Aug 2017 01:21:09 +0200 Subject: [PATCH 036/126] Speedup for green equilibration --- rtengine/green_equil_RT.cc | 183 ++++++++++++++++++++++--------------- rtengine/rawimagesource.cc | 51 ++++++----- 2 files changed, 136 insertions(+), 98 deletions(-) diff --git a/rtengine/green_equil_RT.cc b/rtengine/green_equil_RT.cc index 8b1136359..53943e9a8 100644 --- a/rtengine/green_equil_RT.cc +++ b/rtengine/green_equil_RT.cc @@ -30,6 +30,8 @@ #include "rt_math.h" #include "rawimagesource.h" +#include "opthelper.h" + namespace rtengine { @@ -42,15 +44,25 @@ void RawImageSource::green_equilibrate(float thresh, array2D &rawData) int height = H, width = W; // local variables - float** rawptr = rawData; - array2D cfa (width, height, rawptr); - //array2D checker (width,height,ARRAY2D_CLEAR_DATA); + array2D cfa(width / 2 + (width & 1), height); +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + for(int i = 0; i < height; ++i) { + int j = (FC(i,0) & 1) ^ 1; +#ifdef __SSE2__ + for(; j < width - 7; j += 8) { + STVFU(cfa[i][j>>1], LC2VFU(rawData[i][j])); + } +#endif + for(; j < width; j += 2) { + cfa[i][j>>1] = rawData[i][j]; + } + } - //int verbose=1; - - static const float eps = 1.0; //tolerance to avoid dividing by zero - + constexpr float eps = 1.f; //tolerance to avoid dividing by zero + const float thresh6 = 6 * thresh; // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // Fill G interpolated values with border interpolation and input values @@ -59,93 +71,116 @@ void RawImageSource::green_equilibrate(float thresh, array2D &rawData) //int counter, vtest; //The green equilibration algorithm starts here - /* - #ifdef _OPENMP - #pragma omp parallel for - #endif - for (int rr=1; rr < height-1; rr++) - for (int cc=3-(FC(rr,2)&1); cc < width-2; cc+=2) { - - float pcorr = (cfa[rr+1][cc+1]-cfa[rr][cc])*(cfa[rr-1][cc-1]-cfa[rr][cc]); - float mcorr = (cfa[rr-1][cc+1]-cfa[rr][cc])*(cfa[rr+1][cc-1]-cfa[rr][cc]); - - if (pcorr>0 && mcorr>0) {checker[rr][cc]=1;} else {checker[rr][cc]=0;} - - checker[rr][cc]=1;//test what happens if we always interpolate - } - - counter=vtest=0; - */ //now smooth the cfa data #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) + #pragma omp parallel +#endif +{ +#ifdef __SSE2__ + vfloat zd5v = F2V(0.5f); + vfloat onev = F2V(1.f); + vfloat threshv = F2V(thresh); + vfloat thresh6v = F2V(thresh6); + vfloat epsv = F2V(eps); +#endif +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) #endif - for (int rr = 4; rr < height - 4; rr++) - for (int cc = 5 - (FC(rr, 2) & 1); cc < width - 6; cc += 2) { - //if (checker[rr][cc]) { - //%%%%%%%%%%%%%%%%%%%%%% - //neighbor checking code from Manuel Llorens Garcia - float o1_1 = cfa[(rr - 1)][cc - 1]; - float o1_2 = cfa[(rr - 1)][cc + 1]; - float o1_3 = cfa[(rr + 1)][cc - 1]; - float o1_4 = cfa[(rr + 1)][cc + 1]; - float o2_1 = cfa[(rr - 2)][cc]; - float o2_2 = cfa[(rr + 2)][cc]; - float o2_3 = cfa[(rr)][cc - 2]; - float o2_4 = cfa[(rr)][cc + 2]; + for (int rr = 4; rr < height - 4; rr++) { + int cc = 5 - (FC(rr, 2) & 1); +#ifdef __SSE2__ + for (; cc < width - 12; cc += 8) { + //neighbour checking code from Manuel Llorens Garcia + vfloat o1_1 = LVFU(cfa[rr - 1][(cc - 1)>>1]); + vfloat o1_2 = LVFU(cfa[rr - 1][(cc + 1)>>1]); + vfloat o1_3 = LVFU(cfa[rr + 1][(cc - 1)>>1]); + vfloat o1_4 = LVFU(cfa[rr + 1][(cc + 1)>>1]); + vfloat o2_1 = LVFU(cfa[rr - 2][cc>>1]); + vfloat o2_2 = LVFU(cfa[rr + 2][cc>>1]); + vfloat o2_3 = LVFU(cfa[rr][(cc - 2)>>1]); + vfloat o2_4 = LVFU(cfa[rr][(cc + 2)>>1]); - float d1 = (o1_1 + o1_2 + o1_3 + o1_4) * 0.25f; - float d2 = (o2_1 + o2_2 + o2_3 + o2_4) * 0.25f; + vfloat d1 = (o1_1 + o1_2 + o1_3 + o1_4); + vfloat d2 = (o2_1 + o2_2 + o2_3 + o2_4); - float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)) / 6.f; - float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)) / 6.f; - //%%%%%%%%%%%%%%%%%%%%%% + vfloat c1 = (vabsf(o1_1 - o1_2) + vabsf(o1_1 - o1_3) + vabsf(o1_1 - o1_4) + vabsf(o1_2 - o1_3) + vabsf(o1_3 - o1_4) + vabsf(o1_2 - o1_4)); + vfloat c2 = (vabsf(o2_1 - o2_2) + vabsf(o2_1 - o2_3) + vabsf(o2_1 - o2_4) + vabsf(o2_2 - o2_3) + vabsf(o2_3 - o2_4) + vabsf(o2_2 - o2_4)); - //vote1=(checker[rr-2][cc]+checker[rr][cc-2]+checker[rr][cc+2]+checker[rr+2][cc]); - //vote2=(checker[rr+1][cc-1]+checker[rr+1][cc+1]+checker[rr-1][cc-1]+checker[rr-1][cc+1]); - //if ((vote1==0 || vote2==0) && (c1+c2)<2*thresh*fabs(d1-d2)) vtest++; - //if (vote1>0 && vote2>0 && (c1+c2)<4*thresh*fabs(d1-d2)) { - if ((c1 + c2) < 4 * thresh * fabs(d1 - d2)) { + vmask mask1 = vmaskf_lt(c1 + c2, thresh6v * vabsf(d1 - d2)); + if(_mm_movemask_ps((vfloat)mask1)) { // if for any of the 4 pixels the condition is true, do the maths for all 4 pixels and mask the unused out at the end //pixel interpolation - float gin = cfa[rr][cc]; + vfloat gin = LVFU(cfa[rr][cc>>1]); - float gse = (cfa[rr + 1][cc + 1]) + 0.5f * (cfa[rr][cc] - cfa[rr + 2][cc + 2]); - float gnw = (cfa[rr - 1][cc - 1]) + 0.5f * (cfa[rr][cc] - cfa[rr - 2][cc - 2]); - float gne = (cfa[rr - 1][cc + 1]) + 0.5f * (cfa[rr][cc] - cfa[rr - 2][cc + 2]); - float gsw = (cfa[rr + 1][cc - 1]) + 0.5f * (cfa[rr][cc] - cfa[rr + 2][cc - 2]); + vfloat gmp2p2 = gin - LVFU(cfa[rr + 2][(cc + 2)>>1]); + vfloat gmm2m2 = gin - LVFU(cfa[rr - 2][(cc - 2)>>1]); + vfloat gmm2p2 = gin - LVFU(cfa[rr - 2][(cc + 2)>>1]); + vfloat gmp2m2 = gin - LVFU(cfa[rr + 2][(cc - 2)>>1]); + vfloat gse = o1_4 + zd5v * gmp2p2; + vfloat gnw = o1_1 + zd5v * gmm2m2; + vfloat gne = o1_2 + zd5v * gmm2p2; + vfloat gsw = o1_3 + zd5v * gmp2m2; + vfloat wtse = onev / (epsv + SQRV(gmp2p2) + SQRV(LVFU(cfa[rr + 3][(cc + 3)>>1]) - o1_4)); + vfloat wtnw = onev / (epsv + SQRV(gmm2m2) + SQRV(LVFU(cfa[rr - 3][(cc - 3)>>1]) - o1_1)); + vfloat wtne = onev / (epsv + SQRV(gmm2p2) + SQRV(LVFU(cfa[rr - 3][(cc + 3)>>1]) - o1_2)); + vfloat wtsw = onev / (epsv + SQRV(gmp2m2) + SQRV(LVFU(cfa[rr + 3][(cc - 3)>>1]) - o1_3)); - float wtse = 1.0f / (eps + SQR(cfa[rr + 2][cc + 2] - cfa[rr][cc]) + SQR(cfa[rr + 3][cc + 3] - cfa[rr + 1][cc + 1])); - float wtnw = 1.0f / (eps + SQR(cfa[rr - 2][cc - 2] - cfa[rr][cc]) + SQR(cfa[rr - 3][cc - 3] - cfa[rr - 1][cc - 1])); - float wtne = 1.0f / (eps + SQR(cfa[rr - 2][cc + 2] - cfa[rr][cc]) + SQR(cfa[rr - 3][cc + 3] - cfa[rr - 1][cc + 1])); - float wtsw = 1.0f / (eps + SQR(cfa[rr + 2][cc - 2] - cfa[rr][cc]) + SQR(cfa[rr + 3][cc - 3] - cfa[rr + 1][cc - 1])); + vfloat ginterp = (gse * wtse + gnw * wtnw + gne * wtne + gsw * wtsw) / (wtse + wtnw + wtne + wtsw); + + vfloat val = vself(vmaskf_lt(ginterp - gin, threshv * (ginterp + gin)), zd5v * (ginterp + gin), gin); + val = vself(mask1, val, gin); + STC2VFU(rawData[rr][cc], val); + } + } +#endif + for (; cc < width - 6; cc += 2) { + //neighbour checking code from Manuel Llorens Garcia + float o1_1 = cfa[rr - 1][(cc - 1)>>1]; + float o1_2 = cfa[rr - 1][(cc + 1)>>1]; + float o1_3 = cfa[rr + 1][(cc - 1)>>1]; + float o1_4 = cfa[rr + 1][(cc + 1)>>1]; + float o2_1 = cfa[rr - 2][cc>>1]; + float o2_2 = cfa[rr + 2][cc>>1]; + float o2_3 = cfa[rr][(cc - 2)>>1]; + float o2_4 = cfa[rr][(cc + 2)>>1]; + + float d1 = (o1_1 + o1_2) + (o1_3 + o1_4); + float d2 = (o2_1 + o2_2) + (o2_3 + o2_4); + + float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)); + float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)); + + if (c1 + c2 < thresh6 * fabs(d1 - d2)) { + //pixel interpolation + float gin = cfa[rr][cc>>1]; + + float gmp2p2 = gin - cfa[rr + 2][(cc + 2)>>1]; + float gmm2m2 = gin - cfa[rr - 2][(cc - 2)>>1]; + float gmm2p2 = gin - cfa[rr - 2][(cc + 2)>>1]; + float gmp2m2 = gin - cfa[rr + 2][(cc - 2)>>1]; + + float gse = o1_4 + 0.5f * gmp2p2; + float gnw = o1_1 + 0.5f * gmm2m2; + float gne = o1_2 + 0.5f * gmm2p2; + float gsw = o1_3 + 0.5f * gmp2m2; + + float wtse = 1.f / (eps + SQR(gmp2p2) + SQR(cfa[rr + 3][(cc + 3)>>1] - o1_4)); + float wtnw = 1.f / (eps + SQR(gmm2m2) + SQR(cfa[rr - 3][(cc - 3)>>1] - o1_1)); + float wtne = 1.f / (eps + SQR(gmm2p2) + SQR(cfa[rr - 3][(cc + 3)>>1] - o1_2)); + float wtsw = 1.f / (eps + SQR(gmp2m2) + SQR(cfa[rr + 3][(cc - 3)>>1] - o1_3)); float ginterp = (gse * wtse + gnw * wtnw + gne * wtne + gsw * wtsw) / (wtse + wtnw + wtne + wtsw); - if ( ((ginterp - gin) < thresh * (ginterp + gin)) ) { + if (ginterp - gin < thresh * (ginterp + gin)) { rawData[rr][cc] = 0.5f * (ginterp + gin); - //counter++; } } - - // } } - - //printf("pixfix count= %d; vtest= %d \n",counter,vtest); - // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - // done - /*t2 = clock(); - dt = ((double)(t2-t1)) / CLOCKS_PER_SEC; - if (verbose) { - fprintf(stderr,_("elapsed time = %5.3fs\n"),dt); - }*/ - - + } +} } } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 148d17ee9..9418de0ba 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1915,43 +1915,46 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le // check if it is an olympus E camera, if yes, compute G channel pre-compensation factors if ( ri->getSensorType() == ST_BAYER && (raw.bayersensor.greenthresh || (((idata->getMake().size() >= 7 && idata->getMake().substr(0, 7) == "OLYMPUS" && idata->getModel()[0] == 'E') || (idata->getMake().size() >= 9 && idata->getMake().substr(0, 9) == "Panasonic")) && raw.bayersensor.method != RAWParams::BayerSensor::methodstring[ RAWParams::BayerSensor::vng4])) ) { + StopWatch stop1("gel part one"); // global correction - int ng1 = 0, ng2 = 0, i = 0; + int ng1 = 0, ng2 = 0; double avgg1 = 0., avgg2 = 0.; #ifdef _OPENMP - #pragma omp parallel for default(shared) private(i) reduction(+: ng1, ng2, avgg1, avgg2) + #pragma omp parallel for reduction(+: ng1, ng2, avgg1, avgg2) schedule(dynamic,16) #endif - for (i = border; i < H - border; i++) - for (int j = border; j < W - border; j++) - if (ri->ISGREEN(i, j)) { - if (i & 1) { - avgg2 += rawData[i][j]; - ng2++; - } else { - avgg1 += rawData[i][j]; - ng1++; - } - } - - double corrg1 = ((double)avgg1 / ng1 + (double)avgg2 / ng2) / 2.0 / ((double)avgg1 / ng1); - double corrg2 = ((double)avgg1 / ng1 + (double)avgg2 / ng2) / 2.0 / ((double)avgg2 / ng2); + for (int i = border; i < H - border; i++) { + double avgg = 0.; + for (int j = border + ((FC(i, border) & 1) ^ 1); j < W - border; j += 2) { + avgg += rawData[i][j]; + } + int ng = (W - 2 * border + (FC(i, border) & 1)) / 2; + if (i & 1) { + avgg2 += avgg; + ng2 += ng; + } else { + avgg1 += avgg; + ng1 += ng; + } + } + double corrg1 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg1 / ng1); + double corrg2 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg2 / ng2); #ifdef _OPENMP - #pragma omp parallel for default(shared) + #pragma omp parallel for schedule(dynamic,16) #endif - for (int i = border; i < H - border; i++) - for (int j = border; j < W - border; j++) - if (ri->ISGREEN(i, j)) { - float currData; - currData = (float)(rawData[i][j] * ((i & 1) ? corrg2 : corrg1)); - rawData[i][j] = (currData); - } + for (int i = border; i < H - border; i++) { + double corrg = (i & 1) ? corrg2 : corrg1; + for (int j = border + ((FC(i, border) & 1) ^ 1); j < W - border; j += 2) { + rawData[i][j] *= corrg; + } + } } if ( ri->getSensorType() == ST_BAYER && raw.bayersensor.greenthresh > 0) { + StopWatch Stop1("gel part two"); if (plistener) { plistener->setProgressStr ("Green equilibrate..."); plistener->setProgress (0.0); From f70ba32c9d2767c9941d28b8fe20ccb7cc0aed67 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 22 Aug 2017 08:48:33 +0200 Subject: [PATCH 037/126] run through astyle --- rtgui/editorpanel.cc | 729 +++++++++++++++++++++------------------- rtgui/editorpanel.h | 20 +- rtgui/options.cc | 19 +- rtgui/options.h | 35 +- rtgui/preferences.cc | 39 ++- rtgui/preferences.h | 22 +- rtgui/rtwindow.cc | 440 ++++++++++++------------ rtgui/rtwindow.h | 32 +- rtgui/toolpanelcoord.cc | 233 ++++++------- rtgui/toolpanelcoord.h | 8 +- 10 files changed, 814 insertions(+), 763 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index ef77d7952..71d0729e6 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -72,61 +72,70 @@ int setprogressStrUI ( void *p ) } -bool find_default_monitor_profile(GdkWindow *rootwin, Glib::ustring &defprof, Glib::ustring &defprofname) +bool find_default_monitor_profile (GdkWindow *rootwin, Glib::ustring &defprof, Glib::ustring &defprofname) { #ifdef WIN32 - HDC hDC = GetDC(nullptr); + HDC hDC = GetDC (nullptr); if (hDC != nullptr) { - if (SetICMMode(hDC, ICM_ON)) { + if (SetICMMode (hDC, ICM_ON)) { char profileName[MAX_PATH + 1]; DWORD profileLength = MAX_PATH; - if (GetICMProfileA(hDC, &profileLength, profileName)) { - defprof = Glib::ustring(profileName); - defprofname = Glib::path_get_basename(defprof); - size_t pos = defprofname.rfind("."); + if (GetICMProfileA (hDC, &profileLength, profileName)) { + defprof = Glib::ustring (profileName); + defprofname = Glib::path_get_basename (defprof); + size_t pos = defprofname.rfind ("."); if (pos != Glib::ustring::npos) { - defprofname = defprofname.substr(0, pos); + defprofname = defprofname.substr (0, pos); } - defprof = Glib::ustring("file:") + defprof; + + defprof = Glib::ustring ("file:") + defprof; return true; } // might fail if e.g. the monitor has no profile } - ReleaseDC(NULL, hDC); + ReleaseDC (NULL, hDC); } + #elif !defined(__APPLE__) // taken from geeqie (image.c) and adapted // Originally licensed as GPL v2+, with the following copyright: // * Copyright (C) 2006 John Ellis // * Copyright (C) 2008 - 2016 The Geeqie Team - // + // guchar *prof = nullptr; gint proflen; GdkAtom type = GDK_NONE; gint format = 0; - if (gdk_property_get(rootwin, gdk_atom_intern("_ICC_PROFILE", FALSE), GDK_NONE, 0, 64 * 1024 * 1024, FALSE, &type, &format, &proflen, &prof) && proflen > 0) { - cmsHPROFILE p = cmsOpenProfileFromMem(prof, proflen); + + if (gdk_property_get (rootwin, gdk_atom_intern ("_ICC_PROFILE", FALSE), GDK_NONE, 0, 64 * 1024 * 1024, FALSE, &type, &format, &proflen, &prof) && proflen > 0) { + cmsHPROFILE p = cmsOpenProfileFromMem (prof, proflen); + if (p) { defprofname = "from GDK"; - defprof = Glib::build_filename(Options::rtdir, "GDK_ICC_PROFILE.icc"); - if (cmsSaveProfileToFile(p, defprof.c_str())) { - cmsCloseProfile(p); + defprof = Glib::build_filename (Options::rtdir, "GDK_ICC_PROFILE.icc"); + + if (cmsSaveProfileToFile (p, defprof.c_str())) { + cmsCloseProfile (p); + if (prof) { - g_free(prof); + g_free (prof); } - defprof = Glib::ustring("file:") + defprof; + + defprof = Glib::ustring ("file:") + defprof; return true; } } } + if (prof) { - g_free(prof); + g_free (prof); } + #endif return false; } @@ -153,26 +162,31 @@ private: #if !defined(__APPLE__) // monitor profile not supported on apple void prepareProfileBox () { - profileBox.setPreferredWidth(70, 200); + profileBox.setPreferredWidth (70, 200); setExpandAlignProperties (&profileBox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); profileBox.append (M ("PREFERENCES_PROFILE_NONE")); Glib::ustring defprofname; - if (find_default_monitor_profile(profileBox.get_root_window()->gobj(), defprof, defprofname)) { + + if (find_default_monitor_profile (profileBox.get_root_window()->gobj(), defprof, defprofname)) { profileBox.append (M ("MONITOR_PROFILE_SYSTEM") + " (" + defprofname + ")"); + if (options.rtSettings.autoMonitorProfile) { - rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName(defprof); - profileBox.set_active(1); + rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName (defprof); + profileBox.set_active (1); } else { - profileBox.set_active(0); + profileBox.set_active (0); } } else { profileBox.set_active (0); } + const std::vector profiles = rtengine::ICCStore::getInstance()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR); - for (const auto profile: profiles) { + + for (const auto profile : profiles) { profileBox.append (profile); } + profileBox.set_tooltip_text (profileBox.get_active_text ()); } #endif @@ -181,34 +195,34 @@ private: { // same order as the enum intentBox.addEntry ("intent-perceptual.png", M ("PREFERENCES_INTENT_PERCEPTUAL")); - intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); + intentBox.addEntry ("intent-relative.png", M ("PREFERENCES_INTENT_RELATIVE")); intentBox.addEntry ("intent-absolute.png", M ("PREFERENCES_INTENT_ABSOLUTE")); setExpandAlignProperties (intentBox.buttonGroup, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); - intentBox.setSelected(1); + intentBox.setSelected (1); intentBox.show (); } void prepareSoftProofingBox () { Gtk::Image *softProofImage = Gtk::manage (new RTImage ("softProof.png")); - softProofImage->set_padding(0, 0); - softProof.add(*softProofImage); - softProof.set_relief(Gtk::RELIEF_NONE); - softProof.set_tooltip_markup(M("SOFTPROOF_TOOLTIP")); + softProofImage->set_padding (0, 0); + softProof.add (*softProofImage); + softProof.set_relief (Gtk::RELIEF_NONE); + softProof.set_tooltip_markup (M ("SOFTPROOF_TOOLTIP")); - softProof.set_active(false); - softProof.set_sensitive(canSProof); + softProof.set_active (false); + softProof.set_sensitive (canSProof); softProof.show (); Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png")); - spGamutCheckImage->set_padding(0, 0); - spGamutCheck.add(*spGamutCheckImage); - spGamutCheck.set_relief(Gtk::RELIEF_NONE); - spGamutCheck.set_tooltip_markup(M("SOFTPROOF_GAMUTCHECK_TOOLTIP")); + spGamutCheckImage->set_padding (0, 0); + spGamutCheck.add (*spGamutCheckImage); + spGamutCheck.set_relief (Gtk::RELIEF_NONE); + spGamutCheck.set_tooltip_markup (M ("SOFTPROOF_GAMUTCHECK_TOOLTIP")); - spGamutCheck.set_active(false); - spGamutCheck.set_sensitive(false); + spGamutCheck.set_active (false); + spGamutCheck.set_sensitive (false); spGamutCheck.show (); } @@ -244,30 +258,35 @@ private: Glib::ustring profile; #if !defined(__APPLE__) // monitor profile not supported on apple + if (!defprof.empty() && profileBox.get_active_row_number () == 1) { profile = defprof; + if (profile.empty ()) { profile = options.rtSettings.monitorProfile; } + if (profile.empty ()) { profile = "sRGB IEC61966-2.1"; } } else if (profileBox.get_active_row_number () > 0) { profile = profileBox.get_active_text (); } + #else profile = "RT_sRGB"; #endif #if !defined(__APPLE__) // monitor profile not supported on apple + if (profileBox.get_active_row_number () == 0) { profile.clear (); intentBox.set_sensitive (false); intentBox.setSelected (1); - softProof.set_sensitive(false); - spGamutCheck.set_sensitive(false); + softProof.set_sensitive (false); + spGamutCheck.set_sensitive (false); profileBox.set_tooltip_text (""); @@ -279,38 +298,40 @@ private: if (supportsPerceptual || supportsRelativeColorimetric || supportsAbsoluteColorimetric) { intentBox.set_sensitive (true); - intentBox.setItemSensitivity(0, supportsPerceptual); - intentBox.setItemSensitivity(1, supportsRelativeColorimetric); - intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric); - softProof.set_sensitive(canSProof); - spGamutCheck.set_sensitive(canSProof); + intentBox.setItemSensitivity (0, supportsPerceptual); + intentBox.setItemSensitivity (1, supportsRelativeColorimetric); + intentBox.setItemSensitivity (2, supportsAbsoluteColorimetric); + softProof.set_sensitive (canSProof); + spGamutCheck.set_sensitive (canSProof); } else { - intentBox.setItemSensitivity(0, true); - intentBox.setItemSensitivity(1, true); - intentBox.setItemSensitivity(2, true); + intentBox.setItemSensitivity (0, true); + intentBox.setItemSensitivity (1, true); + intentBox.setItemSensitivity (2, true); intentBox.set_sensitive (false); intentBox.setSelected (1); - softProof.set_sensitive(false); - spGamutCheck.set_sensitive(false); + softProof.set_sensitive (false); + spGamutCheck.set_sensitive (false); } profileBox.set_tooltip_text (profileBox.get_active_text ()); } + #endif rtengine::RenderingIntent intent; + switch (intentBox.getSelected ()) { - default: - case 0: - intent = rtengine::RI_PERCEPTUAL; - break; + default: + case 0: + intent = rtengine::RI_PERCEPTUAL; + break; - case 1: - intent = rtengine::RI_RELATIVE; - break; + case 1: + intent = rtengine::RI_RELATIVE; + break; - case 2: - intent = rtengine::RI_ABSOLUTE; - break; + case 2: + intent = rtengine::RI_ABSOLUTE; + break; } if (!processor) { @@ -320,8 +341,10 @@ private: if (!noEvent) { processor->beginUpdateParams (); } + processor->setMonitorProfile (profile, intent); processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); + if (!noEvent) { processor->endUpdateParams (rtengine::EvMonitorTransform); } @@ -331,36 +354,43 @@ private: { if (!canSProof) { ConnectionBlocker profileBlocker (softproofConn); - softProof.set_active(false); - softProof.set_sensitive(false); + softProof.set_active (false); + softProof.set_sensitive (false); #if !defined(__APPLE__) // monitor profile not supported on apple } else { - softProof.set_sensitive(profileBox.get_active_row_number () > 0); + softProof.set_sensitive (profileBox.get_active_row_number () > 0); #endif } - spGamutCheck.set_sensitive(softProof.get_sensitive() && softProof.get_active()); + + spGamutCheck.set_sensitive (softProof.get_sensitive() && softProof.get_active()); #if !defined(__APPLE__) // monitor profile not supported on apple + if (profileBox.get_active_row_number () > 0) { #endif + if (processor) { if (!noEvent) { processor->beginUpdateParams (); } + processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); + if (!noEvent) { processor->endUpdateParams (rtengine::EvMonitorTransform); } } + #if !defined(__APPLE__) // monitor profile not supported on apple } + #endif } public: explicit ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) : intentBox (Glib::ustring (), true), - canSProof(!options.rtSettings.printerProfile.empty() && options.rtSettings.printerProfile != "None"), // assuming the printer profile exist! + canSProof (!options.rtSettings.printerProfile.empty() && options.rtSettings.printerProfile != "None"), // assuming the printer profile exist! processor (ipc) { #if !defined(__APPLE__) // monitor profile not supported on apple @@ -371,8 +401,8 @@ public: reset (); - softproofConn = softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); - spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled)); + softproofConn = softProof.signal_toggled().connect (sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); + spGamutCheck.signal_toggled().connect (sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled)); #if !defined(__APPLE__) // monitor profile not supported on apple profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged)); #endif @@ -389,7 +419,7 @@ public: grid->attach_next_to (spGamutCheck, Gtk::POS_RIGHT, 1, 1); } - void canSoftProof(bool canSP) + void canSoftProof (bool canSP) { canSProof = canSP; updateSoftProofParameters(); @@ -398,7 +428,7 @@ public: void updateProcessor() { if (processor) { - updateParameters(true); + updateParameters (true); } } @@ -409,43 +439,44 @@ public: ConnectionBlocker profileBlocker (profileConn); if (!defprof.empty() && options.rtSettings.autoMonitorProfile) { - profileBox.set_active(1); + profileBox.set_active (1); } else { setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0); } + #endif switch (options.rtSettings.monitorIntent) { - default: - case rtengine::RI_PERCEPTUAL: - intentBox.setSelected (0); - break; + default: + case rtengine::RI_PERCEPTUAL: + intentBox.setSelected (0); + break; - case rtengine::RI_RELATIVE: - intentBox.setSelected (1); - break; + case rtengine::RI_RELATIVE: + intentBox.setSelected (1); + break; - case rtengine::RI_ABSOLUTE: - intentBox.setSelected (2); - break; + case rtengine::RI_ABSOLUTE: + intentBox.setSelected (2); + break; } updateParameters (); } - void defaultMonitorProfileChanged(const Glib::ustring &profile_name, bool auto_monitor_profile) + void defaultMonitorProfileChanged (const Glib::ustring &profile_name, bool auto_monitor_profile) { ConnectionBlocker profileBlocker (profileConn); - + if (auto_monitor_profile && !defprof.empty()) { - rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName(defprof); + rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName (defprof); #ifndef __APPLE__ - profileBox.set_active(1); + profileBox.set_active (1); #endif } else { - rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName(profile_name); + rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName (profile_name); #ifndef __APPLE__ - setActiveTextOrIndex(profileBox, profile_name, 0); + setActiveTextOrIndex (profileBox, profile_name, 0); #endif } } @@ -453,7 +484,7 @@ public: }; EditorPanel::EditorPanel (FilePanel* filePanel) - : catalogPane(nullptr), realized(false), tbBeforeLock(nullptr), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), previewHandler(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), beforeLabel(nullptr), afterLabel(nullptr), beforeHeaderBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), parentWindow(nullptr), openThm(nullptr), isrc(nullptr), ipc(nullptr), beforeIpc(nullptr), err(0), isProcessing(false) + : catalogPane (nullptr), realized (false), tbBeforeLock (nullptr), iHistoryShow (nullptr), iHistoryHide (nullptr), iTopPanel_1_Show (nullptr), iTopPanel_1_Hide (nullptr), iRightPanel_1_Show (nullptr), iRightPanel_1_Hide (nullptr), iBeforeLockON (nullptr), iBeforeLockOFF (nullptr), previewHandler (nullptr), beforePreviewHandler (nullptr), beforeIarea (nullptr), beforeBox (nullptr), afterBox (nullptr), beforeLabel (nullptr), afterLabel (nullptr), beforeHeaderBox (nullptr), afterHeaderBox (nullptr), parent (nullptr), parentWindow (nullptr), openThm (nullptr), isrc (nullptr), ipc (nullptr), beforeIpc (nullptr), err (0), isProcessing (false) { epih = new EditorPanelIdleHelper; @@ -477,7 +508,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) profilep = Gtk::manage (new ProfilePanel ()); ppframe = new Gtk::Frame (); - ppframe->set_name("ProfilePanel"); + ppframe->set_name ("ProfilePanel"); ppframe->add (*profilep); ppframe->set_label (M ("PROFILEPANEL_LABEL")); //leftbox->pack_start (*ppframe, Gtk::PACK_SHRINK, 4); @@ -551,7 +582,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iareapanel = new ImageAreaPanel (); tpc->setEditProvider (iareapanel->imageArea); - tpc->getToolBar()->setLockablePickerToolListener(iareapanel->imageArea); + tpc->getToolBar()->setLockablePickerToolListener (iareapanel->imageArea); Gtk::HBox* toolBarPanel = Gtk::manage (new Gtk::HBox ()); toolBarPanel->set_name ("EditorTopPanel"); @@ -580,7 +611,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) afterBox->pack_start (*iareapanel); beforeAfterBox = Gtk::manage (new Gtk::HBox()); - beforeAfterBox->set_name("BeforeAfterContainer"); + beforeAfterBox->set_name ("BeforeAfterContainer"); beforeAfterBox->pack_start (*afterBox); editbox->pack_start (*toolBarPanel, Gtk::PACK_SHRINK, 2); @@ -680,6 +711,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iops->attach_next_to (*vsep2, Gtk::POS_LEFT, 1, 1); iops->attach_next_to (*progressLabel, Gtk::POS_LEFT, 1, 1); iops->attach_next_to (*vsep1, Gtk::POS_LEFT, 1, 1); + if (!gimpPlugin) { iops->attach_next_to (*sendtogimp, Gtk::POS_LEFT, 1, 1); } @@ -715,10 +747,10 @@ EditorPanel::EditorPanel (FilePanel* filePanel) editbox->show_all (); // build screen - hpanedl = Gtk::manage (new Gtk::Paned(Gtk::ORIENTATION_HORIZONTAL)); - hpanedl->set_name("EditorLeftPaned"); - hpanedr = Gtk::manage (new Gtk::Paned(Gtk::ORIENTATION_HORIZONTAL)); - hpanedr->set_name("EditorRightPaned"); + hpanedl = Gtk::manage (new Gtk::Paned (Gtk::ORIENTATION_HORIZONTAL)); + hpanedl->set_name ("EditorLeftPaned"); + hpanedr = Gtk::manage (new Gtk::Paned (Gtk::ORIENTATION_HORIZONTAL)); + hpanedr->set_name ("EditorRightPaned"); leftbox->reference (); vboxright->reference (); @@ -920,10 +952,10 @@ void EditorPanel::writeOptions() } -void EditorPanel::writeToolExpandedStatus(std::vector &tpOpen) +void EditorPanel::writeToolExpandedStatus (std::vector &tpOpen) { if (tpc) { - tpc->writeToolExpandedStatus(tpOpen); + tpc->writeToolExpandedStatus (tpOpen); } } @@ -1034,7 +1066,7 @@ void EditorPanel::close () tpc->closeImage (); // this call stops image processing tpc->writeOptions (); rtengine::ImageSource* is = isrc->getImageSource(); - is->setProgressListener( nullptr ); + is->setProgressListener ( nullptr ); if (ipc) { ipc->setPreviewImageListener (nullptr); @@ -1047,7 +1079,7 @@ void EditorPanel::close () delete previewHandler; previewHandler = nullptr; - if(iareapanel) { + if (iareapanel) { iareapanel->imageArea->setPreviewHandler (nullptr); iareapanel->imageArea->setImProcCoordinator (nullptr); iareapanel->imageArea->unsubscribe(); @@ -1058,7 +1090,7 @@ void EditorPanel::close () navigator->previewWindow->setPreviewHandler (nullptr); // If the file was deleted somewhere, the openThm.descreaseRef delete the object, but we don't know here - if (Glib::file_test(fname, Glib::FILE_TEST_EXISTS)) { + if (Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { openThm->removeThumbnailListener (this); openThm->decreaseRef (); } @@ -1072,7 +1104,7 @@ void EditorPanel::saveProfile () } // If the file was deleted, do not generate ghost entries - if (Glib::file_test(fname, Glib::FILE_TEST_EXISTS)) { + if (Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { ProcParams params; ipc->getParams (¶ms); @@ -1120,10 +1152,11 @@ void EditorPanel::setProgressState (bool inProcessing) p->inProcessing = inProcessing; p->epih = epih; - const auto func = [](gpointer data) -> gboolean { - spsparams* const p = static_cast(data); + const auto func = [] (gpointer data) -> gboolean { + spsparams* const p = static_cast (data); - if (p->epih->destroyed) { + if (p->epih->destroyed) + { if (p->epih->pending == 1) { delete p->epih; } else { @@ -1142,7 +1175,7 @@ void EditorPanel::setProgressState (bool inProcessing) return FALSE; }; - idle_register.add(func, p); + idle_register.add (func, p); } void EditorPanel::setProgress (double p) @@ -1150,7 +1183,7 @@ void EditorPanel::setProgress (double p) spparams *s = new spparams; s->val = p; s->pProgress = progressLabel; - idle_register.add(setprogressStrUI, s); + idle_register.add (setprogressStrUI, s); } void EditorPanel::setProgressStr (Glib::ustring str) @@ -1159,7 +1192,7 @@ void EditorPanel::setProgressStr (Glib::ustring str) s->str = str; s->val = -1; s->pProgress = progressLabel; - idle_register.add(setprogressStrUI, s); + idle_register.add (setprogressStrUI, s); } // This is only called from the ThreadUI, so within the gtk thread @@ -1170,7 +1203,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (inProcessingP) { if (processingStartedTime == 0) { - processingStartedTime = ::time(nullptr); + processingStartedTime = ::time (nullptr); } s->str = "PROGRESSBAR_PROCESSING"; @@ -1185,7 +1218,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) // Ring a sound if it was a long event if (processingStartedTime != 0) { - time_t curTime = ::time(nullptr); + time_t curTime = ::time (nullptr); if (::difftime (curTime, processingStartedTime) > options.sndLngEditProcDoneSecs) { SoundManager::playSoundAsync (options.sndLngEditProcDone); @@ -1243,10 +1276,11 @@ void EditorPanel::error (Glib::ustring title, Glib::ustring descr) p->title = title; p->epih = epih; - const auto func = [](gpointer data) -> gboolean { + const auto func = [] (gpointer data) -> gboolean { errparams* const p = static_cast (data); - if (p->epih->destroyed) { + if (p->epih->destroyed) + { if (p->epih->pending == 1) { delete p->epih; } else { @@ -1265,7 +1299,7 @@ void EditorPanel::error (Glib::ustring title, Glib::ustring descr) return FALSE; }; - idle_register.add(func, p); + idle_register.add (func, p); } void EditorPanel::info_toggled () @@ -1418,56 +1452,56 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) // Editor Layout switch (event->keyval) { - case GDK_KEY_L: - if (tbTopPanel_1) { - tbTopPanel_1->set_active (!tbTopPanel_1->get_active()); // toggle top panel - } + case GDK_KEY_L: + if (tbTopPanel_1) { + tbTopPanel_1->set_active (!tbTopPanel_1->get_active()); // toggle top panel + } - if (ctrl) { - hidehp->set_active (!hidehp->get_active()); // toggle History (left panel) - } + if (ctrl) { + hidehp->set_active (!hidehp->get_active()); // toggle History (left panel) + } - if (alt) { - tbRightPanel_1->set_active (!tbRightPanel_1->get_active()); // toggle right panel - } + if (alt) { + tbRightPanel_1->set_active (!tbRightPanel_1->get_active()); // toggle right panel + } - return true; - break; - - case GDK_KEY_l: - if (!shift && !alt /*&& !ctrl*/) { - hidehp->set_active (!hidehp->get_active()); // toggle History (left panel) return true; - } + break; - if (alt && !ctrl) { // toggle right panel - tbRightPanel_1->set_active (!tbRightPanel_1->get_active()); - return true; - } + case GDK_KEY_l: + if (!shift && !alt /*&& !ctrl*/) { + hidehp->set_active (!hidehp->get_active()); // toggle History (left panel) + return true; + } - if (alt && ctrl) { // toggle left and right panels - hidehp->set_active (!hidehp->get_active()); - tbRightPanel_1->set_active (!tbRightPanel_1->get_active()); - return true; - } + if (alt && !ctrl) { // toggle right panel + tbRightPanel_1->set_active (!tbRightPanel_1->get_active()); + return true; + } - break; + if (alt && ctrl) { // toggle left and right panels + hidehp->set_active (!hidehp->get_active()); + tbRightPanel_1->set_active (!tbRightPanel_1->get_active()); + return true; + } - case GDK_KEY_m: // Maximize preview panel: hide top AND right AND history panels - if (!ctrl && !alt) { - toggleSidePanels(); - return true; - } + break; - break; + case GDK_KEY_m: // Maximize preview panel: hide top AND right AND history panels + if (!ctrl && !alt) { + toggleSidePanels(); + return true; + } - case GDK_KEY_M: // Maximize preview panel: hide top AND right AND history panels AND (fit image preview) - if (!ctrl && !alt) { - toggleSidePanelsZoomFit(); - return true; - } + break; - break; + case GDK_KEY_M: // Maximize preview panel: hide top AND right AND history panels AND (fit image preview) + if (!ctrl && !alt) { + toggleSidePanelsZoomFit(); + return true; + } + + break; } #ifdef __WIN32__ @@ -1490,170 +1524,172 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) if (!ctrl) { // Normal switch (event->keyval) { - case GDK_KEY_bracketright: - tpc->coarse->rotateRight(); - return true; - - case GDK_KEY_bracketleft: - tpc->coarse->rotateLeft(); - return true; - - case GDK_KEY_i: - case GDK_KEY_I: - info->set_active (!info->get_active()); - return true; - - case GDK_KEY_B: - beforeAfter->set_active (!beforeAfter->get_active()); - return true; - - case GDK_KEY_plus: - case GDK_KEY_equal: - case GDK_KEY_KP_Add: - iareapanel->imageArea->zoomPanel->zoomInClicked(); - return true; - - case GDK_KEY_minus: - case GDK_KEY_underscore: - case GDK_KEY_KP_Subtract: - iareapanel->imageArea->zoomPanel->zoomOutClicked(); - return true; - - case GDK_KEY_z://GDK_1 - iareapanel->imageArea->zoomPanel->zoom11Clicked(); - return true; - - /* - #ifndef __WIN32__ - case GDK_KEY_9: // toggle background color of the preview - iareapanel->imageArea->previewModePanel->togglebackColor(); - return true; - #endif - */ - case GDK_KEY_r: //preview mode Red - iareapanel->imageArea->previewModePanel->toggleR(); - return true; - - case GDK_KEY_g: //preview mode Green - iareapanel->imageArea->previewModePanel->toggleG(); - return true; - - case GDK_KEY_b: //preview mode Blue - iareapanel->imageArea->previewModePanel->toggleB(); - return true; - - case GDK_KEY_v: //preview mode Luminosity - iareapanel->imageArea->previewModePanel->toggleL(); - return true; - - case GDK_KEY_F: //preview mode Focus Mask - iareapanel->imageArea->previewModePanel->toggleFocusMask(); - return true; - - case GDK_KEY_f: - iareapanel->imageArea->zoomPanel->zoomFitClicked(); - return true; - - case GDK_KEY_less: - iareapanel->imageArea->indClippedPanel->toggleClipped (false); - return true; - - case GDK_KEY_greater: - iareapanel->imageArea->indClippedPanel->toggleClipped (true); - return true; - - case GDK_KEY_F5: - openThm->openDefaultViewer ((event->state & GDK_SHIFT_MASK) ? 2 : 1); - return true; - - case GDK_KEY_y: // synchronize filebrowser with image in Editor - if (!simpleEditor && fPanel && !fname.empty()) { - fPanel->fileCatalog->selectImage (fname, false); + case GDK_KEY_bracketright: + tpc->coarse->rotateRight(); return true; - } - break; // to avoid gcc complain - - case GDK_KEY_x: // clear filters and synchronize filebrowser with image in Editor - if (!simpleEditor && fPanel && !fname.empty()) { - fPanel->fileCatalog->selectImage (fname, true); + case GDK_KEY_bracketleft: + tpc->coarse->rotateLeft(); return true; - } - break; // to avoid gcc complain + case GDK_KEY_i: + case GDK_KEY_I: + info->set_active (!info->get_active()); + return true; + + case GDK_KEY_B: + beforeAfter->set_active (!beforeAfter->get_active()); + return true; + + case GDK_KEY_plus: + case GDK_KEY_equal: + case GDK_KEY_KP_Add: + iareapanel->imageArea->zoomPanel->zoomInClicked(); + return true; + + case GDK_KEY_minus: + case GDK_KEY_underscore: + case GDK_KEY_KP_Subtract: + iareapanel->imageArea->zoomPanel->zoomOutClicked(); + return true; + + case GDK_KEY_z://GDK_1 + iareapanel->imageArea->zoomPanel->zoom11Clicked(); + return true; + + /* + #ifndef __WIN32__ + case GDK_KEY_9: // toggle background color of the preview + iareapanel->imageArea->previewModePanel->togglebackColor(); + return true; + #endif + */ + case GDK_KEY_r: //preview mode Red + iareapanel->imageArea->previewModePanel->toggleR(); + return true; + + case GDK_KEY_g: //preview mode Green + iareapanel->imageArea->previewModePanel->toggleG(); + return true; + + case GDK_KEY_b: //preview mode Blue + iareapanel->imageArea->previewModePanel->toggleB(); + return true; + + case GDK_KEY_v: //preview mode Luminosity + iareapanel->imageArea->previewModePanel->toggleL(); + return true; + + case GDK_KEY_F: //preview mode Focus Mask + iareapanel->imageArea->previewModePanel->toggleFocusMask(); + return true; + + case GDK_KEY_f: + iareapanel->imageArea->zoomPanel->zoomFitClicked(); + return true; + + case GDK_KEY_less: + iareapanel->imageArea->indClippedPanel->toggleClipped (false); + return true; + + case GDK_KEY_greater: + iareapanel->imageArea->indClippedPanel->toggleClipped (true); + return true; + + case GDK_KEY_F5: + openThm->openDefaultViewer ((event->state & GDK_SHIFT_MASK) ? 2 : 1); + return true; + + case GDK_KEY_y: // synchronize filebrowser with image in Editor + if (!simpleEditor && fPanel && !fname.empty()) { + fPanel->fileCatalog->selectImage (fname, false); + return true; + } + + break; // to avoid gcc complain + + case GDK_KEY_x: // clear filters and synchronize filebrowser with image in Editor + if (!simpleEditor && fPanel && !fname.empty()) { + fPanel->fileCatalog->selectImage (fname, true); + return true; + } + + break; // to avoid gcc complain } } else { // With control switch (event->keyval) { - case GDK_KEY_S: - saveProfile(); - setProgressStr (M ("PROGRESSBAR_PROCESSING_PROFILESAVED")); - return true; + case GDK_KEY_S: + saveProfile(); + setProgressStr (M ("PROGRESSBAR_PROCESSING_PROFILESAVED")); + return true; - case GDK_KEY_s: - if (!gimpPlugin) { - saveAsPressed(); - } - return true; + case GDK_KEY_s: + if (!gimpPlugin) { + saveAsPressed(); + } - case GDK_KEY_b: - if (!gimpPlugin && !simpleEditor) { - queueImgPressed(); - } + return true; - return true; + case GDK_KEY_b: + if (!gimpPlugin && !simpleEditor) { + queueImgPressed(); + } - case GDK_KEY_e: - if (!gimpPlugin) { - sendToGimpPressed(); - } - return true; + return true; - case GDK_KEY_z: - history->undo (); - return true; + case GDK_KEY_e: + if (!gimpPlugin) { + sendToGimpPressed(); + } - case GDK_KEY_Z: - history->redo (); - return true; + return true; - case GDK_KEY_F5: - openThm->openDefaultViewer (3); - return true; + case GDK_KEY_z: + history->undo (); + return true; + + case GDK_KEY_Z: + history->redo (); + return true; + + case GDK_KEY_F5: + openThm->openDefaultViewer (3); + return true; } } //if (!ctrl) } //if (!alt) if (alt) { switch (event->keyval) { - case GDK_KEY_s: - history->addBookmarkPressed (); - setProgressStr (M ("PROGRESSBAR_SNAPSHOT_ADDED")); - return true; + case GDK_KEY_s: + history->addBookmarkPressed (); + setProgressStr (M ("PROGRESSBAR_SNAPSHOT_ADDED")); + return true; - case GDK_KEY_f: - iareapanel->imageArea->zoomPanel->zoomFitCropClicked(); - return true; + case GDK_KEY_f: + iareapanel->imageArea->zoomPanel->zoomFitCropClicked(); + return true; } } if (shift) { switch (event->keyval) { - case GDK_KEY_F3: // open Previous image from Editor's perspective - if (!simpleEditor && fPanel && !fname.empty()) { - EditorPanel::openPreviousEditorImage(); - return true; - } + case GDK_KEY_F3: // open Previous image from Editor's perspective + if (!simpleEditor && fPanel && !fname.empty()) { + EditorPanel::openPreviousEditorImage(); + return true; + } - break; // to avoid gcc complain + break; // to avoid gcc complain - case GDK_KEY_F4: // open next image from Editor's perspective - if (!simpleEditor && fPanel && !fname.empty()) { - EditorPanel::openNextEditorImage(); - return true; - } + case GDK_KEY_F4: // open next image from Editor's perspective + if (!simpleEditor && fPanel && !fname.empty()) { + EditorPanel::openNextEditorImage(); + return true; + } - break; // to avoid gcc complain + break; // to avoid gcc complain } } @@ -1707,8 +1743,9 @@ bool EditorPanel::idle_saveImage (ProgressConnector *pc, Gl else if (sf.format == "jpg") ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsJPEG), fname, sf.jpegQuality, sf.jpegSubSamp), sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); - else + else { delete ld; + } } else { Glib::ustring msg_ = Glib::ustring ("") + fname + ": Error during image processing\n"; Gtk::MessageDialog msgd (*parent, msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); @@ -1804,7 +1841,7 @@ void EditorPanel::saveAsPressed () fnameOut = saveAsDialog->getFileName (); options.lastSaveAsPath = saveAsDialog->getDirectory (); - saveAsDialog->get_size(options.saveAsDialogWidth, options.saveAsDialogHeight); + saveAsDialog->get_size (options.saveAsDialogWidth, options.saveAsDialogHeight); options.autoSuffix = saveAsDialog->getAutoSuffix (); options.saveMethodNum = saveAsDialog->getSaveMethodNum (); lastSaveAsFileName = Glib::path_get_basename (removeExtension (fnameOut)); @@ -1905,25 +1942,27 @@ void EditorPanel::sendToGimpPressed () } -bool EditorPanel::saveImmediately(const Glib::ustring &filename, const SaveFormat &sf) +bool EditorPanel::saveImmediately (const Glib::ustring &filename, const SaveFormat &sf) { rtengine::procparams::ProcParams pparams; ipc->getParams (&pparams); - rtengine::ProcessingJob *job = rtengine::ProcessingJob::create(ipc->getInitialImage(), pparams); + rtengine::ProcessingJob *job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams); // save immediately - rtengine::IImage16 *img = rtengine::processImage(job, err, nullptr, options.tunnelMetaData, false); + rtengine::IImage16 *img = rtengine::processImage (job, err, nullptr, options.tunnelMetaData, false); int err = 0; + if (sf.format == "tif") { - err = img->saveAsTIFF(filename, sf.tiffBits, sf.tiffUncompressed); + err = img->saveAsTIFF (filename, sf.tiffBits, sf.tiffUncompressed); } else if (sf.format == "png") { - err = img->saveAsPNG(filename, sf.pngCompression, sf.pngBits); + err = img->saveAsPNG (filename, sf.pngCompression, sf.pngBits); } else if (sf.format == "jpg") { - err = img->saveAsJPEG(filename, sf.jpegQuality, sf.jpegSubSamp); + err = img->saveAsJPEG (filename, sf.jpegQuality, sf.jpegSubSamp); } else { err = 1; } + img->free(); return !err; } @@ -1974,7 +2013,7 @@ bool EditorPanel::idle_sendToGimp ( ProgressConnector *pc, int tries = 1; while (Glib::file_test (fileName, Glib::FILE_TEST_EXISTS) && tries < 1000) { - fileName = Glib::ustring::compose("%1-%2.%3", fname, tries, sf.format); + fileName = Glib::ustring::compose ("%1-%2.%3", fname, tries, sf.format); tries++; } @@ -2020,9 +2059,9 @@ bool EditorPanel::idle_sentToGimp (ProgressConnector *pc, rtengine::IImage1 } if (!success) { - Gtk::MessageDialog msgd (*parent, M("MAIN_MSG_CANNOTSTARTEDITOR"), false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); - msgd.set_secondary_text (M("MAIN_MSG_CANNOTSTARTEDITOR_SECONDARY")); - msgd.set_title (M("MAIN_BUTTON_SENDTOEDITOR")); + Gtk::MessageDialog msgd (*parent, M ("MAIN_MSG_CANNOTSTARTEDITOR"), false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + msgd.set_secondary_text (M ("MAIN_MSG_CANNOTSTARTEDITOR_SECONDARY")); + msgd.set_title (M ("MAIN_BUTTON_SENDTOEDITOR")); msgd.run (); } } @@ -2077,7 +2116,7 @@ void EditorPanel::beforeAfterToggled () if (beforeAfter->get_active ()) { int errorCode = 0; - rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, nullptr); + rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw, &errorCode, nullptr); if ( !beforeImg || errorCode ) { return; @@ -2146,7 +2185,7 @@ void EditorPanel::tbBeforeLock_toggled () } void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve, /*LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, - LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw , LUTu & histChroma, LUTu & histLRETI) + LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI) { if (histogramPanel) { @@ -2207,9 +2246,9 @@ void EditorPanel::tbShowHideSidePanels_managestate() ShowHideSidePanelsconn.block (false); } -void EditorPanel::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +void EditorPanel::updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) { - colorMgmtToolBar->canSoftProof(!printerProfile.empty() && printerProfile != "None"); + colorMgmtToolBar->canSoftProof (!printerProfile.empty() && printerProfile != "None"); } void EditorPanel::updateTPVScrollbar (bool hide) @@ -2226,64 +2265,64 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) { switch (newPosition) { - case 0: + case 0: - // No histogram - if (!oldPosition) { - // An histogram actually exist, we delete it - delete histogramPanel; - histogramPanel = nullptr; - } + // No histogram + if (!oldPosition) { + // An histogram actually exist, we delete it + delete histogramPanel; + histogramPanel = nullptr; + } - // else no need to create it - break; + // else no need to create it + break; - case 1: + case 1: - // Histogram on the left pane - if (oldPosition == 0) { - // There was no Histogram before, so we create it - histogramPanel = Gtk::manage (new HistogramPanel ()); - leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); - } else if (oldPosition == 2) { - // The histogram was on the right side, so we move it to the left - histogramPanel->reference(); - removeIfThere (vboxright, histogramPanel, false); - leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); - histogramPanel->unreference(); - } + // Histogram on the left pane + if (oldPosition == 0) { + // There was no Histogram before, so we create it + histogramPanel = Gtk::manage (new HistogramPanel ()); + leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + } else if (oldPosition == 2) { + // The histogram was on the right side, so we move it to the left + histogramPanel->reference(); + removeIfThere (vboxright, histogramPanel, false); + leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + histogramPanel->unreference(); + } - histogramPanel->reorder (Gtk::POS_LEFT); - leftbox->reorder_child (*histogramPanel, 0); - break; + histogramPanel->reorder (Gtk::POS_LEFT); + leftbox->reorder_child (*histogramPanel, 0); + break; - case 2: - default: + case 2: + default: - // Histogram on the right pane - if (oldPosition == 0) { - // There was no Histogram before, so we create it - histogramPanel = Gtk::manage (new HistogramPanel ()); - vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); - } else if (oldPosition == 1) { - // The histogram was on the left side, so we move it to the right - histogramPanel->reference(); - removeIfThere (leftbox, histogramPanel, false); - vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); - histogramPanel->unreference(); - } + // Histogram on the right pane + if (oldPosition == 0) { + // There was no Histogram before, so we create it + histogramPanel = Gtk::manage (new HistogramPanel ()); + vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + } else if (oldPosition == 1) { + // The histogram was on the left side, so we move it to the right + histogramPanel->reference(); + removeIfThere (leftbox, histogramPanel, false); + vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); + histogramPanel->unreference(); + } - histogramPanel->reorder (Gtk::POS_RIGHT); - vboxright->reorder_child (*histogramPanel, 0); - break; + histogramPanel->reorder (Gtk::POS_RIGHT); + vboxright->reorder_child (*histogramPanel, 0); + break; } iareapanel->imageArea->setPointerMotionHListener (histogramPanel); } -void EditorPanel::defaultMonitorProfileChanged(const Glib::ustring &profile_name, bool auto_monitor_profile) +void EditorPanel::defaultMonitorProfileChanged (const Glib::ustring &profile_name, bool auto_monitor_profile) { - colorMgmtToolBar->defaultMonitorProfileChanged(profile_name, auto_monitor_profile); + colorMgmtToolBar->defaultMonitorProfileChanged (profile_name, auto_monitor_profile); } diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 473ec0022..286905bf5 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -46,12 +46,12 @@ struct EditorPanelIdleHelper { class RTWindow; class EditorPanel final : - public Gtk::VBox, - public PParamsChangeListener, - public rtengine::ProgressListener, - public ThumbnailListener, - public HistoryBeforeLineListener, - public rtengine::HistogramListener + public Gtk::VBox, + public PParamsChangeListener, + public rtengine::ProgressListener, + public ThumbnailListener, + public HistoryBeforeLineListener, + public rtengine::HistogramListener { public: explicit EditorPanel (FilePanel* filePanel = nullptr); @@ -74,7 +74,7 @@ public: } void writeOptions(); - void writeToolExpandedStatus(std::vector &tpOpen); + void writeToolExpandedStatus (std::vector &tpOpen); void showTopPanel (bool show); bool isRealized() @@ -131,14 +131,14 @@ public: { return isProcessing; } - void updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC); + void updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC); void updateTPVScrollbar (bool hide); void updateTabsUsesIcons (bool useIcons); void updateHistogramPosition (int oldPosition, int newPosition); - void defaultMonitorProfileChanged(const Glib::ustring &profile_name, bool auto_monitor_profile); + void defaultMonitorProfileChanged (const Glib::ustring &profile_name, bool auto_monitor_profile); - bool saveImmediately(const Glib::ustring &filename, const SaveFormat &sf); + bool saveImmediately (const Glib::ustring &filename, const SaveFormat &sf); Gtk::Paned* catalogPane; diff --git a/rtgui/options.cc b/rtgui/options.cc index c4d31a25d..8981c5a37 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -643,7 +643,7 @@ void Options::setDefaults () #endif // rtSettings.viewingdevice = 0; // rtSettings.viewingdevicegrey = 3; - // rtSettings.viewinggreySc = 1; + // rtSettings.viewinggreySc = 1; rtSettings.leveldnv = 2; rtSettings.leveldnti = 0; rtSettings.leveldnaut = 0; @@ -1435,8 +1435,9 @@ int Options::readFromFile (Glib::ustring fname) if (keyFile.has_key ("GUI", "ToolPanelsExpanded")) { tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded"); } - if (keyFile.has_key("GUI", "ToolPanelsExpandedAutoSave")) { - autoSaveTpOpen = keyFile.get_boolean("GUI", "ToolPanelsExpandedAutoSave"); + + if (keyFile.has_key ("GUI", "ToolPanelsExpandedAutoSave")) { + autoSaveTpOpen = keyFile.get_boolean ("GUI", "ToolPanelsExpandedAutoSave"); } if (keyFile.has_key ("GUI", "MultiDisplayMode")) { @@ -1561,11 +1562,11 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); } */ -/* - if (keyFile.has_key ("Color Management", "greySc")) { - rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); - } -*/ + /* + if (keyFile.has_key ("Color Management", "greySc")) { + rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); + } + */ if (keyFile.has_key ("Color Management", "CBDLArtif")) { rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif"); } @@ -2104,7 +2105,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); Glib::ArrayHandle tpopen = tpOpen; keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); - keyFile.set_boolean("GUI", "ToolPanelsExpandedAutoSave", autoSaveTpOpen); + keyFile.set_boolean ("GUI", "ToolPanelsExpandedAutoSave", autoSaveTpOpen); keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); diff --git a/rtgui/options.h b/rtgui/options.h index c83b71d81..a027f9909 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -42,17 +42,16 @@ // Special name for the Dynamic profile #define DEFPROFILE_DYNAMIC "Dynamic" -struct SaveFormat -{ +struct SaveFormat { SaveFormat() : - format("jpg"), - pngBits(8), - pngCompression(6), - jpegQuality(90), - jpegSubSamp(2), - tiffBits(8), - tiffUncompressed(true), - saveParams(true) + format ("jpg"), + pngBits (8), + pngCompression (6), + jpegQuality (90), + jpegSubSamp (2), + tiffBits (8), + tiffUncompressed (true), + saveParams (true) { } @@ -79,8 +78,8 @@ private: bool defProfImgMissing; Glib::ustring userProfilePath; Glib::ustring globalProfilePath; - bool checkProfilePath(Glib::ustring &path); - bool checkDirPath(Glib::ustring &path, Glib::ustring errString); + bool checkProfilePath (Glib::ustring &path); + bool checkDirPath (Glib::ustring &path, Glib::ustring errString); void updatePaths(); int getString (const char* src, char* dst); void error (int line); @@ -95,8 +94,8 @@ private: * @param destination destination variable to store to * @return @c true if @p destination was changed */ - bool safeDirGet(const Glib::KeyFile& keyFile, const Glib::ustring& section, - const Glib::ustring& entryName, Glib::ustring& destination); + bool safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section, + const Glib::ustring& entryName, Glib::ustring& destination); public: @@ -342,10 +341,10 @@ public: { return globalProfilePath; } - Glib::ustring findProfilePath(Glib::ustring &profName); + Glib::ustring findProfilePath (Glib::ustring &profName); bool is_parse_extention (Glib::ustring fname); bool has_retained_extention (Glib::ustring fname); - bool is_extention_enabled(Glib::ustring ext); + bool is_extention_enabled (Glib::ustring ext); bool is_defProfRawMissing() { return defProfRawMissing; @@ -354,11 +353,11 @@ public: { return defProfImgMissing; } - void setDefProfRawMissing(bool value) + void setDefProfRawMissing (bool value) { defProfRawMissing = value; } - void setDefProfImgMissing(bool value) + void setDefProfImgMissing (bool value) { defProfImgMissing = value; } diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 1c8dbdc25..f66fdbdcc 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -878,14 +878,14 @@ Gtk::Widget* Preferences::getColorManagementPanel () grey->append (M("PREFERENCES_GREY30")); grey->append (M("PREFERENCES_GREY40")); */ -/* - Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - greySc = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - greySc->append (M ("PREFERENCES_GREYSCA")); - greySc->append (M ("PREFERENCES_GREYSC18")); -*/ + /* + Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + greySc = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + greySc->append (M ("PREFERENCES_GREYSCA")); + greySc->append (M ("PREFERENCES_GREYSC18")); + */ Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) ); setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); @@ -986,18 +986,17 @@ Gtk::Widget* Preferences::getGeneralPanel () workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1); workflowGrid->attach_next_to (*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1); workflowGrid->attach_next_to (*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1); - ckbAutoSaveTpOpen = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_AUTOSAVE_TP_OPEN"))); - workflowGrid->attach_next_to(*ckbAutoSaveTpOpen, *hb4label, Gtk::POS_BOTTOM, 1, 1); - btnSaveTpOpenNow = Gtk::manage(new Gtk::Button(M("PREFERENCES_SAVE_TP_OPEN_NOW"))); - setExpandAlignProperties(btnSaveTpOpenNow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*btnSaveTpOpenNow, *ckbAutoSaveTpOpen, Gtk::POS_RIGHT, 1, 1); + ckbAutoSaveTpOpen = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_AUTOSAVE_TP_OPEN"))); + workflowGrid->attach_next_to (*ckbAutoSaveTpOpen, *hb4label, Gtk::POS_BOTTOM, 1, 1); + btnSaveTpOpenNow = Gtk::manage (new Gtk::Button (M ("PREFERENCES_SAVE_TP_OPEN_NOW"))); + setExpandAlignProperties (btnSaveTpOpenNow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*btnSaveTpOpenNow, *ckbAutoSaveTpOpen, Gtk::POS_RIGHT, 1, 1); auto save_tp_open_now = - [&]() -> void - { - parent->writeToolExpandedStatus(moptions.tpOpen); - }; - btnSaveTpOpenNow->signal_clicked().connect(save_tp_open_now); + [&]() -> void { + parent->writeToolExpandedStatus (moptions.tpOpen); + }; + btnSaveTpOpenNow->signal_clicked().connect (save_tp_open_now); fworklflow->add (*workflowGrid); @@ -2024,8 +2023,8 @@ void Preferences::fillPreferences () ckbHideTPVScrollbar->set_active (moptions.hideTPVScrollbar); ckbUseIconNoText->set_active (moptions.UseIconNoText); - ckbAutoSaveTpOpen->set_active(moptions.autoSaveTpOpen); - + ckbAutoSaveTpOpen->set_active (moptions.autoSaveTpOpen); + rgbDenoiseTreadLimitSB->set_value (moptions.rgbDenoiseThreadLimit); clutCacheSizeSB->set_value (moptions.clutCacheSize); maxInspectorBuffersSB->set_value (moptions.maxInspectorBuffers); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 655777b0a..c9659d3dc 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -36,8 +36,8 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::TreeModelColumn ext; ExtensionColumns() { - add(enabled); - add(ext); + add (enabled); + add (ext); } }; ExtensionColumns extensionColumns; @@ -54,11 +54,11 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::TreeModelColumn addsetid; BehavColumns() { - add(label); - add(badd); - add(bset); - add(visible); - add(addsetid); + add (label); + add (badd); + add (bset); + add (visible); + add (addsetid); } }; @@ -68,7 +68,7 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Glib::ustring shortFName; Glib::ustring longFName; - ThemeFilename (Glib::ustring sfname, Glib::ustring lfname) : shortFName(sfname), longFName(lfname) {} + ThemeFilename (Glib::ustring sfname, Glib::ustring lfname) : shortFName (sfname), longFName (lfname) {} }; Glib::RefPtr behModel; @@ -122,7 +122,7 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::SpinButton* panFactor; Gtk::CheckButton* rememberZoomPanCheckbutton; - // Gtk::ComboBoxText* view; +// Gtk::ComboBoxText* view; // Gtk::ComboBoxText* grey; // Gtk::ComboBoxText* greySc; Gtk::ComboBoxText* dnv; @@ -235,9 +235,9 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener void iccDirChanged (); void switchThemeTo (Glib::ustring newTheme); void switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize); - bool splashClosed(GdkEventAny* event); + bool splashClosed (GdkEventAny* event); - int getThemeRowNumber(Glib::ustring& longThemeFName); + int getThemeRowNumber (Glib::ustring& longThemeFName); void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 5199db399..a91346dcf 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -32,27 +32,27 @@ static gboolean osx_should_quit_cb (GtkosxApplication *app, gpointer data) { RTWindow *rtWin = (RTWindow *)data; - return rtWin->on_delete_event(0); + return rtWin->on_delete_event (0); } static void osx_will_quit_cb (GtkosxApplication *app, gpointer data) { RTWindow *rtWin = (RTWindow *)data; - rtWin->on_delete_event(0); + rtWin->on_delete_event (0); gtk_main_quit (); } -bool RTWindow::osxFileOpenEvent(Glib::ustring path) +bool RTWindow::osxFileOpenEvent (Glib::ustring path) { CacheManager* cm = CacheManager::getInstance(); - Thumbnail* thm = cm->getEntry( path ); + Thumbnail* thm = cm->getEntry ( path ); - if(thm && fpanel) { + if (thm && fpanel) { std::vector entries; - entries.push_back(thm); - fpanel->fileCatalog->openRequested(entries); + entries.push_back (thm); + fpanel->fileCatalog->openRequested (entries); return true; } @@ -69,25 +69,25 @@ osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data) return false; } - Glib::ustring path = Glib::ustring(path_); - Glib::ustring suffix = path.length() > 4 ? path.substr(path.length() - 3) : ""; + Glib::ustring path = Glib::ustring (path_); + Glib::ustring suffix = path.length() > 4 ? path.substr (path.length() - 3) : ""; suffix = suffix.lowercase(); if (suffix == "pp3") { - path = path.substr(0, path.length() - 4); + path = path.substr (0, path.length() - 4); } - return rtWin->osxFileOpenEvent(path); + return rtWin->osxFileOpenEvent (path); } #endif // __APPLE__ RTWindow::RTWindow () - : mainNB(nullptr) - , bpanel(nullptr) - , splash(nullptr) - , btn_fullscreen(nullptr) - , epanel(nullptr) - , fpanel(nullptr) + : mainNB (nullptr) + , bpanel (nullptr) + , splash (nullptr) + , btn_fullscreen (nullptr) + , epanel (nullptr) + , fpanel (nullptr) { cacheMgr->init (); @@ -95,11 +95,11 @@ RTWindow::RTWindow () ProfilePanel::init (this); Glib::ustring fName = "rt-logo-small.png"; - Glib::ustring fullPath = rtengine::findIconAbsolutePath(fName); + Glib::ustring fullPath = rtengine::findIconAbsolutePath (fName); try { set_default_icon_from_file (fullPath); - } catch(Glib::Exception& ex) { + } catch (Glib::Exception& ex) { printf ("%s\n", ex.what().c_str()); } @@ -122,55 +122,57 @@ RTWindow::RTWindow () #endif versionStr = "RawTherapee " + versionString; - set_title_decorated(""); - set_resizable(true); - set_decorated(true); - set_default_size(options.windowWidth, options.windowHeight); - set_modal(false); + set_title_decorated (""); + set_resizable (true); + set_decorated (true); + set_default_size (options.windowWidth, options.windowHeight); + set_modal (false); Gdk::Rectangle lMonitorRect; - get_screen()->get_monitor_geometry(std::min(options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect); + get_screen()->get_monitor_geometry (std::min (options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect); + if (options.windowMaximized) { - move(lMonitorRect.get_x(), lMonitorRect.get_y()); + move (lMonitorRect.get_x(), lMonitorRect.get_y()); maximize(); } else { unmaximize(); - resize(options.windowWidth, options.windowHeight); - if(options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { - move(options.windowX, options.windowY); + resize (options.windowWidth, options.windowHeight); + + if (options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { + move (options.windowX, options.windowY); } else { - move(lMonitorRect.get_x(), lMonitorRect.get_y()); + move (lMonitorRect.get_x(), lMonitorRect.get_y()); } } on_delete_has_run = false; is_fullscreen = false; - property_destroy_with_parent().set_value(false); - signal_window_state_event().connect( sigc::mem_fun(*this, &RTWindow::on_window_state_event) ); - signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) ); + property_destroy_with_parent().set_value (false); + signal_window_state_event().connect ( sigc::mem_fun (*this, &RTWindow::on_window_state_event) ); + signal_key_press_event().connect ( sigc::mem_fun (*this, &RTWindow::keyPressed) ); - if(simpleEditor) { - epanel = Gtk::manage( new EditorPanel (nullptr) ); + if (simpleEditor) { + epanel = Gtk::manage ( new EditorPanel (nullptr) ); epanel->setParent (this); - epanel->setParentWindow(this); + epanel->setParentWindow (this); add (*epanel); show_all (); pldBridge = nullptr; // No progress listener CacheManager* cm = CacheManager::getInstance(); - Thumbnail* thm = cm->getEntry( argv1 ); + Thumbnail* thm = cm->getEntry ( argv1 ); - if(thm) { + if (thm) { int error; - rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, nullptr); - epanel->open( thm, ii ); + rtengine::InitialImage *ii = rtengine::InitialImage::load (argv1, thm->getType() == FT_Raw, &error, nullptr); + epanel->open ( thm, ii ); } } else { mainNB = Gtk::manage (new Gtk::Notebook ()); mainNB->set_name ("MainNotebook"); mainNB->set_scrollable (true); - mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) ); + mainNB->signal_switch_page().connect_notify ( sigc::mem_fun (*this, &RTWindow::on_mainNB_switch_page) ); // Editor panel fpanel = new FilePanel () ; @@ -178,20 +180,20 @@ RTWindow::RTWindow () // decorate tab Gtk::Grid* fpanelLabelGrid = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - Gtk::Label* fpl = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + setExpandAlignProperties (fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* fpl = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") )); if (options.mainNBVertical) { mainNB->set_tab_pos (Gtk::POS_LEFT); fpl->set_angle (90); - fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1); - fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_TOP, 1, 1); + fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1); + fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_TOP, 1, 1); } else { - fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1); - fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_RIGHT, 1, 1); + fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1); + fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_RIGHT, 1, 1); } - fpanelLabelGrid->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); + fpanelLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_FILEBROWSER_TOOLTIP")); fpanelLabelGrid->show_all (); mainNB->append_page (*fpanel, *fpanelLabelGrid); @@ -200,16 +202,16 @@ RTWindow::RTWindow () bpanel = Gtk::manage ( new BatchQueuePanel (fpanel->fileCatalog) ); // decorate tab, the label is unimportant since its updated in batchqueuepanel anyway - Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")) ); + Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M ("MAIN_FRAME_BATCHQUEUE")) ); if (options.mainNBVertical) { - lbq->set_angle(90); + lbq->set_angle (90); } mainNB->append_page (*bpanel, *lbq); - if(isSingleTabMode()) { + if (isSingleTabMode()) { createSetmEditor(); } @@ -225,46 +227,46 @@ RTWindow::RTWindow () //Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !? //Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"...")); Gtk::Button* preferences = Gtk::manage (new Gtk::Button ()); - setExpandAlignProperties(preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - preferences->set_image (*Gtk::manage(new RTImage ("gtk-preferences.png"))); - preferences->set_tooltip_markup (M("MAIN_BUTTON_PREFERENCES")); - preferences->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::showPreferences) ); + setExpandAlignProperties (preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + preferences->set_image (*Gtk::manage (new RTImage ("gtk-preferences.png"))); + preferences->set_tooltip_markup (M ("MAIN_BUTTON_PREFERENCES")); + preferences->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showPreferences) ); //btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN"))); - btn_fullscreen = Gtk::manage( new Gtk::Button()); - setExpandAlignProperties(btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - btn_fullscreen->set_tooltip_markup (M("MAIN_BUTTON_FULLSCREEN")); + btn_fullscreen = Gtk::manage ( new Gtk::Button()); + setExpandAlignProperties (btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN")); btn_fullscreen->set_image (*iFullscreen); - btn_fullscreen->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::toggle_fullscreen) ); - setExpandAlignProperties(&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - prProgBar.set_show_text(true); + btn_fullscreen->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::toggle_fullscreen) ); + setExpandAlignProperties (&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + prProgBar.set_show_text (true); Gtk::Grid* actionGrid = Gtk::manage (new Gtk::Grid ()); - actionGrid->set_row_spacing(2); - actionGrid->set_column_spacing(2); + actionGrid->set_row_spacing (2); + actionGrid->set_column_spacing (2); - setExpandAlignProperties(actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties (actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); if (options.mainNBVertical) { - prProgBar.set_orientation(Gtk::ORIENTATION_VERTICAL); - prProgBar.set_inverted(true); - actionGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); - actionGrid->attach_next_to(prProgBar, Gtk::POS_BOTTOM, 1, 1); - actionGrid->attach_next_to(*preferences, Gtk::POS_BOTTOM, 1, 1); - actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); - mainNB->set_action_widget(actionGrid, Gtk::PACK_END); + prProgBar.set_orientation (Gtk::ORIENTATION_VERTICAL); + prProgBar.set_inverted (true); + actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL); + actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); + mainNB->set_action_widget (actionGrid, Gtk::PACK_END); } else { - prProgBar.set_orientation(Gtk::ORIENTATION_HORIZONTAL); - actionGrid->set_orientation(Gtk::ORIENTATION_HORIZONTAL); - actionGrid->attach_next_to(prProgBar, Gtk::POS_RIGHT, 1, 1); - actionGrid->attach_next_to(*preferences, Gtk::POS_RIGHT, 1, 1); - actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); - mainNB->set_action_widget(actionGrid, Gtk::PACK_END); + prProgBar.set_orientation (Gtk::ORIENTATION_HORIZONTAL); + actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL); + actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); + mainNB->set_action_widget (actionGrid, Gtk::PACK_END); } actionGrid->show_all(); - pldBridge = new PLDBridge(static_cast(this)); + pldBridge = new PLDBridge (static_cast (this)); add (*mainNB); show_all (); @@ -272,9 +274,10 @@ RTWindow::RTWindow () bpanel->init (this); if (!argv1.empty() && !remote) { - Thumbnail* thm = cacheMgr->getEntry(argv1); + Thumbnail* thm = cacheMgr->getEntry (argv1); + if (thm) { - fpanel->fileCatalog->openRequested({thm}); + fpanel->fileCatalog->openRequested ({thm}); } } } @@ -282,7 +285,7 @@ RTWindow::RTWindow () RTWindow::~RTWindow() { - if(!simpleEditor) { + if (!simpleEditor) { delete pldBridge; } @@ -300,7 +303,7 @@ void RTWindow::on_realize () { Gtk::Window::on_realize (); - if( fpanel ) { + if ( fpanel ) { fpanel->setAspect(); } @@ -308,19 +311,20 @@ void RTWindow::on_realize () epanel->setAspect(); } - mainWindowCursorManager.init(get_window()); + mainWindowCursorManager.init (get_window()); // Display release notes only if new major version. // Pattern matches "5.1" from "5.1-23-g12345678" std::string vs[] = {versionString, options.version}; - std::regex pat("(^[0-9.]+).*"); + std::regex pat ("(^[0-9.]+).*"); std::smatch sm; std::vector vMajor; + for (const auto &v : vs) { - if (std::regex_match(v, sm, pat)) { + if (std::regex_match (v, sm, pat)) { if (sm.size() == 2) { std::ssub_match smsub = sm[1]; - vMajor.push_back(smsub.str()); + vMajor.push_back (smsub.str()); } } } @@ -333,7 +337,7 @@ void RTWindow::on_realize () splash = new Splash (*this); splash->set_transient_for (*this); - splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) ); + splash->signal_delete_event().connect ( sigc::mem_fun (*this, &RTWindow::splashClosed) ); if (splash->hasReleaseNotes()) { splash->showReleaseNotes(); @@ -346,38 +350,39 @@ void RTWindow::on_realize () } } -bool RTWindow::on_configure_event(GdkEventConfigure* event) +bool RTWindow::on_configure_event (GdkEventConfigure* event) { if (!is_maximized() && is_visible()) { - get_size(options.windowWidth, options.windowHeight); + get_size (options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } - return Gtk::Widget::on_configure_event(event); + return Gtk::Widget::on_configure_event (event); } -bool RTWindow::on_window_state_event(GdkEventWindowState* event) +bool RTWindow::on_window_state_event (GdkEventWindowState* event) { if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED; } - return Gtk::Widget::on_window_state_event(event); + + return Gtk::Widget::on_window_state_event (event); } -void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) +void RTWindow::on_mainNB_switch_page (Gtk::Widget* widget, guint page_num) { - if(!on_delete_has_run) { - if(isEditorPanel(page_num)) { + if (!on_delete_has_run) { + if (isEditorPanel (page_num)) { if (isSingleTabMode() && epanel) { MoveFileBrowserToEditor(); } - EditorPanel *ep = static_cast(mainNB->get_nth_page(page_num)); + EditorPanel *ep = static_cast (mainNB->get_nth_page (page_num)); ep->setAspect(); if (!isSingleTabMode()) { if (filesEdited.size() > 0) { - set_title_decorated(ep->getFileName()); + set_title_decorated (ep->getFileName()); } } } else { @@ -387,7 +392,7 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) epanel->saveProfile(); // Moving the FileBrowser only if the user has switched to the FileBrowser tab - if (mainNB->get_nth_page(page_num) == fpanel) { + if (mainNB->get_nth_page (page_num) == fpanel) { MoveFileBrowserToMain(); } } @@ -398,32 +403,32 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) { if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); + EditWindow * wndEdit = EditWindow::getInstance (this); wndEdit->show(); - wndEdit->addEditorPanel(ep, name); + wndEdit->addEditorPanel (ep, name); wndEdit->toFront(); } else { ep->setParent (this); - ep->setParentWindow(this); + ep->setParentWindow (this); // construct closeable tab for the image Gtk::Grid* titleGrid = Gtk::manage (new Gtk::Grid ()); titleGrid->set_tooltip_markup (name); - RTImage *closebimg = Gtk::manage(new RTImage ("gtk-close.png")); + RTImage *closebimg = Gtk::manage (new RTImage ("gtk-close.png")); Gtk::Button* closeb = Gtk::manage (new Gtk::Button ()); closeb->set_name ("CloseButton"); closeb->add (*closebimg); closeb->set_relief (Gtk::RELIEF_NONE); closeb->set_focus_on_click (false); - closeb->signal_clicked().connect( sigc::bind (sigc::mem_fun(*this, &RTWindow::remEditorPanel) , ep)); + closeb->signal_clicked().connect ( sigc::bind (sigc::mem_fun (*this, &RTWindow::remEditorPanel), ep)); - titleGrid->attach_next_to(*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1); - titleGrid->attach_next_to(*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1); - titleGrid->attach_next_to(*closeb, Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*closeb, Gtk::POS_RIGHT, 1, 1); titleGrid->show_all (); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - titleGrid->set_column_spacing(2); + titleGrid->set_column_spacing (2); #endif //GTK318 @@ -432,11 +437,11 @@ void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) mainNB->set_current_page (mainNB->page_num (*ep)); mainNB->set_tab_reorderable (*ep, true); - set_title_decorated(name); + set_title_decorated (name); epanels[ name ] = ep; filesEdited.insert ( name ); fpanel->refreshEditedState (filesEdited); - ep->tbTopPanel_1_visible(false); //hide the toggle Top Panel button + ep->tbTopPanel_1_visible (false); //hide the toggle Top Panel button } } @@ -447,8 +452,8 @@ void RTWindow::remEditorPanel (EditorPanel* ep) } if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); - wndEdit->remEditorPanel(ep); + EditWindow * wndEdit = EditWindow::getInstance (this); + wndEdit->remEditorPanel (ep); } else { bool queueHadFocus = (mainNB->get_current_page() == mainNB->page_num (*bpanel)); epanels.erase (ep->getFileName()); @@ -457,37 +462,37 @@ void RTWindow::remEditorPanel (EditorPanel* ep) mainNB->remove_page (*ep); - if (!isEditorPanel(mainNB->get_current_page())) { - if(!queueHadFocus) { + if (!isEditorPanel (mainNB->get_current_page())) { + if (!queueHadFocus) { mainNB->set_current_page (mainNB->page_num (*fpanel)); } - set_title_decorated(""); + set_title_decorated (""); } else { - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); - set_title_decorated(ep->getFileName()); + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); + set_title_decorated (ep->getFileName()); } // TODO: ask what to do: close & apply, close & apply selection, close & revert, cancel } } -bool RTWindow::selectEditorPanel(const std::string &name) +bool RTWindow::selectEditorPanel (const std::string &name) { if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); + EditWindow * wndEdit = EditWindow::getInstance (this); - if (wndEdit->selectEditorPanel(name)) { - set_title_decorated(name); + if (wndEdit->selectEditorPanel (name)) { + set_title_decorated (name); wndEdit->toFront(); return true; } } else { - std::map::iterator iep = epanels.find(name); + std::map::iterator iep = epanels.find (name); if (iep != epanels.end()) { mainNB->set_current_page (mainNB->page_num (*iep->second)); - set_title_decorated(name); + set_title_decorated (name); return true; } else { //set_title_decorated(name); @@ -521,12 +526,12 @@ bool RTWindow::keyPressed (GdkEventKey* event) #endif if (try_quit) { - if (!on_delete_event(nullptr)) { + if (!on_delete_event (nullptr)) { gtk_main_quit(); } } - if(event->keyval == GDK_KEY_F11) { + if (event->keyval == GDK_KEY_F11) { toggle_fullscreen(); } @@ -537,40 +542,40 @@ bool RTWindow::keyPressed (GdkEventKey* event) }; if (ctrl) { - switch(event->keyval) { - case GDK_KEY_F2: // file browser panel - mainNB->set_current_page (mainNB->page_num (*fpanel)); - return true; - - case GDK_KEY_F3: // batch queue panel - mainNB->set_current_page (mainNB->page_num (*bpanel)); - return true; - - case GDK_KEY_F4: //single tab mode, editor panel - if (isSingleTabMode() && epanel) { - mainNB->set_current_page (mainNB->page_num (*epanel)); - } - - return true; - - case GDK_KEY_w: //multi-tab mode, close editor panel - if (!isSingleTabMode() && - mainNB->get_current_page() != mainNB->page_num(*fpanel) && - mainNB->get_current_page() != mainNB->page_num(*bpanel)) { - - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); - remEditorPanel (ep); + switch (event->keyval) { + case GDK_KEY_F2: // file browser panel + mainNB->set_current_page (mainNB->page_num (*fpanel)); return true; - } + + case GDK_KEY_F3: // batch queue panel + mainNB->set_current_page (mainNB->page_num (*bpanel)); + return true; + + case GDK_KEY_F4: //single tab mode, editor panel + if (isSingleTabMode() && epanel) { + mainNB->set_current_page (mainNB->page_num (*epanel)); + } + + return true; + + case GDK_KEY_w: //multi-tab mode, close editor panel + if (!isSingleTabMode() && + mainNB->get_current_page() != mainNB->page_num (*fpanel) && + mainNB->get_current_page() != mainNB->page_num (*bpanel)) { + + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); + remEditorPanel (ep); + return true; + } } } - if (mainNB->get_current_page() == mainNB->page_num(*fpanel)) { + if (mainNB->get_current_page() == mainNB->page_num (*fpanel)) { return fpanel->handleShortcutKey (event); - } else if (mainNB->get_current_page() == mainNB->page_num(*bpanel)) { + } else if (mainNB->get_current_page() == mainNB->page_num (*bpanel)) { return bpanel->handleShortcutKey (event); } else { - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); return ep->handleShortcutKey (event); } @@ -581,7 +586,7 @@ void RTWindow::addBatchQueueJob (BatchQueueEntry* bqe, bool head) { std::vector entries; - entries.push_back(bqe); + entries.push_back (bqe); bpanel->addBatchQueueJobs (entries, head); fpanel->queue_draw (); } @@ -593,7 +598,7 @@ void RTWindow::addBatchQueueJobs (std::vector &entries) fpanel->queue_draw (); } -bool RTWindow::on_delete_event(GdkEventAny* event) +bool RTWindow::on_delete_event (GdkEventAny* event) { if (on_delete_has_run) { @@ -608,14 +613,14 @@ bool RTWindow::on_delete_event(GdkEventAny* event) if (isSingleTabMode() || simpleEditor) { isProcessing = epanel->getIsProcessing(); } else if (options.multiDisplayMode > 0) { - editWindow = EditWindow::getInstance(this, false); + editWindow = EditWindow::getInstance (this, false); isProcessing = editWindow->isProcessing(); } else { int pageCount = mainNB->get_n_pages(); for (int i = 0; i < pageCount && !isProcessing; i++) { - if(isEditorPanel(i)) { - isProcessing |= (static_cast(mainNB->get_nth_page(i)))->getIsProcessing(); + if (isEditorPanel (i)) { + isProcessing |= (static_cast (mainNB->get_nth_page (i)))->getIsProcessing(); } } } @@ -624,11 +629,11 @@ bool RTWindow::on_delete_event(GdkEventAny* event) return true; } - if( fpanel ) { + if ( fpanel ) { fpanel->saveOptions (); } - if( bpanel ) { + if ( bpanel ) { bpanel->saveOptions (); } @@ -644,7 +649,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) // Look at the active panel first, if any, otherwise look at the first one (sorted on the filename) int page = mainNB->get_current_page(); - Gtk::Widget *w = mainNB->get_nth_page(page); + Gtk::Widget *w = mainNB->get_nth_page (page); bool optionsWritten = false; for (std::map::iterator i = epanels.begin(); i != epanels.end(); ++i) { @@ -667,11 +672,11 @@ bool RTWindow::on_delete_event(GdkEventAny* event) ProfilePanel::cleanup(); if (!options.windowMaximized) { - get_size(options.windowWidth, options.windowHeight); + get_size (options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } - options.windowMonitor = get_screen()->get_monitor_at_window(get_window()); + options.windowMonitor = get_screen()->get_monitor_at_window (get_window()); Options::save (); hide(); @@ -681,21 +686,21 @@ bool RTWindow::on_delete_event(GdkEventAny* event) } -void RTWindow::writeToolExpandedStatus(std::vector &tpOpen) +void RTWindow::writeToolExpandedStatus (std::vector &tpOpen) { if ((isSingleTabMode() || gimpPlugin) && epanel->isRealized()) { - epanel->writeToolExpandedStatus(tpOpen); + epanel->writeToolExpandedStatus (tpOpen); } else { // Storing the options of the last EditorPanel before Gtk destroys everything // Look at the active panel first, if any, otherwise look at the first one (sorted on the filename) if (epanels.size()) { int page = mainNB->get_current_page(); - Gtk::Widget *w = mainNB->get_nth_page(page); + Gtk::Widget *w = mainNB->get_nth_page (page); bool optionsWritten = false; for (std::map::iterator i = epanels.begin(); i != epanels.end(); ++i) { if (i->second == w) { - i->second->writeToolExpandedStatus(tpOpen); + i->second->writeToolExpandedStatus (tpOpen); optionsWritten = true; } } @@ -703,7 +708,7 @@ void RTWindow::writeToolExpandedStatus(std::vector &tpOpen) if (!optionsWritten) { // fallback solution: save the options of the first editor panel std::map::iterator i = epanels.begin(); - i->second->writeToolExpandedStatus(tpOpen); + i->second->writeToolExpandedStatus (tpOpen); } } } @@ -717,11 +722,13 @@ void RTWindow::showPreferences () delete pref; fpanel->optionsChanged (); + if (epanel) { - epanel->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + epanel->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); } + for (const auto &p : epanels) { - p.second->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + p.second->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); } } @@ -754,7 +761,7 @@ void RTWindow::toggle_fullscreen () if (btn_fullscreen) { //btn_fullscreen->set_label(M("MAIN_BUTTON_FULLSCREEN")); - btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_FULLSCREEN")); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN")); btn_fullscreen->set_image (*iFullscreen); } } else { @@ -763,7 +770,7 @@ void RTWindow::toggle_fullscreen () if (btn_fullscreen) { //btn_fullscreen->set_label(M("MAIN_BUTTON_UNFULLSCREEN")); - btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_UNFULLSCREEN")); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_UNFULLSCREEN")); btn_fullscreen->set_image (*iFullscreen_exit); } } @@ -786,50 +793,51 @@ void RTWindow::SetMainCurrent() void RTWindow::MoveFileBrowserToMain() { - if( fpanel->ribbonPane->get_children().empty()) { + if ( fpanel->ribbonPane->get_children().empty()) { FileCatalog *fCatalog = fpanel->fileCatalog; - epanel->catalogPane->remove(*fCatalog); - fpanel->ribbonPane->add(*fCatalog); - fCatalog->enableTabMode(false); - fCatalog->tbLeftPanel_1_visible(true); - fCatalog->tbRightPanel_1_visible(true); + epanel->catalogPane->remove (*fCatalog); + fpanel->ribbonPane->add (*fCatalog); + fCatalog->enableTabMode (false); + fCatalog->tbLeftPanel_1_visible (true); + fCatalog->tbRightPanel_1_visible (true); } } void RTWindow::MoveFileBrowserToEditor() { - if(epanel->catalogPane->get_children().empty() ) { + if (epanel->catalogPane->get_children().empty() ) { FileCatalog *fCatalog = fpanel->fileCatalog; - fpanel->ribbonPane->remove(*fCatalog); + fpanel->ribbonPane->remove (*fCatalog); fCatalog->disableInspector(); - epanel->catalogPane->add(*fCatalog); - epanel->showTopPanel(options.editorFilmStripOpened); - fCatalog->enableTabMode(true); + epanel->catalogPane->add (*fCatalog); + epanel->showTopPanel (options.editorFilmStripOpened); + fCatalog->enableTabMode (true); fCatalog->refreshHeight(); - fCatalog->tbLeftPanel_1_visible(false); - fCatalog->tbRightPanel_1_visible(false); + fCatalog->tbLeftPanel_1_visible (false); + fCatalog->tbRightPanel_1_visible (false); } } -void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +void RTWindow::updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) { - if(epanel) { - epanel->updateProfiles(printerProfile, printerIntent, printerBPC); + if (epanel) { + epanel->updateProfiles (printerProfile, printerIntent, printerBPC); } - for(auto panel : epanels) { - panel.second->updateProfiles(printerProfile, printerIntent, printerBPC); + for (auto panel : epanels) { + panel.second->updateProfiles (printerProfile, printerIntent, printerBPC); } } void RTWindow::updateTPVScrollbar (bool hide) { fpanel->updateTPVScrollbar (hide); - if(epanel) { + + if (epanel) { epanel->updateTPVScrollbar (hide); } - for(auto panel : epanels) { + for (auto panel : epanels) { panel.second->updateTPVScrollbar (hide); } } @@ -837,11 +845,12 @@ void RTWindow::updateTPVScrollbar (bool hide) void RTWindow::updateTabsUsesIcons (bool useIcons) { fpanel->updateTabsUsesIcons (useIcons); - if(epanel) { + + if (epanel) { epanel->updateTabsUsesIcons (useIcons); } - for(auto panel : epanels) { + for (auto panel : epanels) { panel.second->updateTabsUsesIcons (useIcons); } } @@ -858,22 +867,23 @@ void RTWindow::updateFBToolBarVisibility (bool showFilmStripToolBar) void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) { - if(epanel) { + if (epanel) { epanel->updateHistogramPosition (oldPosition, newPosition); } - for(auto panel : epanels) { + + for (auto panel : epanels) { panel.second->updateHistogramPosition (oldPosition, newPosition); } } -bool RTWindow::splashClosed(GdkEventAny* event) +bool RTWindow::splashClosed (GdkEventAny* event) { delete splash; splash = nullptr; return true; } -void RTWindow::set_title_decorated(Glib::ustring fname) +void RTWindow::set_title_decorated (Glib::ustring fname) { Glib::ustring subtitle; @@ -881,7 +891,7 @@ void RTWindow::set_title_decorated(Glib::ustring fname) subtitle = " - " + fname; } - set_title(versionStr + subtitle); + set_title (versionStr + subtitle); } void RTWindow::closeOpenEditors() @@ -889,36 +899,36 @@ void RTWindow::closeOpenEditors() std::map::const_iterator itr; itr = epanels.begin(); - while(itr != epanels.end()) { - remEditorPanel((*itr).second); + while (itr != epanels.end()) { + remEditorPanel ((*itr).second); itr = epanels.begin(); } } -bool RTWindow::isEditorPanel(Widget* panel) +bool RTWindow::isEditorPanel (Widget* panel) { return (panel != bpanel) && (panel != fpanel); } -bool RTWindow::isEditorPanel(guint pageNum) +bool RTWindow::isEditorPanel (guint pageNum) { - return isEditorPanel(mainNB->get_nth_page(pageNum)); + return isEditorPanel (mainNB->get_nth_page (pageNum)); } -void RTWindow::setEditorMode(bool tabbedUI) +void RTWindow::setEditorMode (bool tabbedUI) { MoveFileBrowserToMain(); closeOpenEditors(); SetMainCurrent(); - if(tabbedUI) { - mainNB->remove_page(*epanel); + if (tabbedUI) { + mainNB->remove_page (*epanel); epanel = nullptr; - set_title_decorated(""); + set_title_decorated (""); } else { createSetmEditor(); epanel->show_all(); - set_title_decorated(""); + set_title_decorated (""); } } @@ -927,25 +937,25 @@ void RTWindow::createSetmEditor() // Editor panel, single-tab mode only epanel = Gtk::manage ( new EditorPanel (fpanel) ); epanel->setParent (this); - epanel->setParentWindow(this); + epanel->setParentWindow (this); // decorate tab Gtk::Grid* const editorLabelGrid = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - Gtk::Label* const el = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + setExpandAlignProperties (editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* const el = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") )); const auto pos = options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT; if (options.mainNBVertical) { - el->set_angle(90); + el->set_angle (90); } - editorLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1); - editorLabelGrid->attach_next_to(*el, pos, 1, 1); + editorLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1); + editorLabelGrid->attach_next_to (*el, pos, 1, 1); - editorLabelGrid->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP")); + editorLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_EDITOR_TOOLTIP")); editorLabelGrid->show_all (); - epanel->tbTopPanel_1_visible(true); //show the toggle Top Panel button + epanel->tbTopPanel_1_visible (true); //show the toggle Top Panel button mainNB->append_page (*epanel, *editorLabelGrid); } diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 70d12d68e..9c1699bcf 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -50,15 +50,15 @@ private: bool isSingleTabMode() { - return !options.tabbedUI && !(options.multiDisplayMode > 0); + return !options.tabbedUI && ! (options.multiDisplayMode > 0); }; - void findVerNumbers(int* numbers, Glib::ustring versionStr); + void findVerNumbers (int* numbers, Glib::ustring versionStr); - bool on_expose_event_epanel(GdkEventExpose* event); - bool on_expose_event_fpanel(GdkEventExpose* event); - bool splashClosed(GdkEventAny* event); - bool isEditorPanel(Widget* panel); - bool isEditorPanel(guint pageNum); + bool on_expose_event_epanel (GdkEventExpose* event); + bool on_expose_event_fpanel (GdkEventExpose* event); + bool splashClosed (GdkEventAny* event); + bool isEditorPanel (Widget* panel); + bool isEditorPanel (guint pageNum); Glib::ustring versionStr; #if defined(__APPLE__) @@ -70,20 +70,20 @@ public: ~RTWindow(); #if defined(__APPLE__) - bool osxFileOpenEvent(Glib::ustring path); + bool osxFileOpenEvent (Glib::ustring path); #endif void addEditorPanel (EditorPanel* ep, const std::string &name); void remEditorPanel (EditorPanel* ep); - bool selectEditorPanel(const std::string &name); + bool selectEditorPanel (const std::string &name); void addBatchQueueJob (BatchQueueEntry* bqe, bool head = false); void addBatchQueueJobs (std::vector &entries); bool keyPressed (GdkEventKey* event); - bool on_configure_event(GdkEventConfigure* event); - bool on_delete_event(GdkEventAny* event); - bool on_window_state_event(GdkEventWindowState* event); - void on_mainNB_switch_page(Gtk::Widget* widget, guint page_num); + bool on_configure_event (GdkEventConfigure* event); + bool on_delete_event (GdkEventAny* event); + bool on_window_state_event (GdkEventWindowState* event); + void on_mainNB_switch_page (Gtk::Widget* widget, guint page_num); void showPreferences (); void on_realize (); @@ -115,12 +115,12 @@ public: { return is_fullscreen; } - void set_title_decorated(Glib::ustring fname); + void set_title_decorated (Glib::ustring fname); void closeOpenEditors(); - void setEditorMode(bool tabbedUI); + void setEditorMode (bool tabbedUI); void createSetmEditor(); - void writeToolExpandedStatus(std::vector &tpOpen); + void writeToolExpandedStatus (std::vector &tpOpen); }; #endif diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index f05167749..e30309fdf 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -28,7 +28,7 @@ using namespace rtengine::procparams; -ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false), editDataProvider(nullptr) +ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false), editDataProvider (nullptr) { exposurePanel = Gtk::manage (new ToolVBox ()); @@ -53,7 +53,7 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false), colortoning = Gtk::manage (new ColorToning ()); lensgeom = Gtk::manage (new LensGeometry ()); lensProf = Gtk::manage (new LensProfilePanel ()); - lensProf->setLensGeomRef(lensgeom); + lensProf->setLensGeomRef (lensgeom); distortion = Gtk::manage (new Distortion ()); rotate = Gtk::manage (new Rotate ()); vibrance = Gtk::manage (new Vibrance ()); @@ -203,8 +203,8 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false), toolPanelNotebook = new Gtk::Notebook (); toolPanelNotebook->set_name ("ToolPanelNotebook"); - metadataPanel->append_page (*exifpanel, M("MAIN_TAB_EXIF")); - metadataPanel->append_page (*iptcpanel, M("MAIN_TAB_IPTC")); + metadataPanel->append_page (*exifpanel, M ("MAIN_TAB_EXIF")); + metadataPanel->append_page (*iptcpanel, M ("MAIN_TAB_IPTC")); exposurePanelSW = Gtk::manage (new MyScrolledWindow ()); detailsPanelSW = Gtk::manage (new MyScrolledWindow ()); @@ -217,47 +217,47 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false), // load panel endings for (int i = 0; i < 6; i++) { vbPanelEnd[i] = Gtk::manage (new Gtk::VBox ()); - imgPanelEnd[i] = Gtk::manage (new RTImage("PanelEnding.png")); + imgPanelEnd[i] = Gtk::manage (new RTImage ("PanelEnding.png")); imgPanelEnd[i]->show (); vbPanelEnd[i]->pack_start (*imgPanelEnd[i], Gtk::PACK_SHRINK); vbPanelEnd[i]->show_all(); } exposurePanelSW->add (*exposurePanel); - exposurePanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); + exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); exposurePanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4); detailsPanelSW->add (*detailsPanel); - detailsPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); + detailsPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); detailsPanel->pack_start (*vbPanelEnd[1], Gtk::PACK_SHRINK, 4); colorPanelSW->add (*colorPanel); - colorPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); + colorPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); colorPanel->pack_start (*vbPanelEnd[2], Gtk::PACK_SHRINK, 4); waveletPanelSW->add (*waveletPanel); - waveletPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); + waveletPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); waveletPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0); transformPanelSW->add (*transformPanel); - transformPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); + transformPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); transformPanel->pack_start (*vbPanelEnd[3], Gtk::PACK_SHRINK, 4); rawPanelSW->add (*rawPanel); - rawPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); + rawPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0); rawPanel->pack_start (*vbPanelEnd[4], Gtk::PACK_SHRINK, 0); TOITypes type = options.UseIconNoText ? TOI_ICON : TOI_TEXT; - toiE = Gtk::manage (new TextOrIcon ("exposure.png" , M("MAIN_TAB_EXPOSURE") , M("MAIN_TAB_EXPOSURE_TOOLTIP") , type)); - toiD = Gtk::manage (new TextOrIcon ("detail.png" , M("MAIN_TAB_DETAIL") , M("MAIN_TAB_DETAIL_TOOLTIP") , type)); - toiC = Gtk::manage (new TextOrIcon ("colour.png" , M("MAIN_TAB_COLOR") , M("MAIN_TAB_COLOR_TOOLTIP") , type)); - toiW = Gtk::manage (new TextOrIcon ("wavelet.png" , M("MAIN_TAB_WAVELET") , M("MAIN_TAB_WAVELET_TOOLTIP") , type)); - toiT = Gtk::manage (new TextOrIcon ("transform.png", M("MAIN_TAB_TRANSFORM"), M("MAIN_TAB_TRANSFORM_TOOLTIP"), type)); - toiR = Gtk::manage (new TextOrIcon ("raw.png" , M("MAIN_TAB_RAW") , M("MAIN_TAB_RAW_TOOLTIP") , type)); - toiM = Gtk::manage (new TextOrIcon ("meta.png" , M("MAIN_TAB_METADATA") , M("MAIN_TAB_METADATA_TOOLTIP") , type)); + toiE = Gtk::manage (new TextOrIcon ("exposure.png", M ("MAIN_TAB_EXPOSURE"), M ("MAIN_TAB_EXPOSURE_TOOLTIP"), type)); + toiD = Gtk::manage (new TextOrIcon ("detail.png", M ("MAIN_TAB_DETAIL"), M ("MAIN_TAB_DETAIL_TOOLTIP"), type)); + toiC = Gtk::manage (new TextOrIcon ("colour.png", M ("MAIN_TAB_COLOR"), M ("MAIN_TAB_COLOR_TOOLTIP"), type)); + toiW = Gtk::manage (new TextOrIcon ("wavelet.png", M ("MAIN_TAB_WAVELET"), M ("MAIN_TAB_WAVELET_TOOLTIP"), type)); + toiT = Gtk::manage (new TextOrIcon ("transform.png", M ("MAIN_TAB_TRANSFORM"), M ("MAIN_TAB_TRANSFORM_TOOLTIP"), type)); + toiR = Gtk::manage (new TextOrIcon ("raw.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP"), type)); + toiM = Gtk::manage (new TextOrIcon ("meta.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP"), type)); toolPanelNotebook->append_page (*exposurePanelSW, *toiE); toolPanelNotebook->append_page (*detailsPanelSW, *toiD); @@ -287,17 +287,17 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false), icm->setICMPanelListener (this); toolBar = new ToolBar (); - toolBar->setToolBarListener(this); + toolBar->setToolBarListener (this); } void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel, int level) { - panel->setParent(where); - panel->setLevel(level); + panel->setParent (where); + panel->setLevel (level); expList.push_back (panel->getExpander()); - where->pack_start(*panel->getExpander(), false, false); + where->pack_start (*panel->getExpander(), false, false); } ToolPanelCoordinator::~ToolPanelCoordinator () @@ -309,12 +309,13 @@ ToolPanelCoordinator::~ToolPanelCoordinator () delete toolBar; } -void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans) +void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans) { GThreadLock lock; - if(isRaw) { - rawPanelSW->set_sensitive(true); + if (isRaw) { + rawPanelSW->set_sensitive (true); + if (isBayer) { sensorxtrans->FoldableToolPanel::hide(); sensorbayer->FoldableToolPanel::show(); @@ -332,7 +333,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr flatfield->FoldableToolPanel::hide(); } } else { - rawPanelSW->set_sensitive(false); + rawPanelSW->set_sensitive (false); } } @@ -345,7 +346,7 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib:: return; } - int changeFlags = refreshmap[(int)event]; + int changeFlags = refreshmap[ (int)event]; ProcParams* params = ipc->beginUpdateParams (); @@ -355,14 +356,15 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib:: // Compensate rotation on flip if (event == rtengine::EvCTHFlip || event == rtengine::EvCTVFlip) { - if (fabs(params->rotate.degree) > 0.001) { + if (fabs (params->rotate.degree) > 0.001) { params->rotate.degree *= -1; - changeFlags |= refreshmap[(int)rtengine::EvROTDegree]; + changeFlags |= refreshmap[ (int)rtengine::EvROTDegree]; rotate->read (params); } } int tr = TR_NONE; + if (params->coarse.rotate == 90) { tr = TR_R90; } else if (params->coarse.rotate == 180) { @@ -427,14 +429,14 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi } // And apply the partial profile nparams to mergedParams - nparams->applyTo(mergedParams); + nparams->applyTo (mergedParams); // Derive the effective changes, if it's a profile change, to prevent slow RAW rerendering if not necessary bool filterRawRefresh = false; if (event != rtengine::EvPhotoLoaded) { - ParamsEdited pe(true); - std::vector lParams(2); + ParamsEdited pe (true); + std::vector lParams (2); lParams[0] = *params; lParams[1] = *mergedParams; pe.initFrom (lParams); @@ -446,6 +448,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi delete mergedParams; tr = TR_NONE; + if (params->coarse.rotate == 90) { tr = TR_R90; } else if (params->coarse.rotate == 180) { @@ -456,7 +459,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi // trimming overflowing cropped area ipc->getInitialImage()->getImageSource()->getFullSize (fw, fh, tr); - crop->trim(params, fw, fh); + crop->trim (params, fw, fh); // updating the GUI with updated values for (auto toolPanel : toolPanels) { @@ -474,7 +477,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi // start the IPC processing if (filterRawRefresh) { - ipc->endUpdateParams ( refreshmap[(int)event] & ALLNORAW ); + ipc->endUpdateParams ( refreshmap[ (int)event] & ALLNORAW ); } else { ipc->endUpdateParams (event); } @@ -526,7 +529,7 @@ void ToolPanelCoordinator::initImage (rtengine::StagedImageProcessor* ipc_, bool ipc->setSizeListener (crop); ipc->setSizeListener (resize); ipc->setImageTypeListener (this); - flatfield->setShortcutPath(Glib::path_get_dirname(ipc->getInitialImage()->getFileName())); + flatfield->setShortcutPath (Glib::path_get_dirname (ipc->getInitialImage()->getFileName())); icm->setRawMeta (raw, (const rtengine::ImageData*)pMetaData); lensProf->setRawMeta (raw, pMetaData); @@ -552,7 +555,7 @@ void ToolPanelCoordinator::closeAllTools() for (size_t i = 0; i < options.tpOpen.size(); i++) if (i < expList.size()) { - expList.at(i)->set_expanded (false); + expList.at (i)->set_expanded (false); } } @@ -561,7 +564,7 @@ void ToolPanelCoordinator::openAllTools() for (size_t i = 0; i < options.tpOpen.size(); i++) if (i < expList.size()) { - expList.at(i)->set_expanded (true); + expList.at (i)->set_expanded (true); } } @@ -570,20 +573,20 @@ void ToolPanelCoordinator::updateToolState() for (size_t i = 0; i < options.tpOpen.size(); i++) if (i < expList.size()) { - expList.at(i)->set_expanded (options.tpOpen.at(i)); + expList.at (i)->set_expanded (options.tpOpen.at (i)); } - if(options.tpOpen.size() > expList.size()) { + if (options.tpOpen.size() > expList.size()) { size_t sizeWavelet = options.tpOpen.size() - expList.size(); std::vector temp; for (size_t i = 0; i < sizeWavelet; i++) { - temp.push_back(options.tpOpen.at(i + expList.size())); + temp.push_back (options.tpOpen.at (i + expList.size())); } - wavelet->updateToolState(temp); - wavelet->setExpanded(true); - retinex->updateToolState(temp); + wavelet->updateToolState (temp); + wavelet->setExpanded (true); + retinex->updateToolState (temp); } } @@ -599,21 +602,21 @@ void ToolPanelCoordinator::writeOptions () crop->writeOptions (); if (options.autoSaveTpOpen) { - writeToolExpandedStatus(options.tpOpen); + writeToolExpandedStatus (options.tpOpen); } } -void ToolPanelCoordinator::writeToolExpandedStatus(std::vector &tpOpen) +void ToolPanelCoordinator::writeToolExpandedStatus (std::vector &tpOpen) { tpOpen.clear (); for (size_t i = 0; i < expList.size(); i++) { - tpOpen.push_back (expList.at(i)->get_expanded ()); + tpOpen.push_back (expList.at (i)->get_expanded ()); } - wavelet->writeOptions(tpOpen); - retinex->writeOptions(tpOpen); + wavelet->writeOptions (tpOpen); + retinex->writeOptions (tpOpen); } @@ -688,14 +691,14 @@ rtengine::RawImage* ToolPanelCoordinator::getDF() const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); - if(imd) { + if (imd) { int iso = imd->getISOSpeed(); double shutter = imd->getShutterSpeed(); - std::string maker( imd->getMake() ); - std::string model( imd->getModel() ); + std::string maker ( imd->getMake() ); + std::string model ( imd->getModel() ); time_t timestamp = imd->getDateTimeAsTS(); - return rtengine::dfm.searchDarkFrame( maker, model, iso, shutter, timestamp); + return rtengine::dfm.searchDarkFrame ( maker, model, iso, shutter, timestamp); } return nullptr; @@ -709,17 +712,17 @@ rtengine::RawImage* ToolPanelCoordinator::getFF() const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); - if(imd) { + if (imd) { // int iso = imd->getISOSpeed(); temporarilly removed because unused // double shutter = imd->getShutterSpeed(); temporarilly removed because unused double aperture = imd->getFNumber(); double focallength = imd->getFocalLen(); - std::string maker( imd->getMake() ); - std::string model( imd->getModel() ); - std::string lens( imd->getLens() ); + std::string maker ( imd->getMake() ); + std::string model ( imd->getModel() ); + std::string lens ( imd->getLens() ); time_t timestamp = imd->getDateTimeAsTS(); - return rtengine::ffm.searchFlatField( maker, model, lens, focallength, aperture, timestamp); + return rtengine::ffm.searchFlatField ( maker, model, lens, focallength, aperture, timestamp); } return nullptr; @@ -792,8 +795,8 @@ void ToolPanelCoordinator::updateCurveBackgroundHistogram (LUTu & histToneCurve, colorappearance->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); toneCurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); lcurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); - rgbcurves->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); - retinex->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); + rgbcurves->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); + retinex->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI); } @@ -807,10 +810,10 @@ void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* o if (currentTP->getParent() == parent) { // Section in the same tab, we unfold it if it's not the one that has been clicked if (currentTP != openedSection) { - currentTP->setExpanded(false); + currentTP->setExpanded (false); } else { if (!currentTP->getExpanded()) { - currentTP->setExpanded(true); + currentTP->setExpanded (true); } } } @@ -826,36 +829,36 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event) bool alt = event->state & GDK_MOD1_MASK; if (alt) { - switch(event->keyval) { - case GDK_KEY_e: - toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*exposurePanelSW)); - return true; - - case GDK_KEY_d: - toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*detailsPanelSW)); - return true; - - case GDK_KEY_c: - toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*colorPanelSW)); - return true; - - case GDK_KEY_t: - toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*transformPanelSW)); - return true; - - case GDK_KEY_r: - toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*rawPanelSW)); - return true; - - case GDK_KEY_w: - toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*waveletPanelSW)); - return true; - - case GDK_KEY_m: - if (metadataPanel) { - toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*metadataPanel)); + switch (event->keyval) { + case GDK_KEY_e: + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*exposurePanelSW)); return true; - } + + case GDK_KEY_d: + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*detailsPanelSW)); + return true; + + case GDK_KEY_c: + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*colorPanelSW)); + return true; + + case GDK_KEY_t: + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW)); + return true; + + case GDK_KEY_r: + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*rawPanelSW)); + return true; + + case GDK_KEY_w: + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*waveletPanelSW)); + return true; + + case GDK_KEY_m: + if (metadataPanel) { + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*metadataPanel)); + return true; + } } } @@ -874,7 +877,7 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide) waveletPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy); for (auto currExp : expList) { - currExp->updateVScrollbars(hide); + currExp->updateVScrollbars (hide); } } @@ -883,14 +886,14 @@ void ToolPanelCoordinator::updateTabsHeader (bool useIcons) GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected TOITypes type = useIcons ? TOI_ICON : TOI_TEXT; - toiE->switchTo(type); - toiD->switchTo(type); - toiC->switchTo(type); - toiT->switchTo(type); - toiR->switchTo(type); + toiE->switchTo (type); + toiD->switchTo (type); + toiC->switchTo (type); + toiT->switchTo (type); + toiR->switchTo (type); if (toiM) { - toiM->switchTo(type); + toiM->switchTo (type); } } @@ -909,24 +912,24 @@ void ToolPanelCoordinator::toolSelected (ToolMode tool) GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected switch (tool) { - case TMCropSelect: - crop->setExpanded(true); - toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*transformPanelSW)); - break; + case TMCropSelect: + crop->setExpanded (true); + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW)); + break; - case TMSpotWB: - whitebalance->setExpanded(true); - toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*colorPanelSW)); - break; + case TMSpotWB: + whitebalance->setExpanded (true); + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*colorPanelSW)); + break; - case TMStraighten: - lensgeom->setExpanded(true); - rotate->setExpanded(true); - toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(*transformPanelSW)); - break; + case TMStraighten: + lensgeom->setExpanded (true); + rotate->setExpanded (true); + toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW)); + break; - default: - break; + default: + break; } } @@ -940,14 +943,14 @@ void ToolPanelCoordinator::editModeSwitchedOff () void ToolPanelCoordinator::dirSelected (const Glib::ustring& dirname, const Glib::ustring& openfile) { - flatfield->setShortcutPath(dirname); + flatfield->setShortcutPath (dirname); } -void ToolPanelCoordinator::setEditProvider(EditDataProvider *provider) +void ToolPanelCoordinator::setEditProvider (EditDataProvider *provider) { editDataProvider = provider; for (size_t i = 0; i < toolPanels.size(); i++) { - toolPanels.at(i)->setEditProvider(provider); + toolPanels.at (i)->setEditProvider (provider); } } diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index 4ce02ab14..5a71ef692 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -217,7 +217,7 @@ public: // toolpanellistener interface void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); - void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans); + void imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans); // profilechangelistener interface void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); void setDefaults (rtengine::procparams::ProcParams* defparams); @@ -239,8 +239,8 @@ public: // read/write the "expanded" state of the expanders & read/write the crop panel settings (ratio, guide type, etc.) void readOptions (); void writeOptions (); - void writeToolExpandedStatus(std::vector &tpOpen); - + void writeToolExpandedStatus (std::vector &tpOpen); + // wbprovider interface void getAutoWB (double& temp, double& green, double equal, double tempBias) @@ -299,7 +299,7 @@ public: void toolSelected (ToolMode tool); void editModeSwitchedOff (); - void setEditProvider(EditDataProvider *provider); + void setEditProvider (EditDataProvider *provider); }; #endif From b39f072baf024f6117a66a7f49093c78c13fce2e Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 22 Aug 2017 08:53:17 +0200 Subject: [PATCH 038/126] run through astyle --- rtgui/exportpanel.cc | 314 ++++---- rtgui/main-cli.cc | 744 ++++++++--------- rtgui/main.cc | 339 ++++---- rtgui/options.cc | 39 +- rtgui/options.h | 56 +- rtgui/preferences.cc | 1803 +++++++++++++++++++++--------------------- rtgui/rtwindow.cc | 433 +++++----- 7 files changed, 1911 insertions(+), 1817 deletions(-) diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 6f90792b3..7fdc3ae50 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -32,193 +32,193 @@ ExportPanel::ExportPanel () : listener (nullptr) pack_start(*enabled, Gtk::PACK_SHRINK, 4); pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2);*/ - Gtk::Label* labExportTitle = Gtk::manage ( new Gtk::Label (M("EXPORT_FASTEXPORTOPTIONS")) ); + Gtk::Label* labExportTitle = Gtk::manage ( new Gtk::Label (M ("EXPORT_FASTEXPORTOPTIONS")) ); labExportTitle->set_use_markup (true); - labExportTitle->set_tooltip_text (M("EXPORT_INSTRUCTIONS")); - labExportTitle->set_alignment(Gtk::ALIGN_START); - pack_start(*labExportTitle, Gtk::PACK_SHRINK, 4); + labExportTitle->set_tooltip_text (M ("EXPORT_INSTRUCTIONS")); + labExportTitle->set_alignment (Gtk::ALIGN_START); + pack_start (*labExportTitle, Gtk::PACK_SHRINK, 4); Gtk::RadioButton::Group pipeline_group; - use_fast_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M("EXPORT_USE_FAST_PIPELINE"))); - use_normal_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M("EXPORT_USE_NORMAL_PIPELINE"))); - bypass_box = Gtk::manage(new Gtk::VBox()); - bypass_ALL = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_ALL"))); - use_fast_pipeline->set_tooltip_text(M("EXPORT_USE_FAST_PIPELINE_TIP")); - bypass_sharpening = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENING"))); - bypass_sharpenEdge = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENEDGE"))); - bypass_sharpenMicro = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENMICRO"))); + use_fast_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M ("EXPORT_USE_FAST_PIPELINE"))); + use_normal_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M ("EXPORT_USE_NORMAL_PIPELINE"))); + bypass_box = Gtk::manage (new Gtk::VBox()); + bypass_ALL = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_ALL"))); + use_fast_pipeline->set_tooltip_text (M ("EXPORT_USE_FAST_PIPELINE_TIP")); + bypass_sharpening = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SHARPENING"))); + bypass_sharpenEdge = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SHARPENEDGE"))); + bypass_sharpenMicro = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SHARPENMICRO"))); //bypass_lumaDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_LUMADENOISE"))); //bypass_colorDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_COLORDENOISE"))); - bypass_defringe = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DEFRINGE"))); - bypass_dirpyrDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DIRPYRDENOISE"))); - bypass_sh_hq = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SH_HQ"))); - bypass_dirpyrequalizer = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_DIRPYREQUALIZER"))); - bypass_wavelet = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_EQUALIZER"))); - bypass_raw_ccSteps = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_CCSTEPS"))); - bypass_raw_ca = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_CA"))); - bypass_raw_df = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DF"))); - bypass_raw_ff = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_FF"))); + bypass_defringe = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DEFRINGE"))); + bypass_dirpyrDenoise = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYRDENOISE"))); + bypass_sh_hq = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SH_HQ"))); + bypass_dirpyrequalizer = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYREQUALIZER"))); + bypass_wavelet = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_EQUALIZER"))); + bypass_raw_ccSteps = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_CCSTEPS"))); + bypass_raw_ca = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_CA"))); + bypass_raw_df = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_DF"))); + bypass_raw_ff = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_FF"))); // ---------------------- Bayer sensor frame ----------------------- - Gtk::Frame *bayerFrame = Gtk::manage( new Gtk::Frame(M("TP_RAW_SENSOR_BAYER"))); + Gtk::Frame *bayerFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_BAYER"))); Gtk::VBox* bayerFrameVBox = Gtk::manage (new Gtk::VBox ()); Gtk::HBox* hb_raw_bayer_method = Gtk::manage (new Gtk::HBox ()); - hb_raw_bayer_method->pack_start (*Gtk::manage (new Gtk::Label ( M("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); + hb_raw_bayer_method->pack_start (*Gtk::manage (new Gtk::Label ( M ("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); raw_bayer_method = Gtk::manage (new MyComboBoxText ()); - for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) { - raw_bayer_method->append(procparams::RAWParams::BayerSensor::methodstring[i]); + for ( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) { + raw_bayer_method->append (procparams::RAWParams::BayerSensor::methodstring[i]); } - raw_bayer_method->set_active(0); + raw_bayer_method->set_active (0); hb_raw_bayer_method->pack_end (*raw_bayer_method, Gtk::PACK_EXPAND_WIDGET, 4); //bypass_raw_all_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_ALL_ENHANCE"))); - bypass_raw_bayer_linenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LINENOISE"))); - bypass_raw_bayer_greenthresh = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_GREENTHRESH"))); - bypass_raw_bayer_dcb_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ITERATIONS"))); - bypass_raw_bayer_dcb_enhance = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_DCB_ENHANCE"))); - bypass_raw_bayer_lmmse_iterations = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_RAW_LMMSE_ITERATIONS"))); + bypass_raw_bayer_linenoise = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_LINENOISE"))); + bypass_raw_bayer_greenthresh = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_GREENTHRESH"))); + bypass_raw_bayer_dcb_iterations = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_DCB_ITERATIONS"))); + bypass_raw_bayer_dcb_enhance = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_DCB_ENHANCE"))); + bypass_raw_bayer_lmmse_iterations = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_LMMSE_ITERATIONS"))); // ---------------------- Bayer sensor frame ----------------------- - Gtk::Frame *xtransFrame = Gtk::manage( new Gtk::Frame(M("TP_RAW_SENSOR_XTRANS"))); + Gtk::Frame *xtransFrame = Gtk::manage ( new Gtk::Frame (M ("TP_RAW_SENSOR_XTRANS"))); Gtk::VBox* xtransFrameVBox = Gtk::manage (new Gtk::VBox ()); Gtk::HBox* hb_raw_xtrans_method = Gtk::manage (new Gtk::HBox ()); - hb_raw_xtrans_method->pack_start (*Gtk::manage (new Gtk::Label ( M("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); + hb_raw_xtrans_method->pack_start (*Gtk::manage (new Gtk::Label ( M ("EXPORT_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); raw_xtrans_method = Gtk::manage (new MyComboBoxText ()); - for( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) { - raw_xtrans_method->append(procparams::RAWParams::XTransSensor::methodstring[i]); + for ( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) { + raw_xtrans_method->append (procparams::RAWParams::XTransSensor::methodstring[i]); } - raw_xtrans_method->set_active(0); + raw_xtrans_method->set_active (0); hb_raw_xtrans_method->pack_end (*raw_xtrans_method, Gtk::PACK_EXPAND_WIDGET, 4); // ---------------------------------------------------------------- // start global packing Gtk::HBox* lblbox = Gtk::manage (new Gtk::HBox ()); - lblbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_PIPELINE"))), Gtk::PACK_SHRINK, 4); + lblbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_PIPELINE"))), Gtk::PACK_SHRINK, 4); pack_start (*lblbox, Gtk::PACK_SHRINK, 4); - pack_start(*use_fast_pipeline , Gtk::PACK_SHRINK, 4); - pack_start(*use_normal_pipeline , Gtk::PACK_SHRINK, 4); + pack_start (*use_fast_pipeline, Gtk::PACK_SHRINK, 4); + pack_start (*use_normal_pipeline, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); lblbox = Gtk::manage (new Gtk::HBox ()); - lblbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_BYPASS"))), Gtk::PACK_SHRINK, 4); + lblbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_BYPASS"))), Gtk::PACK_SHRINK, 4); bypass_box->pack_start (*lblbox, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_ALL , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_ALL, Gtk::PACK_SHRINK, 4); // bypass_box->pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sharpening , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sharpenEdge , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sharpenMicro , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sharpening, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sharpenEdge, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sharpenMicro, Gtk::PACK_SHRINK, 4); //pack_start(*bypass_lumaDenoise , Gtk::PACK_SHRINK, 4); //pack_start(*bypass_colorDenoise , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_defringe , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_sh_hq , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_dirpyrequalizer , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_wavelet , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_defringe, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_sh_hq, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_dirpyrequalizer, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_wavelet, Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*hb_raw_bayer_method, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*hb_raw_bayer_method, Gtk::PACK_SHRINK, 4); //bayerFrameVBox->pack_start(*bypass_raw_all_enhance , Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_dcb_iterations, Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_dcb_enhance , Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_lmmse_iterations, Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_linenoise , Gtk::PACK_SHRINK, 4); - bayerFrameVBox->pack_start(*bypass_raw_bayer_greenthresh , Gtk::PACK_SHRINK, 4); - bayerFrame->add(*bayerFrameVBox); + bayerFrameVBox->pack_start (*bypass_raw_bayer_dcb_iterations, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_dcb_enhance, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_lmmse_iterations, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_linenoise, Gtk::PACK_SHRINK, 4); + bayerFrameVBox->pack_start (*bypass_raw_bayer_greenthresh, Gtk::PACK_SHRINK, 4); + bayerFrame->add (*bayerFrameVBox); - xtransFrameVBox->pack_start(*hb_raw_xtrans_method, Gtk::PACK_SHRINK, 4); - xtransFrame->add(*xtransFrameVBox); + xtransFrameVBox->pack_start (*hb_raw_xtrans_method, Gtk::PACK_SHRINK, 4); + xtransFrame->add (*xtransFrameVBox); - bypass_box->pack_start(*bypass_raw_ccSteps , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_raw_ca , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_ccSteps, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_ca, Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_raw_df , Gtk::PACK_SHRINK, 4); - bypass_box->pack_start(*bypass_raw_ff , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_df, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*bypass_raw_ff, Gtk::PACK_SHRINK, 4); - pack_start(*bypass_box, Gtk::PACK_SHRINK); - - pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); + pack_start (*bypass_box, Gtk::PACK_SHRINK); + + pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); // Resize options Gtk::HBox* rmbox = Gtk::manage (new Gtk::HBox ()); - rmbox->pack_start (*Gtk::manage (new Gtk::Label (M("TP_RESIZE_LABEL"))), Gtk::PACK_SHRINK, 4); + rmbox->pack_start (*Gtk::manage (new Gtk::Label (M ("TP_RESIZE_LABEL"))), Gtk::PACK_SHRINK, 4); pack_start (*rmbox, Gtk::PACK_SHRINK, 4); Gtk::HBox* wbox = Gtk::manage (new Gtk::HBox ()); Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); MaxWidth = Gtk::manage (new MySpinButton ()); MaxHeight = Gtk::manage (new MySpinButton ()); - wbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_MAXWIDTH"))), Gtk::PACK_SHRINK, 4); + wbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_MAXWIDTH"))), Gtk::PACK_SHRINK, 4); wbox->pack_start (*MaxWidth); - hbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_MAXHEIGHT"))), Gtk::PACK_SHRINK, 4); + hbox->pack_start (*Gtk::manage (new Gtk::Label (M ("EXPORT_MAXHEIGHT"))), Gtk::PACK_SHRINK, 4); hbox->pack_start (*MaxHeight); pack_start (*wbox, Gtk::PACK_SHRINK, 4); pack_start (*hbox, Gtk::PACK_SHRINK, 4); MaxWidth->set_digits (0); - MaxWidth->set_width_chars(5); - MaxWidth->set_max_width_chars(5); + MaxWidth->set_width_chars (5); + MaxWidth->set_max_width_chars (5); MaxWidth->set_increments (1, 100); MaxWidth->set_value (options.fastexport_resize_width); MaxWidth->set_range (32, 10000); MaxHeight->set_digits (0); - MaxHeight->set_width_chars(5); - MaxHeight->set_max_width_chars(5); + MaxHeight->set_width_chars (5); + MaxHeight->set_max_width_chars (5); MaxHeight->set_increments (1, 100); MaxHeight->set_value (options.fastexport_resize_height); MaxHeight->set_range (32, 10000); // Buttons btnFastExport = Gtk::manage ( new Gtk::Button () ); - btnFastExport->set_tooltip_text(M("EXPORT_PUTTOQUEUEFAST")); + btnFastExport->set_tooltip_text (M ("EXPORT_PUTTOQUEUEFAST")); btnFastExport->set_image (*Gtk::manage (new RTImage ("processing.png"))); - pack_start(*btnFastExport, Gtk::PACK_SHRINK, 4); + pack_start (*btnFastExport, Gtk::PACK_SHRINK, 4); // add panel ending Gtk::VBox* vboxpe = Gtk::manage (new Gtk::VBox ()); Gtk::HSeparator* hseptpe = Gtk::manage (new Gtk::HSeparator ()); - Gtk::Image* peImg = Gtk::manage (new RTImage("PanelEnding.png")); - vboxpe->pack_start(*hseptpe, Gtk::PACK_SHRINK, 4); - vboxpe->pack_start(*peImg); - pack_start(*vboxpe, Gtk::PACK_SHRINK, 0); + Gtk::Image* peImg = Gtk::manage (new RTImage ("PanelEnding.png")); + vboxpe->pack_start (*hseptpe, Gtk::PACK_SHRINK, 4); + vboxpe->pack_start (*peImg); + pack_start (*vboxpe, Gtk::PACK_SHRINK, 0); - use_fast_pipeline->signal_toggled().connect(sigc::mem_fun(*this, &ExportPanel::use_fast_pipeline_toggled)); - btnFastExport->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::FastExportPressed) ); + use_fast_pipeline->signal_toggled().connect (sigc::mem_fun (*this, &ExportPanel::use_fast_pipeline_toggled)); + btnFastExport->signal_clicked().connect ( sigc::mem_fun (*this, &ExportPanel::FastExportPressed) ); //btnExportLoadSettings->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::LoadSettings) ); //btnExportSaveSettings->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::SaveSettings) ); - bypass_ALLconn = bypass_ALL->signal_toggled().connect (sigc::mem_fun(*this, &ExportPanel::bypassALL_Toggled)); + bypass_ALLconn = bypass_ALL->signal_toggled().connect (sigc::mem_fun (*this, &ExportPanel::bypassALL_Toggled)); - bypass_sharpeningConn = bypass_sharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_sharpenEdgeConn = bypass_sharpenEdge->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_sharpenMicroConn = bypass_sharpenMicro->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sharpeningConn = bypass_sharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sharpenEdgeConn = bypass_sharpenEdge->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sharpenMicroConn = bypass_sharpenMicro->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); //bypass_lumaDenoiseConn = bypass_lumaDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); //bypass_colorDenoiseConn = bypass_colorDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_waveletConn = bypass_wavelet->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_waveletConn = bypass_wavelet->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); //bypass_raw_all_enhanceConn = bypass_raw_bayer_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_dcb_iterationsConn = bypass_raw_bayer_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_dcb_enhanceConn = bypass_raw_bayer_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_lmmse_iterationsConn = bypass_raw_bayer_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_linenoiseConn = bypass_raw_bayer_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_bayer_greenthreshConn = bypass_raw_bayer_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_ccStepsConn = bypass_raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_caConn = bypass_raw_ca->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_dfConn = bypass_raw_df->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); - bypass_raw_ffConn = bypass_raw_ff->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_dcb_iterationsConn = bypass_raw_bayer_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_dcb_enhanceConn = bypass_raw_bayer_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_lmmse_iterationsConn = bypass_raw_bayer_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_linenoiseConn = bypass_raw_bayer_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_bayer_greenthreshConn = bypass_raw_bayer_greenthresh->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_ccStepsConn = bypass_raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_caConn = bypass_raw_ca->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_dfConn = bypass_raw_df->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); + bypass_raw_ffConn = bypass_raw_ff->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true)); LoadDefaultSettings(); } @@ -251,39 +251,39 @@ void ExportPanel::SaveSettingsAsDefault() } \ } while (false) // Save fast export settings to options - FE_OPT_STORE_(options.fastexport_bypass_sharpening, bypass_sharpening->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_sharpenEdge, bypass_sharpenEdge->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_sharpenMicro, bypass_sharpenMicro->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sharpening, bypass_sharpening->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sharpenEdge, bypass_sharpenEdge->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sharpenMicro, bypass_sharpenMicro->get_active ()); //options.fastexport_bypass_lumaDenoise = bypass_lumaDenoise->get_active (); //options.fastexport_bypass_colorDenoise = bypass_colorDenoise->get_active (); - FE_OPT_STORE_(options.fastexport_bypass_defringe, bypass_defringe->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_dirpyrDenoise, bypass_dirpyrDenoise->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_sh_hq, bypass_sh_hq->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_dirpyrequalizer, bypass_dirpyrequalizer->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_wavelet, bypass_wavelet->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_defringe, bypass_defringe->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_dirpyrDenoise, bypass_dirpyrDenoise->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_sh_hq, bypass_sh_hq->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_dirpyrequalizer, bypass_dirpyrequalizer->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_wavelet, bypass_wavelet->get_active ()); //options.fastexport_bypass_raw_bayer_all_enhance = bypass_raw_all_enhance->get_active (); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_dcb_iterations, bypass_raw_bayer_dcb_iterations->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_dcb_enhance, bypass_raw_bayer_dcb_enhance->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_lmmse_iterations, bypass_raw_bayer_lmmse_iterations->get_active()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_linenoise, bypass_raw_bayer_linenoise->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_greenthresh, bypass_raw_bayer_greenthresh->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_ccSteps, bypass_raw_ccSteps->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_ca, bypass_raw_ca->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_df, bypass_raw_df->get_active ()); - FE_OPT_STORE_(options.fastexport_bypass_raw_ff, bypass_raw_ff->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_dcb_iterations, bypass_raw_bayer_dcb_iterations->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_dcb_enhance, bypass_raw_bayer_dcb_enhance->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_lmmse_iterations, bypass_raw_bayer_lmmse_iterations->get_active()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_linenoise, bypass_raw_bayer_linenoise->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_bayer_greenthresh, bypass_raw_bayer_greenthresh->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_ccSteps, bypass_raw_ccSteps->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_ca, bypass_raw_ca->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_df, bypass_raw_df->get_active ()); + FE_OPT_STORE_ (options.fastexport_bypass_raw_ff, bypass_raw_ff->get_active ()); //saving Bayer demosaic_method int currentRow = raw_bayer_method->get_active_row_number(); - if( currentRow >= 0 && currentRow < procparams::RAWParams::BayerSensor::numMethods) { - FE_OPT_STORE_(options.fastexport_raw_bayer_method, procparams::RAWParams::BayerSensor::methodstring[currentRow]); + if ( currentRow >= 0 && currentRow < procparams::RAWParams::BayerSensor::numMethods) { + FE_OPT_STORE_ (options.fastexport_raw_bayer_method, procparams::RAWParams::BayerSensor::methodstring[currentRow]); } //saving X-Trans demosaic_method currentRow = raw_xtrans_method->get_active_row_number(); - if( currentRow >= 0 && currentRow < procparams::RAWParams::XTransSensor::numMethods) { - FE_OPT_STORE_(options.fastexport_raw_xtrans_method, procparams::RAWParams::XTransSensor::methodstring[currentRow]); + if ( currentRow >= 0 && currentRow < procparams::RAWParams::XTransSensor::numMethods) { + FE_OPT_STORE_ (options.fastexport_raw_xtrans_method, procparams::RAWParams::XTransSensor::methodstring[currentRow]); } // options.fastexport_icm_input = icm_input ; @@ -295,18 +295,18 @@ void ExportPanel::SaveSettingsAsDefault() // options.fastexport_resize_appliesTo = resize_appliesTo; // options.fastexport_resize_dataspec = resize_dataspec ; - FE_OPT_STORE_(options.fastexport_resize_method, "Lanczos"); - FE_OPT_STORE_(options.fastexport_resize_width, MaxWidth->get_value_as_int ()); - FE_OPT_STORE_(options.fastexport_resize_height, MaxHeight->get_value_as_int ()); + FE_OPT_STORE_ (options.fastexport_resize_method, "Lanczos"); + FE_OPT_STORE_ (options.fastexport_resize_width, MaxWidth->get_value_as_int ()); + FE_OPT_STORE_ (options.fastexport_resize_height, MaxHeight->get_value_as_int ()); - FE_OPT_STORE_(options.fastexport_use_fast_pipeline, use_fast_pipeline->get_active()); + FE_OPT_STORE_ (options.fastexport_use_fast_pipeline, use_fast_pipeline->get_active()); #undef FE_OPT_STORE_ if (changed) { try { Options::save(); } catch (Options::Error &e) { - Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); msgd.run(); } } @@ -328,7 +328,7 @@ void ExportPanel::LoadDefaultSettings() //bypass_raw_bayer_all_enhance->set_active (options.fastexport_bypass_raw_bayer_all_enhance ); bypass_raw_bayer_dcb_iterations->set_active (options.fastexport_bypass_raw_bayer_dcb_iterations ); bypass_raw_bayer_dcb_enhance->set_active (options.fastexport_bypass_raw_bayer_dcb_enhance ); - bypass_raw_bayer_lmmse_iterations->set_active(options.fastexport_bypass_raw_bayer_lmmse_iterations); + bypass_raw_bayer_lmmse_iterations->set_active (options.fastexport_bypass_raw_bayer_lmmse_iterations); bypass_raw_bayer_linenoise->set_active (options.fastexport_bypass_raw_bayer_linenoise ); bypass_raw_bayer_greenthresh->set_active (options.fastexport_bypass_raw_bayer_greenthresh ); bypass_raw_ccSteps->set_active (options.fastexport_bypass_raw_ccSteps ); @@ -337,20 +337,20 @@ void ExportPanel::LoadDefaultSettings() bypass_raw_ff->set_active (options.fastexport_bypass_raw_ff ); // Bayer demosaic method - raw_bayer_method->set_active(procparams::RAWParams::BayerSensor::numMethods); + raw_bayer_method->set_active (procparams::RAWParams::BayerSensor::numMethods); - for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) - if( options.fastexport_raw_bayer_method == procparams::RAWParams::BayerSensor::methodstring[i]) { - raw_bayer_method->set_active(i); + for ( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) + if ( options.fastexport_raw_bayer_method == procparams::RAWParams::BayerSensor::methodstring[i]) { + raw_bayer_method->set_active (i); break; } // X-Trans demosaic method - raw_xtrans_method->set_active(procparams::RAWParams::XTransSensor::numMethods); + raw_xtrans_method->set_active (procparams::RAWParams::XTransSensor::numMethods); - for( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) - if( options.fastexport_raw_xtrans_method == procparams::RAWParams::XTransSensor::methodstring[i]) { - raw_xtrans_method->set_active(i); + for ( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) + if ( options.fastexport_raw_xtrans_method == procparams::RAWParams::XTransSensor::methodstring[i]) { + raw_xtrans_method->set_active (i); break; } @@ -363,14 +363,14 @@ void ExportPanel::LoadDefaultSettings() // resize_appliesTo = options.fastexport_resize_appliesTo; // resize_dataspec = options.fastexport_resize_dataspec ; - MaxWidth->set_value(options.fastexport_resize_width); - MaxHeight->set_value(options.fastexport_resize_height); + MaxWidth->set_value (options.fastexport_resize_width); + MaxHeight->set_value (options.fastexport_resize_height); if (options.fastexport_use_fast_pipeline) { - use_fast_pipeline->set_active(true); - bypass_box->set_sensitive(false); + use_fast_pipeline->set_active (true); + bypass_box->set_sensitive (false); } else { - use_normal_pipeline->set_active(true); + use_normal_pipeline->set_active (true); } } @@ -410,26 +410,26 @@ void ExportPanel::bypassALL_Toggled() bypass_ALL->set_inconsistent (false); - bypass_sharpening->set_active(bypass_ALL->get_active()); - bypass_sharpenEdge->set_active(bypass_ALL->get_active()); - bypass_sharpenMicro->set_active(bypass_ALL->get_active()); + bypass_sharpening->set_active (bypass_ALL->get_active()); + bypass_sharpenEdge->set_active (bypass_ALL->get_active()); + bypass_sharpenMicro->set_active (bypass_ALL->get_active()); //bypass_lumaDenoise->set_active(bypass_ALL->get_active()); //bypass_colorDenoise->set_active(bypass_ALL->get_active()); - bypass_defringe->set_active(bypass_ALL->get_active()); - bypass_dirpyrDenoise->set_active(bypass_ALL->get_active()); - bypass_sh_hq->set_active(bypass_ALL->get_active()); - bypass_dirpyrequalizer->set_active(bypass_ALL->get_active()); - bypass_wavelet->set_active(bypass_ALL->get_active()); + bypass_defringe->set_active (bypass_ALL->get_active()); + bypass_dirpyrDenoise->set_active (bypass_ALL->get_active()); + bypass_sh_hq->set_active (bypass_ALL->get_active()); + bypass_dirpyrequalizer->set_active (bypass_ALL->get_active()); + bypass_wavelet->set_active (bypass_ALL->get_active()); //bypass_raw_bayer_all_enhance->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_dcb_iterations->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_dcb_enhance->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_lmmse_iterations->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_linenoise->set_active(bypass_ALL->get_active()); - bypass_raw_bayer_greenthresh->set_active(bypass_ALL->get_active()); - bypass_raw_ccSteps->set_active(bypass_ALL->get_active()); - bypass_raw_ca->set_active(bypass_ALL->get_active()); - bypass_raw_df->set_active(bypass_ALL->get_active()); - bypass_raw_ff->set_active(bypass_ALL->get_active()); + bypass_raw_bayer_dcb_iterations->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_dcb_enhance->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_lmmse_iterations->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_linenoise->set_active (bypass_ALL->get_active()); + bypass_raw_bayer_greenthresh->set_active (bypass_ALL->get_active()); + bypass_raw_ccSteps->set_active (bypass_ALL->get_active()); + bypass_raw_ca->set_active (bypass_ALL->get_active()); + bypass_raw_df->set_active (bypass_ALL->get_active()); + bypass_raw_ff->set_active (bypass_ALL->get_active()); bypass_sharpeningConn.block (false); bypass_sharpenEdgeConn.block (false); @@ -455,7 +455,7 @@ void ExportPanel::bypassALL_Toggled() void ExportPanel::use_fast_pipeline_toggled() { - bypass_box->set_sensitive(!use_fast_pipeline->get_active()); + bypass_box->set_sensitive (!use_fast_pipeline->get_active()); } /* diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 7c120e9cf..7908b9133 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -96,14 +96,14 @@ bool fast_export = false; * -1 if there is an error in parameters * -2 if an error occurred during processing * -3 if at least one required procparam file was not found */ -int processLineParams( int argc, char **argv ); +int processLineParams ( int argc, char **argv ); -bool dontLoadCache( int argc, char **argv ); +bool dontLoadCache ( int argc, char **argv ); -int main(int argc, char **argv) +int main (int argc, char **argv) { - setlocale(LC_ALL, ""); - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_ALL, ""); + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." Gio::init (); @@ -116,33 +116,33 @@ int main(int argc, char **argv) #ifdef WIN32 WCHAR exnameU[512] = {0}; GetModuleFileNameW (NULL, exnameU, 511); - WideCharToMultiByte(CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); + WideCharToMultiByte (CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); #else - if (readlink("/proc/self/exe", exname, 511) < 0) { - strncpy(exname, argv[0], 511); + if (readlink ("/proc/self/exe", exname, 511) < 0) { + strncpy (exname, argv[0], 511); } #endif - exePath = Glib::path_get_dirname(exname); + exePath = Glib::path_get_dirname (exname); // set paths - if (Glib::path_is_absolute(DATA_SEARCH_PATH)) { + if (Glib::path_is_absolute (DATA_SEARCH_PATH)) { argv0 = DATA_SEARCH_PATH; } else { - argv0 = Glib::build_filename(exePath, DATA_SEARCH_PATH); + argv0 = Glib::build_filename (exePath, DATA_SEARCH_PATH); } - if (Glib::path_is_absolute(CREDITS_SEARCH_PATH)) { + if (Glib::path_is_absolute (CREDITS_SEARCH_PATH)) { creditsPath = CREDITS_SEARCH_PATH; } else { - creditsPath = Glib::build_filename(exePath, CREDITS_SEARCH_PATH); + creditsPath = Glib::build_filename (exePath, CREDITS_SEARCH_PATH); } - if (Glib::path_is_absolute(LICENCE_SEARCH_PATH)) { + if (Glib::path_is_absolute (LICENCE_SEARCH_PATH)) { licensePath = LICENCE_SEARCH_PATH; } else { - licensePath = Glib::build_filename(exePath, LICENCE_SEARCH_PATH); + licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH); } #else @@ -151,24 +151,24 @@ int main(int argc, char **argv) licensePath = LICENCE_SEARCH_PATH; #endif - bool quickstart = dontLoadCache(argc, argv); + bool quickstart = dontLoadCache (argc, argv); try { Options::load (quickstart); } catch (Options::Error &) { - printf("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!\n"); + printf ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!\n"); return -2; } - rtengine::setPaths(options); + rtengine::setPaths (options); - TIFFSetWarningHandler(nullptr); // avoid annoying message boxes + TIFFSetWarningHandler (nullptr); // avoid annoying message boxes #ifndef WIN32 // Move the old path to the new one if the new does not exist - if (Glib::file_test(Glib::build_filename(options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { - g_rename(Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); + if (Glib::file_test (Glib::build_filename (options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test (options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { + g_rename (Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); } #endif @@ -177,57 +177,58 @@ int main(int argc, char **argv) bool consoleOpened = false; // suppression of annoying error boxes - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); if (argc > 1 || options.rtSettings.verbose) { - Glib::ustring fname(fname_to_utf8 (argv[1])); + Glib::ustring fname (fname_to_utf8 (argv[1])); #if ECLIPSE_ARGS - fname = fname.substr(1, fname.length()-2); + fname = fname.substr (1, fname.length() - 2); #endif + if (options.rtSettings.verbose || ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR))) { - bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001); - bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001); + bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001); + bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001); // no console, if stdout and stderr both are redirected to file - if( !(stdoutRedirectedtoFile && stderrRedirectedtoFile)) { + if ( ! (stdoutRedirectedtoFile && stderrRedirectedtoFile)) { // check if parameter -w was passed. // We have to do that in this step, because it controls whether to open a console to show the output of following steps bool Console = true; - for(int i = 1; i < argc; i++) - if(!strcmp(argv[i], "-w")) { + for (int i = 1; i < argc; i++) + if (!strcmp (argv[i], "-w")) { Console = false; break; } - if(Console && AllocConsole()) { - AttachConsole( GetCurrentProcessId() ) ; + if (Console && AllocConsole()) { + AttachConsole ( GetCurrentProcessId() ) ; // Don't allow CTRL-C in console to terminate RT - SetConsoleCtrlHandler( NULL, true ); + SetConsoleCtrlHandler ( NULL, true ); // Set title of console char consoletitle[128]; - sprintf(consoletitle, "RawTherapee %s Console", RTVERSION); - SetConsoleTitle(consoletitle); + sprintf (consoletitle, "RawTherapee %s Console", RTVERSION); + SetConsoleTitle (consoletitle); // increase size of screen buffer COORD c; c.X = 200; c.Y = 1000; - SetConsoleScreenBufferSize( GetStdHandle( STD_OUTPUT_HANDLE ), c ); + SetConsoleScreenBufferSize ( GetStdHandle ( STD_OUTPUT_HANDLE ), c ); // Disable console-Cursor CONSOLE_CURSOR_INFO cursorInfo; cursorInfo.dwSize = 100; cursorInfo.bVisible = false; - SetConsoleCursorInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &cursorInfo ); + SetConsoleCursorInfo ( GetStdHandle ( STD_OUTPUT_HANDLE ), &cursorInfo ); - if(!stdoutRedirectedtoFile) { - freopen( "CON", "w", stdout ) ; + if (!stdoutRedirectedtoFile) { + freopen ( "CON", "w", stdout ) ; } - if(!stderrRedirectedtoFile) { - freopen( "CON", "w", stderr ) ; + if (!stderrRedirectedtoFile) { + freopen ( "CON", "w", stderr ) ; } - freopen( "CON", "r", stdin ) ; + freopen ( "CON", "r", stdin ) ; consoleOpened = true; @@ -238,31 +239,34 @@ int main(int argc, char **argv) } } } + #endif int ret = 0; // printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing std::cout << "RawTherapee, version " << RTVERSION << ", command line" << std::endl; + if (argc > 1) { - ret = processLineParams(argc, argv); - } - else { + ret = processLineParams (argc, argv); + } else { std::cout << "Terminating without anything to do." << std::endl; } #ifdef WIN32 - if(consoleOpened) { - printf("Press any key to exit RawTherapee\n"); - FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + + if (consoleOpened) { + printf ("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); getch(); } + #endif return ret; } -void deleteProcParams(std::vector &pparams) +void deleteProcParams (std::vector &pparams) { for (unsigned int i = 0; i < pparams.size(); i++) { pparams[i]->deleteInstance(); @@ -274,14 +278,15 @@ void deleteProcParams(std::vector &pparam } -bool dontLoadCache( int argc, char **argv ) +bool dontLoadCache ( int argc, char **argv ) { for (int iArg = 1; iArg < argc; iArg++) { - Glib::ustring currParam(argv[iArg]); + Glib::ustring currParam (argv[iArg]); #if ECLIPSE_ARGS - currParam = currParam.substr(1, currParam.length()-2); + currParam = currParam.substr (1, currParam.length() - 2); #endif - if( currParam.at(0) == '-' && currParam.at(1) == 'q' ) { + + if ( currParam.at (0) == '-' && currParam.at (1) == 'q' ) { return true; } } @@ -289,7 +294,7 @@ bool dontLoadCache( int argc, char **argv ) return false; } -int processLineParams( int argc, char **argv ) +int processLineParams ( int argc, char **argv ) { rtengine::procparams::PartialProfile *rawParams = nullptr, *imgParams = nullptr; std::vector inputFiles; @@ -310,311 +315,316 @@ int processLineParams( int argc, char **argv ) std::string outputType = ""; unsigned errors = 0; - for( int iArg = 1; iArg < argc; iArg++) { - Glib::ustring currParam(argv[iArg]); + for ( int iArg = 1; iArg < argc; iArg++) { + Glib::ustring currParam (argv[iArg]); #if ECLIPSE_ARGS - currParam = currParam.substr(1, currParam.length()-2); -#endif - if( currParam.at(0) == '-' ) { - switch( currParam.at(1) ) { - case 'O': - copyParamsFile = true; - - case 'o': // outputfile or dir - if( iArg + 1 < argc ) { - iArg++; - outputPath = Glib::ustring(fname_to_utf8(argv[iArg])); -#if ECLIPSE_ARGS - outputPath = outputPath.substr(1, outputPath.length()-2); -#endif - if(outputPath.substr(0,9) == "/dev/null") { - outputPath.assign("/dev/null"); // removing any useless chars or filename - outputDirectory = false; - leaveUntouched = true; - } else if(Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) { - outputDirectory = true; - } - } - - break; - - case 'p': // processing parameters for all inputs; all set procparams are required, so - - // RT stop if any of them can't be loaded for any reason. - if( iArg + 1 < argc ) { - iArg++; - Glib::ustring fname(fname_to_utf8(argv[iArg])); -#if ECLIPSE_ARGS - fname = fname.substr(1, fname.length()-2); + currParam = currParam.substr (1, currParam.length() - 2); #endif - if (fname.at(0) == '-') { - std::cerr << "Error: filename missing next to the -p switch" << std::endl; - deleteProcParams(processingParams); - return -3; + if ( currParam.at (0) == '-' ) { + switch ( currParam.at (1) ) { + case 'O': + copyParamsFile = true; + + case 'o': // outputfile or dir + if ( iArg + 1 < argc ) { + iArg++; + outputPath = Glib::ustring (fname_to_utf8 (argv[iArg])); +#if ECLIPSE_ARGS + outputPath = outputPath.substr (1, outputPath.length() - 2); +#endif + + if (outputPath.substr (0, 9) == "/dev/null") { + outputPath.assign ("/dev/null"); // removing any useless chars or filename + outputDirectory = false; + leaveUntouched = true; + } else if (Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) { + outputDirectory = true; + } } - rtengine::procparams::PartialProfile* currentParams = new rtengine::procparams::PartialProfile(true); + break; - if (!(currentParams->load ( fname ))) { - processingParams.push_back(currentParams); + case 'p': // processing parameters for all inputs; all set procparams are required, so + + // RT stop if any of them can't be loaded for any reason. + if ( iArg + 1 < argc ) { + iArg++; + Glib::ustring fname (fname_to_utf8 (argv[iArg])); +#if ECLIPSE_ARGS + fname = fname.substr (1, fname.length() - 2); +#endif + + if (fname.at (0) == '-') { + std::cerr << "Error: filename missing next to the -p switch" << std::endl; + deleteProcParams (processingParams); + return -3; + } + + rtengine::procparams::PartialProfile* currentParams = new rtengine::procparams::PartialProfile (true); + + if (! (currentParams->load ( fname ))) { + processingParams.push_back (currentParams); + } else { + std::cerr << "Error: \"" << fname << "\" not found" << std::endl; + deleteProcParams (processingParams); + return -3; + } + } + + break; + + case 'S': + skipIfNoSidecar = true; + + case 's': // Processing params next to file (file extension appended) + sideProcParams = true; + sideCarFilePos = processingParams.size(); + break; + + case 'd': + useDefault = true; + break; + + case 'q': + break; + + case 'Y': + overwriteFiles = true; + break; + + case 'a': + allExtensions = true; + break; + + case 'j': + if (currParam.length() > 2 && currParam.at (2) == 's') { + if (currParam.length() == 3) { + std::cerr << "Error: the -js switch requires a mandatory value!" << std::endl; + deleteProcParams (processingParams); + return -3; + } + + // looking for the subsampling parameter + subsampling = atoi (currParam.substr (3).c_str()); + + if (subsampling < 1 || subsampling > 3) { + std::cerr << "Error: the value accompanying the -js switch has to be in the [1-3] range!" << std::endl; + deleteProcParams (processingParams); + return -3; + } } else { - std::cerr << "Error: \"" << fname << "\" not found" << std::endl; - deleteProcParams(processingParams); - return -3; + outputType = "jpg"; + compression = atoi (currParam.substr (2).c_str()); + + if (compression < 0 || compression > 100) { + std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; + deleteProcParams (processingParams); + return -3; + } } - } - break; + break; - case 'S': - skipIfNoSidecar = true; + case 'b': + bits = atoi (currParam.substr (2).c_str()); - case 's': // Processing params next to file (file extension appended) - sideProcParams = true; - sideCarFilePos = processingParams.size(); - break; - - case 'd': - useDefault = true; - break; - - case 'q': - break; - - case 'Y': - overwriteFiles = true; - break; - - case 'a': - allExtensions = true; - break; - - case 'j': - if (currParam.length() > 2 && currParam.at(2) == 's') { - if (currParam.length() == 3) { - std::cerr << "Error: the -js switch requires a mandatory value!" << std::endl; - deleteProcParams(processingParams); + if (bits != 8 && bits != 16) { + std::cerr << "Error: specify -b8 for 8-bit or -b16 for 16-bit output." << std::endl; + deleteProcParams (processingParams); return -3; } - // looking for the subsampling parameter - subsampling = atoi(currParam.substr(3).c_str()); + break; - if (subsampling < 1 || subsampling > 3) { - std::cerr << "Error: the value accompanying the -js switch has to be in the [1-3] range!" << std::endl; - deleteProcParams(processingParams); - return -3; - } - } else { - outputType = "jpg"; - compression = atoi(currParam.substr(2).c_str()); + case 't': + outputType = "tif"; + compression = ((currParam.size() < 3 || currParam.at (2) != 'z') ? 0 : 1); + break; - if (compression < 0 || compression > 100) { - std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; - deleteProcParams(processingParams); - return -3; - } - } + case 'n': + outputType = "png"; + compression = -1; + break; - break; + case 'f': + fast_export = true; + break; - case 'b': - bits = atoi(currParam.substr(2).c_str()); - - if (bits != 8 && bits != 16) { - std::cerr << "Error: specify -b8 for 8-bit or -b16 for 16-bit output." << std::endl; - deleteProcParams(processingParams); - return -3; - } - - break; - - case 't': - outputType = "tif"; - compression = ((currParam.size() < 3 || currParam.at(2) != 'z') ? 0 : 1); - break; - - case 'n': - outputType = "png"; - compression = -1; - break; - - case 'f': - fast_export = true; - break; - - case 'c': // MUST be last option - while (iArg + 1 < argc) { - iArg++; - Glib::ustring argument(fname_to_utf8(argv[iArg])); + case 'c': // MUST be last option + while (iArg + 1 < argc) { + iArg++; + Glib::ustring argument (fname_to_utf8 (argv[iArg])); #if ECLIPSE_ARGS - argument = argument.substr(1, argument.length()-2); + argument = argument.substr (1, argument.length() - 2); #endif - if (!Glib::file_test (argument, Glib::FILE_TEST_EXISTS)) { - std::cout << "\"" << argument << "\" doesn't exist !" << std::endl; - continue; - } - - if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) { - bool notAll = allExtensions && !options.is_parse_extention (argument); - bool notRetained = !allExtensions && !options.has_retained_extention (argument); - if (notAll || notRetained) { - if (notAll) { - std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl; - } else if (notRetained) { - std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl; - } - } - else { - inputFiles.emplace_back (argument); - } - continue; - - } - - if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) { - - auto dir = Gio::File::create_for_path (argument); - if (!dir || !dir->query_exists()) { + if (!Glib::file_test (argument, Glib::FILE_TEST_EXISTS)) { + std::cout << "\"" << argument << "\" doesn't exist !" << std::endl; continue; } - try { - - auto enumerator = dir->enumerate_children("standard::name,standard::type"); - - while (auto file = enumerator->next_file()) { - - const auto fileName = Glib::build_filename(argument, file->get_name()); - bool isDir = file->get_file_type() == Gio::FILE_TYPE_DIRECTORY; - bool notAll = allExtensions && !options.is_parse_extention(fileName); - bool notRetained = !allExtensions && !options.has_retained_extention(fileName); - - if (isDir || notAll || notRetained) { - if (isDir) { - std::cout << "\"" << fileName << "\" is a directory: skipped" << std::endl; - } else if (notAll) { - std::cout << "\"" << fileName << "\" is not one of the file format to process: skipped" << std::endl; - } else if (notRetained) { - std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl; - } - continue; + if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) { + bool notAll = allExtensions && !options.is_parse_extention (argument); + bool notRetained = !allExtensions && !options.has_retained_extention (argument); + if (notAll || notRetained) { + if (notAll) { + std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl; + } else if (notRetained) { + std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl; } - - if (sideProcParams && skipIfNoSidecar) { - // look for the sidecar proc params - if (!Glib::file_test(fileName + paramFileExtension, Glib::FILE_TEST_EXISTS)) { - std::cout << "\"" << fileName << "\" has no side-car file: image skipped" << std::endl; - continue; - } - } - - inputFiles.emplace_back (fileName); + } else { + inputFiles.emplace_back (argument); } - } catch (Glib::Exception&) {} + continue; - continue; + } + + if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) { + + auto dir = Gio::File::create_for_path (argument); + + if (!dir || !dir->query_exists()) { + continue; + } + + try { + + auto enumerator = dir->enumerate_children ("standard::name,standard::type"); + + while (auto file = enumerator->next_file()) { + + const auto fileName = Glib::build_filename (argument, file->get_name()); + bool isDir = file->get_file_type() == Gio::FILE_TYPE_DIRECTORY; + bool notAll = allExtensions && !options.is_parse_extention (fileName); + bool notRetained = !allExtensions && !options.has_retained_extention (fileName); + + if (isDir || notAll || notRetained) { + if (isDir) { + std::cout << "\"" << fileName << "\" is a directory: skipped" << std::endl; + } else if (notAll) { + std::cout << "\"" << fileName << "\" is not one of the file format to process: skipped" << std::endl; + } else if (notRetained) { + std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl; + } + + continue; + + } + + if (sideProcParams && skipIfNoSidecar) { + // look for the sidecar proc params + if (!Glib::file_test (fileName + paramFileExtension, Glib::FILE_TEST_EXISTS)) { + std::cout << "\"" << fileName << "\" has no side-car file: image skipped" << std::endl; + continue; + } + } + + inputFiles.emplace_back (fileName); + } + + } catch (Glib::Exception&) {} + + continue; + } + + std::cerr << "\"" << argument << "\" is neither a regular file nor a directory." << std::endl; } - std::cerr << "\"" << argument << "\" is neither a regular file nor a directory." << std::endl; + break; +#ifdef WIN32 + + case 'w': // This case is handled outside this function + break; +#endif + + case 'h': + case '?': + default: { + Glib::ustring pparamsExt = paramFileExtension.substr (1); + std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; + std::cout << std::endl; + std::cout << " Website: http://www.rawtherapee.com/" << std::endl; + std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; + std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; + std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; + std::cout << std::endl; + std::cout << "Symbols:" << std::endl; + std::cout << " indicate parameters you can change." << std::endl; + std::cout << " [Square brackets] mean the parameter is optional." << std::endl; + std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; + std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; + std::cout << std::endl; + std::cout << "Usage:" << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " -c | Convert files in batch with default parameters." << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " -c | Convert files in batch with your own settings." << std::endl; + std::cout << std::endl; +#ifdef WIN32 + std::cout << " -w Do not open the Windows console" << std::endl; + std::cout << std::endl; +#endif + std::cout << "Options:" << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << "[-o |-O ] [-q] [-a] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] [-f] -c " << std::endl; + std::cout << std::endl; + std::cout << " -c Specify one or more input files or directory." << std::endl; + std::cout << " When specifying directories, Rawtherapee will look for images files that comply with the" << std::endl; + std::cout << " selected extensions (see also '-a')." << std::endl; + std::cout << " -c must be the last option." << std::endl; + std::cout << " -o | Set output file or folder." << std::endl; + std::cout << " Saves output file alongside input file if -o is not specified." << std::endl; + std::cout << " -O | Set output file or folder and copy " << pparamsExt << " file into it." << std::endl; + std::cout << " Saves output file alongside input file if -O is not specified." << std::endl; + std::cout << " -q Quick-start mode. Does not load cached files to speedup start time." << std::endl; + std::cout << " -a Process all supported image file types when specifying a folder, even those" << std::endl; + std::cout << " not currently selected in Preferences > File Browser > Parsed Extensions." << std::endl; + std::cout << " -s Use the existing sidecar file to build the processing parameters," << std::endl; + std::cout << " e.g. for photo.raw there should be a photo.raw." << pparamsExt << " file in the same folder." << std::endl; + std::cout << " If the sidecar file does not exist, neutral values will be used." << std::endl; + std::cout << " -S Like -s but skip if the sidecar file does not exist." << std::endl; + std::cout << " -p Specify processing profile to be used for all conversions." << std::endl; + std::cout << " You can specify as many sets of \"-p \" options as you like," << std::endl; + std::cout << " each will be built on top of the previous one, as explained below." << std::endl; + std::cout << " -d Use the default raw or non-raw processing profile as set in" << std::endl; + std::cout << " Preferences > Image Processing > Default Processing Profile" << std::endl; + std::cout << " -j[1-100] Specify output to be JPEG (default, if -t and -n are not set)." << std::endl; + std::cout << " Optionally, specify compression 1-100 (default value: 92)." << std::endl; + std::cout << " -js<1-3> Specify the JPEG chroma subsampling parameter, where:" << std::endl; + std::cout << " 1 = Best compression: 2x2, 1x1, 1x1 (4:2:0)" << std::endl; + std::cout << " Chroma halved vertically and horizontally." << std::endl; + std::cout << " 2 = Balanced (default): 2x1, 1x1, 1x1 (4:2:2)" << std::endl; + std::cout << " Chroma halved horizontally." << std::endl; + std::cout << " 3 = Best quality: 1x1, 1x1, 1x1 (4:4:4)" << std::endl; + std::cout << " No chroma subsampling." << std::endl; + std::cout << " -b<8|16> Specify bit depth per channel (default value: 16 for TIFF, 8 for PNG)." << std::endl; + std::cout << " Only applies to TIFF and PNG output, JPEG is always 8." << std::endl; + std::cout << " -t[z] Specify output to be TIFF." << std::endl; + std::cout << " Uncompressed by default, or deflate compression with 'z'." << std::endl; + std::cout << " -n Specify output to be compressed PNG." << std::endl; + std::cout << " Compression is hard-coded to 6." << std::endl; + std::cout << " -Y Overwrite output if present." << std::endl; + std::cout << " -f Use the custom fast-export processing pipeline." << std::endl; + std::cout << std::endl; + std::cout << "Your " << pparamsExt << " files can be incomplete, RawTherapee will build the final values as follows:" << std::endl; + std::cout << " 1- A new processing profile is created using neutral values," << std::endl; + std::cout << " 2- If the \"-d\" option is set, the values are overridden by those found in" << std::endl; + std::cout << " the default raw or non-raw processing profile." << std::endl; + std::cout << " 3- If one or more \"-p\" options are set, the values are overridden by those" << std::endl; + std::cout << " found in these processing profiles." << std::endl; + std::cout << " 4- If the \"-s\" or \"-S\" options are set, the values are finally overridden by those" << std::endl; + std::cout << " found in the sidecar files." << std::endl; + std::cout << " The processing profiles are processed in the order specified on the command line." << std::endl; + return -1; } - - break; -#ifdef WIN32 - - case 'w': // This case is handled outside this function - break; -#endif - - case 'h': - case '?': - default: { - Glib::ustring pparamsExt = paramFileExtension.substr(1); - std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; - std::cout << std::endl; - std::cout << " Website: http://www.rawtherapee.com/" << std::endl; - std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; - std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; - std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; - std::cout << std::endl; - std::cout << "Symbols:" << std::endl; - std::cout << " indicate parameters you can change." << std::endl; - std::cout << " [Square brackets] mean the parameter is optional." << std::endl; - std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; - std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; - std::cout << std::endl; - std::cout << "Usage:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with default parameters." << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with your own settings." << std::endl; - std::cout << std::endl; -#ifdef WIN32 - std::cout << " -w Do not open the Windows console" << std::endl; - std::cout << std::endl; -#endif - std::cout << "Options:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << "[-o |-O ] [-q] [-a] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] [-f] -c " << std::endl; - std::cout << std::endl; - std::cout << " -c Specify one or more input files or directory." << std::endl; - std::cout << " When specifying directories, Rawtherapee will look for images files that comply with the" << std::endl; - std::cout << " selected extensions (see also '-a')." << std::endl; - std::cout << " -c must be the last option." << std::endl; - std::cout << " -o | Set output file or folder." << std::endl; - std::cout << " Saves output file alongside input file if -o is not specified." << std::endl; - std::cout << " -O | Set output file or folder and copy " << pparamsExt << " file into it." << std::endl; - std::cout << " Saves output file alongside input file if -O is not specified." << std::endl; - std::cout << " -q Quick-start mode. Does not load cached files to speedup start time." << std::endl; - std::cout << " -a Process all supported image file types when specifying a folder, even those" << std::endl; - std::cout << " not currently selected in Preferences > File Browser > Parsed Extensions." << std::endl; - std::cout << " -s Use the existing sidecar file to build the processing parameters," << std::endl; - std::cout << " e.g. for photo.raw there should be a photo.raw." << pparamsExt << " file in the same folder." << std::endl; - std::cout << " If the sidecar file does not exist, neutral values will be used." << std::endl; - std::cout << " -S Like -s but skip if the sidecar file does not exist." << std::endl; - std::cout << " -p Specify processing profile to be used for all conversions." << std::endl; - std::cout << " You can specify as many sets of \"-p \" options as you like," << std::endl; - std::cout << " each will be built on top of the previous one, as explained below." << std::endl; - std::cout << " -d Use the default raw or non-raw processing profile as set in" << std::endl; - std::cout << " Preferences > Image Processing > Default Processing Profile" << std::endl; - std::cout << " -j[1-100] Specify output to be JPEG (default, if -t and -n are not set)." << std::endl; - std::cout << " Optionally, specify compression 1-100 (default value: 92)." << std::endl; - std::cout << " -js<1-3> Specify the JPEG chroma subsampling parameter, where:" << std::endl; - std::cout << " 1 = Best compression: 2x2, 1x1, 1x1 (4:2:0)" << std::endl; - std::cout << " Chroma halved vertically and horizontally." << std::endl; - std::cout << " 2 = Balanced (default): 2x1, 1x1, 1x1 (4:2:2)" << std::endl; - std::cout << " Chroma halved horizontally." << std::endl; - std::cout << " 3 = Best quality: 1x1, 1x1, 1x1 (4:4:4)" << std::endl; - std::cout << " No chroma subsampling." << std::endl; - std::cout << " -b<8|16> Specify bit depth per channel (default value: 16 for TIFF, 8 for PNG)." << std::endl; - std::cout << " Only applies to TIFF and PNG output, JPEG is always 8." << std::endl; - std::cout << " -t[z] Specify output to be TIFF." << std::endl; - std::cout << " Uncompressed by default, or deflate compression with 'z'." << std::endl; - std::cout << " -n Specify output to be compressed PNG." << std::endl; - std::cout << " Compression is hard-coded to 6." << std::endl; - std::cout << " -Y Overwrite output if present." << std::endl; - std::cout << " -f Use the custom fast-export processing pipeline." << std::endl; - std::cout << std::endl; - std::cout << "Your " << pparamsExt << " files can be incomplete, RawTherapee will build the final values as follows:" << std::endl; - std::cout << " 1- A new processing profile is created using neutral values," << std::endl; - std::cout << " 2- If the \"-d\" option is set, the values are overridden by those found in" << std::endl; - std::cout << " the default raw or non-raw processing profile." << std::endl; - std::cout << " 3- If one or more \"-p\" options are set, the values are overridden by those" << std::endl; - std::cout << " found in these processing profiles." << std::endl; - std::cout << " 4- If the \"-s\" or \"-S\" options are set, the values are finally overridden by those" << std::endl; - std::cout << " found in the sidecar files." << std::endl; - std::cout << " The processing profiles are processed in the order specified on the command line." << std::endl; - return -1; - } } } else { - argv1 = Glib::ustring(fname_to_utf8(argv[iArg])); + argv1 = Glib::ustring (fname_to_utf8 (argv[iArg])); #if ECLIPSE_ARGS - argv1 = argv1.substr(1, argv1.length()-2); + argv1 = argv1.substr (1, argv1.length() - 2); #endif - if( outputDirectory ) { + if ( outputDirectory ) { options.savePathFolder = outputPath; options.saveUsePathTemplate = false; } else { @@ -641,41 +651,41 @@ int processLineParams( int argc, char **argv ) } } - if( !argv1.empty() ) { + if ( !argv1.empty() ) { return 1; } - if( inputFiles.empty() ) { + if ( inputFiles.empty() ) { return 2; } if (useDefault) { - rawParams = new rtengine::procparams::PartialProfile(true, true); - Glib::ustring profPath = options.findProfilePath(options.defProfRaw); + rawParams = new rtengine::procparams::PartialProfile (true, true); + Glib::ustring profPath = options.findProfilePath (options.defProfRaw); - if (options.is_defProfRawMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && rawParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, Glib::path_get_basename(options.defProfRaw) + paramFileExtension)))) { + if (options.is_defProfRawMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && rawParams->load (profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename (profPath, Glib::path_get_basename (options.defProfRaw) + paramFileExtension)))) { std::cerr << "Error: default raw processing profile not found" << std::endl; rawParams->deleteInstance(); delete rawParams; - deleteProcParams(processingParams); + deleteProcParams (processingParams); return -3; } - imgParams = new rtengine::procparams::PartialProfile(true); - profPath = options.findProfilePath(options.defProfImg); + imgParams = new rtengine::procparams::PartialProfile (true); + profPath = options.findProfilePath (options.defProfImg); - if (options.is_defProfImgMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && imgParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, Glib::path_get_basename(options.defProfImg) + paramFileExtension)))) { + if (options.is_defProfImgMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && imgParams->load (profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename (profPath, Glib::path_get_basename (options.defProfImg) + paramFileExtension)))) { std::cerr << "Error: default non-raw processing profile not found" << std::endl; imgParams->deleteInstance(); delete imgParams; rawParams->deleteInstance(); delete rawParams; - deleteProcParams(processingParams); + deleteProcParams (processingParams); return -3; } } - for( size_t iFile = 0; iFile < inputFiles.size(); iFile++) { + for ( size_t iFile = 0; iFile < inputFiles.size(); iFile++) { // Has to be reinstanciated at each profile to have a ProcParams object with default values rtengine::procparams::ProcParams currentParams; @@ -690,34 +700,34 @@ int processLineParams( int argc, char **argv ) Glib::ustring outputFile; - if( outputType.empty() ) { + if ( outputType.empty() ) { outputType = "jpg"; } - if( outputPath.empty() ) { + if ( outputPath.empty() ) { Glib::ustring s = inputFile; - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = s.substr(0, ext) + "." + outputType; - } else if( outputDirectory ) { - Glib::ustring s = Glib::path_get_basename( inputFile ); - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = Glib::build_filename(outputPath, s.substr(0, ext) + "." + outputType); + Glib::ustring::size_type ext = s.find_last_of ('.'); + outputFile = s.substr (0, ext) + "." + outputType; + } else if ( outputDirectory ) { + Glib::ustring s = Glib::path_get_basename ( inputFile ); + Glib::ustring::size_type ext = s.find_last_of ('.'); + outputFile = Glib::build_filename (outputPath, s.substr (0, ext) + "." + outputType); } else { if (leaveUntouched) { outputFile = outputPath; } else { Glib::ustring s = outputPath; - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = s.substr(0, ext) + "." + outputType; + Glib::ustring::size_type ext = s.find_last_of ('.'); + outputFile = s.substr (0, ext) + "." + outputType; } } - if( inputFile == outputFile) { + if ( inputFile == outputFile) { std::cerr << "Cannot overwrite: " << inputFile << std::endl; continue; } - if( !overwriteFiles && Glib::file_test( outputFile , Glib::FILE_TEST_EXISTS ) ) { + if ( !overwriteFiles && Glib::file_test ( outputFile, Glib::FILE_TEST_EXISTS ) ) { std::cerr << outputFile << " already exists: use -Y option to overwrite. This image has been skipped." << std::endl; continue; } @@ -743,18 +753,20 @@ int processLineParams( int argc, char **argv ) if (options.defProfRaw == DEFPROFILE_DYNAMIC) { rawParams->deleteInstance(); delete rawParams; - rawParams = ProfileStore::getInstance()->loadDynamicProfile(ii->getMetaData()); + rawParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData()); } + std::cout << " Merging default raw processing profile" << std::endl; - rawParams->applyTo(¤tParams); - } else { + rawParams->applyTo (¤tParams); + } else { if (options.defProfImg == DEFPROFILE_DYNAMIC) { imgParams->deleteInstance(); delete imgParams; - imgParams = ProfileStore::getInstance()->loadDynamicProfile(ii->getMetaData()); + imgParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData()); } + std::cout << " Merging default non-raw processing profile" << std::endl; - imgParams->applyTo(¤tParams); + imgParams->applyTo (¤tParams); } } @@ -768,7 +780,7 @@ int processLineParams( int argc, char **argv ) Glib::ustring sideProcessingParams = inputFile + paramFileExtension; // the "load" method don't reset the procparams values anymore, so values found in the procparam file override the one of currentParams - if( !Glib::file_test( sideProcessingParams, Glib::FILE_TEST_EXISTS ) || currentParams.load ( sideProcessingParams )) { + if ( !Glib::file_test ( sideProcessingParams, Glib::FILE_TEST_EXISTS ) || currentParams.load ( sideProcessingParams )) { std::cerr << "Warning: sidecar file requested but not found for: " << sideProcessingParams << std::endl; } else { sideCarFound = true; @@ -776,15 +788,15 @@ int processLineParams( int argc, char **argv ) } } - if( processingParams.size() > i ) { + if ( processingParams.size() > i ) { std::cout << " Merging procparams #" << i << std::endl; - processingParams[i]->applyTo(¤tParams); + processingParams[i]->applyTo (¤tParams); } i++; } while (i < processingParams.size() + (sideProcParams ? 1 : 0)); - if( sideProcParams && !sideCarFound && skipIfNoSidecar ) { + if ( sideProcParams && !sideCarFound && skipIfNoSidecar ) { delete ii; errors++; std::cerr << "Error: no sidecar procparams found for: " << inputFile << std::endl; @@ -793,7 +805,7 @@ int processLineParams( int argc, char **argv ) job = rtengine::ProcessingJob::create (ii, currentParams, fast_export); - if( !job ) { + if ( !job ) { errors++; std::cerr << "Error creating processing for: " << inputFile << std::endl; ii->decreaseRef(); @@ -803,31 +815,31 @@ int processLineParams( int argc, char **argv ) // Process image rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData); - if( !resultImage ) { + if ( !resultImage ) { errors++; std::cerr << "Error processing: " << inputFile << std::endl; - rtengine::ProcessingJob::destroy( job ); + rtengine::ProcessingJob::destroy ( job ); continue; } // save image to disk - if( outputType == "jpg" ) { - errorCode = resultImage->saveAsJPEG( outputFile, compression, subsampling ); - } else if( outputType == "tif" ) { - errorCode = resultImage->saveAsTIFF( outputFile, bits, compression == 0 ); - } else if( outputType == "png" ) { - errorCode = resultImage->saveAsPNG( outputFile, compression, bits ); + if ( outputType == "jpg" ) { + errorCode = resultImage->saveAsJPEG ( outputFile, compression, subsampling ); + } else if ( outputType == "tif" ) { + errorCode = resultImage->saveAsTIFF ( outputFile, bits, compression == 0 ); + } else if ( outputType == "png" ) { + errorCode = resultImage->saveAsPNG ( outputFile, compression, bits ); } else { errorCode = resultImage->saveToFile (outputFile); } - if(errorCode) { + if (errorCode) { errors++; std::cerr << "Error saving to: " << outputFile << std::endl; } else { - if( copyParamsFile ) { + if ( copyParamsFile ) { Glib::ustring outputProcessingParams = outputFile + paramFileExtension; - currentParams.save( outputProcessingParams ); + currentParams.save ( outputProcessingParams ); } } @@ -845,7 +857,7 @@ int processLineParams( int argc, char **argv ) delete rawParams; } - deleteProcParams(processingParams); + deleteProcParams (processingParams); return errors > 0 ? -2 : 0; } diff --git a/rtgui/main.cc b/rtgui/main.cc index 1e329c284..1f952fb2a 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -118,83 +118,89 @@ static void myGdkLockLeave() * -1 if there is an error in parameters * -2 if an error occurred during processing * -3 if at least one required procparam file was not found */ -int processLineParams( int argc, char **argv ) +int processLineParams ( int argc, char **argv ) { - for( int iArg = 1; iArg < argc; iArg++) { - Glib::ustring currParam(argv[iArg]); + for ( int iArg = 1; iArg < argc; iArg++) { + Glib::ustring currParam (argv[iArg]); #if ECLIPSE_ARGS - currParam = currParam.substr(1, currParam.length()-2); + currParam = currParam.substr (1, currParam.length() - 2); #endif - if( currParam.at(0) == '-' ) { - switch( currParam.at(1) ) { + + if ( currParam.at (0) == '-' ) { + switch ( currParam.at (1) ) { #ifdef WIN32 - case 'w': // This case is handled outside this function - break; + case 'w': // This case is handled outside this function + break; #endif - case 'v': - return 0; + + case 'v': + return 0; #ifndef __APPLE__ // TODO agriggio - there seems to be already some "single instance app" support for OSX in rtwindow. Disabling it here until I understand how to merge the two - case 'R': - if (!gimpPlugin) { - remote = true; - } - break; -#endif - - case 'g': - if (currParam == "-gimp") { - gimpPlugin = true; - simpleEditor = true; - remote = false; + + case 'R': + if (!gimpPlugin) { + remote = true; + } + break; - } +#endif + + case 'g': + if (currParam == "-gimp") { + gimpPlugin = true; + simpleEditor = true; + remote = false; + break; + } + // no break here on purpose - case 'h': - case '?': - default: { - Glib::ustring pparamsExt = paramFileExtension.substr(1); - std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; - std::cout << std::endl; - std::cout << " Website: http://www.rawtherapee.com/" << std::endl; - std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; - std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; - std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; - std::cout << std::endl; - std::cout << "Symbols:" << std::endl; - std::cout << " indicate parameters you can change." << std::endl; - //std::cout << " [Square brackets] mean the parameter is optional." << std::endl; - //std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; - //std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; - std::cout << std::endl; - std::cout << "Usage:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " Start File Browser inside folder." << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " Start Image Editor with file." << std::endl; - std::cout << std::endl; - std::cout << "Options:" << std::endl; + case 'h': + case '?': + default: { + Glib::ustring pparamsExt = paramFileExtension.substr (1); + std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; + std::cout << std::endl; + std::cout << " Website: http://www.rawtherapee.com/" << std::endl; + std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; + std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; + std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; + std::cout << std::endl; + std::cout << "Symbols:" << std::endl; + std::cout << " indicate parameters you can change." << std::endl; + //std::cout << " [Square brackets] mean the parameter is optional." << std::endl; + //std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; + //std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; + std::cout << std::endl; + std::cout << "Usage:" << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " Start File Browser inside folder." << std::endl; + std::cout << " " << Glib::path_get_basename (argv[0]) << " Start Image Editor with file." << std::endl; + std::cout << std::endl; + std::cout << "Options:" << std::endl; #ifdef WIN32 - std::cout << " -w Do not open the Windows console" << std::endl; + std::cout << " -w Do not open the Windows console" << std::endl; #endif - std::cout << " -v Print RawTherapee version number and exit" << std::endl; + std::cout << " -v Print RawTherapee version number and exit" << std::endl; #ifndef __APPLE__ - std::cout << " -R Raise an already running RawTherapee instance (if available)" << std::endl; + std::cout << " -R Raise an already running RawTherapee instance (if available)" << std::endl; #endif - std::cout << " -h -? Display this help message" << std::endl; - return -1; - } + std::cout << " -h -? Display this help message" << std::endl; + return -1; + } } } else { if (argv1.empty()) { - argv1 = Glib::ustring(fname_to_utf8(argv[iArg])); + argv1 = Glib::ustring (fname_to_utf8 (argv[iArg])); #if ECLIPSE_ARGS - argv1 = argv1.substr(1, argv1.length()-2); + argv1 = argv1.substr (1, argv1.length() - 2); #endif } else if (gimpPlugin) { - argv2 = Glib::ustring(fname_to_utf8(argv[iArg])); + argv2 = Glib::ustring (fname_to_utf8 (argv[iArg])); break; } + if (!gimpPlugin) { break; } @@ -217,15 +223,15 @@ bool init_rt() extProgStore->init(); SoundManager::init(); - if( !options.rtSettings.verbose ) { - TIFFSetWarningHandler(nullptr); // avoid annoying message boxes + if ( !options.rtSettings.verbose ) { + TIFFSetWarningHandler (nullptr); // avoid annoying message boxes } #ifndef WIN32 // Move the old path to the new one if the new does not exist - if (Glib::file_test(Glib::build_filename(options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { - g_rename(Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); + if (Glib::file_test (Glib::build_filename (options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test (options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { + g_rename (Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); } #endif @@ -242,11 +248,11 @@ void cleanup_rt() RTWindow *create_rt_window() { - Glib::ustring icon_path = Glib::build_filename(argv0, "images"); + Glib::ustring icon_path = Glib::build_filename (argv0, "images"); Glib::RefPtr defaultIconTheme = Gtk::IconTheme::get_default(); - defaultIconTheme->append_search_path(icon_path); + defaultIconTheme->append_search_path (icon_path); - rtengine::setPaths(options); + rtengine::setPaths (options); MyExpander::init(); // has to stay AFTER rtengine::setPaths // ------- loading theme files @@ -254,30 +260,34 @@ RTWindow *create_rt_window() Glib::RefPtr screen = Gdk::Screen::get_default(); if (screen) { - Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita"; - Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true; + Gtk::Settings::get_for_screen (screen)->property_gtk_theme_name() = "Adwaita"; + Gtk::Settings::get_for_screen (screen)->property_gtk_application_prefer_dark_theme() = true; - Glib::RefPtr regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); - Glib::ustring filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); - if (!regex->match(options.theme + ".css") || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { + Glib::RefPtr regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); + Glib::ustring filename = Glib::build_filename (argv0, "themes", options.theme + ".css"); + + if (!regex->match (options.theme + ".css") || !Glib::file_test (filename, Glib::FILE_TEST_EXISTS)) { options.theme = "RawTherapee-GTK"; + // We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only if (GTK_MINOR_VERSION < 20) { options.theme = options.theme + "3-_19"; } else { options.theme = options.theme + "3-20_"; } - filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); + + filename = Glib::build_filename (argv0, "themes", options.theme + ".css"); } + cssRT = Gtk::CssProvider::create(); try { cssRT->load_from_path (filename); - Gtk::StyleContext::add_provider_for_screen(screen, cssRT, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + Gtk::StyleContext::add_provider_for_screen (screen, cssRT, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); } catch (Glib::Error &err) { - printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); + printf ("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); } catch (...) { - printf("Error: Can't load css file \"%s\"\n", filename.c_str()); + printf ("Error: Can't load css file \"%s\"\n", filename.c_str()); } // Set the font face and size @@ -286,23 +296,23 @@ RTWindow *create_rt_window() cssForced = Gtk::CssProvider::create(); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - cssForced->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2px }", options.fontFamily, options.fontSize)); + cssForced->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2px }", options.fontFamily, options.fontSize)); #else - cssForced->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2pt }", options.fontFamily, options.fontSize)); + cssForced->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2pt }", options.fontFamily, options.fontSize)); #endif //GTK318 - Gtk::StyleContext::add_provider_for_screen(screen, cssForced, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + Gtk::StyleContext::add_provider_for_screen (screen, cssForced, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); } catch (Glib::Error &err) { - printf("Error: \"%s\"\n", err.what().c_str()); + printf ("Error: \"%s\"\n", err.what().c_str()); } catch (...) { - printf("Error: Can't find the font named \"%s\"\n", options.fontFamily.c_str()); + printf ("Error: Can't find the font named \"%s\"\n", options.fontFamily.c_str()); } } } #ifndef NDEBUG else if (!screen) { - printf("ERROR: Can't get default screen!\n"); + printf ("ERROR: Can't get default screen!\n"); } #endif @@ -314,12 +324,12 @@ RTWindow *create_rt_window() // alerting users if the default raw and image profiles are missing if (options.is_defProfRawMissing()) { - Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFRAW_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + Gtk::MessageDialog msgd (Glib::ustring::compose (M ("OPTIONS_DEFRAW_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); } if (options.is_defProfImgMissing()) { - Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + Gtk::MessageDialog msgd (Glib::ustring::compose (M ("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); } @@ -327,12 +337,13 @@ RTWindow *create_rt_window() } -class RTApplication: public Gtk::Application { +class RTApplication: public Gtk::Application +{ public: RTApplication(): - Gtk::Application("com.rawtherapee.application", - Gio::APPLICATION_HANDLES_OPEN), - rtWindow(nullptr) + Gtk::Application ("com.rawtherapee.application", + Gio::APPLICATION_HANDLES_OPEN), + rtWindow (nullptr) { } @@ -341,6 +352,7 @@ public: if (rtWindow) { delete rtWindow; } + cleanup_rt(); } @@ -350,19 +362,19 @@ private: if (rtWindow) { return true; } - + if (!init_rt()) { Gtk::MessageDialog msgd ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); - add_window(msgd); + add_window (msgd); msgd.run (); return false; } else { rtWindow = create_rt_window(); - add_window(*rtWindow); + add_window (*rtWindow); return true; } } - + // Override default signal handlers: void on_activate() override { @@ -370,9 +382,9 @@ private: rtWindow->present(); } } - - void on_open(const Gio::Application::type_vec_files& files, - const Glib::ustring& hint) override + + void on_open (const Gio::Application::type_vec_files& files, + const Glib::ustring& hint) override { if (create_window()) { struct Data { @@ -382,29 +394,30 @@ private: }; Data *d = new Data; d->filecatalog = rtWindow->fpanel->fileCatalog; - + for (const auto &f : files) { - Thumbnail *thm = cacheMgr->getEntry(f->get_path()); + Thumbnail *thm = cacheMgr->getEntry (f->get_path()); + if (thm) { - d->entries.push_back(thm); + d->entries.push_back (thm); d->lastfilename = f->get_path(); } } - + if (!d->entries.empty()) { const auto doit = - [](gpointer data) -> gboolean - { - Data *d = static_cast(data); - d->filecatalog->openRequested(d->entries); - d->filecatalog->selectImage(d->lastfilename, true); - delete d; - return FALSE; - }; - gdk_threads_add_idle(doit, d); + [] (gpointer data) -> gboolean { + Data *d = static_cast (data); + d->filecatalog->openRequested (d->entries); + d->filecatalog->selectImage (d->lastfilename, true); + delete d; + return FALSE; + }; + gdk_threads_add_idle (doit, d); } else { delete d; } + rtWindow->present(); } } @@ -416,10 +429,10 @@ private: } // namespace -int main(int argc, char **argv) +int main (int argc, char **argv) { - setlocale(LC_ALL, ""); - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_ALL, ""); + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." simpleEditor = false; gimpPlugin = false; @@ -429,7 +442,7 @@ int main(int argc, char **argv) argv2 = ""; Glib::init(); // called by Gtk::Main, but this may be important for thread handling, so we call it ourselves now - gdk_threads_set_lock_functions(G_CALLBACK(myGdkLockEnter), (G_CALLBACK(myGdkLockLeave))); + gdk_threads_set_lock_functions (G_CALLBACK (myGdkLockEnter), (G_CALLBACK (myGdkLockLeave))); gdk_threads_init(); gtk_init (&argc, &argv); // use the "--g-fatal-warnings" command line flag to make warnings fatal Gio::init (); @@ -442,33 +455,33 @@ int main(int argc, char **argv) #ifdef WIN32 WCHAR exnameU[512] = {0}; GetModuleFileNameW (NULL, exnameU, 511); - WideCharToMultiByte(CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); + WideCharToMultiByte (CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); #else - if (readlink("/proc/self/exe", exname, 511) < 0) { - strncpy(exname, argv[0], 511); + if (readlink ("/proc/self/exe", exname, 511) < 0) { + strncpy (exname, argv[0], 511); } #endif - exePath = Glib::path_get_dirname(exname); + exePath = Glib::path_get_dirname (exname); // set paths - if (Glib::path_is_absolute(DATA_SEARCH_PATH)) { + if (Glib::path_is_absolute (DATA_SEARCH_PATH)) { argv0 = DATA_SEARCH_PATH; } else { - argv0 = Glib::build_filename(exePath, DATA_SEARCH_PATH); + argv0 = Glib::build_filename (exePath, DATA_SEARCH_PATH); } - if (Glib::path_is_absolute(CREDITS_SEARCH_PATH)) { + if (Glib::path_is_absolute (CREDITS_SEARCH_PATH)) { creditsPath = CREDITS_SEARCH_PATH; } else { - creditsPath = Glib::build_filename(exePath, CREDITS_SEARCH_PATH); + creditsPath = Glib::build_filename (exePath, CREDITS_SEARCH_PATH); } - if (Glib::path_is_absolute(LICENCE_SEARCH_PATH)) { + if (Glib::path_is_absolute (LICENCE_SEARCH_PATH)) { licensePath = LICENCE_SEARCH_PATH; } else { - licensePath = Glib::build_filename(exePath, LICENCE_SEARCH_PATH); + licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH); } #else @@ -476,60 +489,61 @@ int main(int argc, char **argv) creditsPath = CREDITS_SEARCH_PATH; licensePath = LICENCE_SEARCH_PATH; #endif - - + + #ifdef WIN32 bool consoleOpened = false; // suppression of annoying error boxes - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + + if (argc > 1) { + int ret = processLineParams ( argc, argv); - if(argc > 1) { - int ret = processLineParams( argc, argv); if (options.rtSettings.verbose || (!remote && !Glib::file_test (argv1, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR))) { - bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001); - bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001); + bool stdoutRedirectedtoFile = (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0001); + bool stderrRedirectedtoFile = (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) == 0x0001); // no console, if stdout and stderr both are redirected to file - if( !(stdoutRedirectedtoFile && stderrRedirectedtoFile)) { + if ( ! (stdoutRedirectedtoFile && stderrRedirectedtoFile)) { // check if parameter -w was passed. // We have to do that in this step, because it controls whether to open a console to show the output of following steps bool Console = true; - for(int i = 1; i < argc; i++) - if(!strcmp(argv[i], "-w")) { + for (int i = 1; i < argc; i++) + if (!strcmp (argv[i], "-w")) { Console = false; break; } - if(Console && AllocConsole()) { - AttachConsole( GetCurrentProcessId() ) ; + if (Console && AllocConsole()) { + AttachConsole ( GetCurrentProcessId() ) ; // Don't allow CTRL-C in console to terminate RT - SetConsoleCtrlHandler( NULL, true ); + SetConsoleCtrlHandler ( NULL, true ); // Set title of console char consoletitle[128]; - sprintf(consoletitle, "RawTherapee %s Console", RTVERSION); - SetConsoleTitle(consoletitle); + sprintf (consoletitle, "RawTherapee %s Console", RTVERSION); + SetConsoleTitle (consoletitle); // increase size of screen buffer COORD c; c.X = 200; c.Y = 1000; - SetConsoleScreenBufferSize( GetStdHandle( STD_OUTPUT_HANDLE ), c ); + SetConsoleScreenBufferSize ( GetStdHandle ( STD_OUTPUT_HANDLE ), c ); // Disable console-Cursor CONSOLE_CURSOR_INFO cursorInfo; cursorInfo.dwSize = 100; cursorInfo.bVisible = false; - SetConsoleCursorInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &cursorInfo ); + SetConsoleCursorInfo ( GetStdHandle ( STD_OUTPUT_HANDLE ), &cursorInfo ); - if(!stdoutRedirectedtoFile) { - freopen( "CON", "w", stdout ) ; + if (!stdoutRedirectedtoFile) { + freopen ( "CON", "w", stdout ) ; } - if(!stderrRedirectedtoFile) { - freopen( "CON", "w", stderr ) ; + if (!stderrRedirectedtoFile) { + freopen ( "CON", "w", stderr ) ; } - freopen( "CON", "r", stdin ) ; + freopen ( "CON", "r", stdin ) ; consoleOpened = true; @@ -540,10 +554,10 @@ int main(int argc, char **argv) } } - if( ret <= 0 ) { - if(consoleOpened) { - printf("Press any key to exit RawTherapee\n"); - FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + if ( ret <= 0 ) { + if (consoleOpened) { + printf ("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); getch(); } @@ -561,9 +575,9 @@ int main(int argc, char **argv) #endif if (argc > 1) { - int ret = processLineParams( argc, argv); + int ret = processLineParams ( argc, argv); - if( ret <= 0 ) { + if ( ret <= 0 ) { return ret; } } @@ -572,51 +586,56 @@ int main(int argc, char **argv) #endif if (gimpPlugin) { - if (!Glib::file_test(argv1, Glib::FILE_TEST_EXISTS) || Glib::file_test(argv1, Glib::FILE_TEST_IS_DIR)) { - printf("Error: argv1 doesn't exist\n"); + if (!Glib::file_test (argv1, Glib::FILE_TEST_EXISTS) || Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR)) { + printf ("Error: argv1 doesn't exist\n"); return 1; } + if (argv2.empty()) { - printf("Error: -gimp requires two arguments\n"); + printf ("Error: -gimp requires two arguments\n"); return 1; } - } else if (!remote && Glib::file_test(argv1, Glib::FILE_TEST_EXISTS)) { + } else if (!remote && Glib::file_test (argv1, Glib::FILE_TEST_EXISTS)) { simpleEditor = true; } int ret = 0; + if (remote) { - char *app_argv[2] = { const_cast(argv0.c_str()) }; + char *app_argv[2] = { const_cast (argv0.c_str()) }; int app_argc = 1; + if (!argv1.empty()) { app_argc = 2; - app_argv[1] = const_cast(argv1.c_str()); + app_argv[1] = const_cast (argv1.c_str()); } + RTApplication app; - ret = app.run(app_argc, app_argv); + ret = app.run (app_argc, app_argv); } else { if (init_rt()) { - Gtk::Main m(&argc, &argv); + Gtk::Main m (&argc, &argv); gdk_threads_enter(); - const std::unique_ptr rtWindow(create_rt_window()); - m.run(*rtWindow); + const std::unique_ptr rtWindow (create_rt_window()); + m.run (*rtWindow); gdk_threads_leave(); if (gimpPlugin && - rtWindow->epanel && rtWindow->epanel->isRealized()) { + rtWindow->epanel && rtWindow->epanel->isRealized()) { SaveFormat sf; sf.format = "tif"; sf.tiffBits = 16; sf.tiffUncompressed = true; sf.saveParams = true; - - if (!rtWindow->epanel->saveImmediately(argv2, sf)) { + + if (!rtWindow->epanel->saveImmediately (argv2, sf)) { ret = -2; } } + cleanup_rt(); } else { - Gtk::Main m(&argc, &argv); + Gtk::Main m (&argc, &argv); Gtk::MessageDialog msgd ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); ret = -2; @@ -626,8 +645,8 @@ int main(int argc, char **argv) #ifdef WIN32 if (consoleOpened) { - printf("Press any key to exit RawTherapee\n"); - FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + printf ("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE)); getch(); } diff --git a/rtgui/options.cc b/rtgui/options.cc index 39d633e90..fdfa209dc 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -750,8 +750,8 @@ void Options::readFromFile (Glib::ustring fname) Glib::KeyFile keyFile; if ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { - Glib::ustring msg = Glib::ustring::compose("Options file %1 does not exist", fname); - throw Error(msg); + Glib::ustring msg = Glib::ustring::compose ("Options file %1 does not exist", fname); + throw Error (msg); } try { @@ -1831,6 +1831,7 @@ void Options::readFromFile (Glib::ustring fname) if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) { fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" ); } + if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) { fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" ); } @@ -1863,17 +1864,21 @@ void Options::readFromFile (Glib::ustring fname) } } catch (Glib::Error &err) { - Glib::ustring msg = Glib::ustring::compose("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what()); - if (options.rtSettings.verbose) { - printf("%s\n", msg.c_str()); - } - throw Error(msg); - } catch (...) { - Glib::ustring msg = Glib::ustring::compose("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname); + Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what()); + if (options.rtSettings.verbose) { printf ("%s\n", msg.c_str()); } - throw Error(msg); + + throw Error (msg); + } catch (...) { + Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname); + + if (options.rtSettings.verbose) { + printf ("%s\n", msg.c_str()); + } + + throw Error (msg); } } @@ -2223,15 +2228,15 @@ void Options::saveToFile (Glib::ustring fname) keyData = keyFile.to_data (); } catch (Glib::KeyFileError &e) { - throw Error(e.what()); + throw Error (e.what()); } FILE *f = g_fopen (fname.c_str (), "wt"); if (f == nullptr) { std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl; - Glib::ustring msg_ = Glib::ustring::compose(M("MAIN_MSG_WRITEFAILED"), fname.c_str()); - throw Error(msg_); + Glib::ustring msg_ = Glib::ustring::compose (M ("MAIN_MSG_WRITEFAILED"), fname.c_str()); + throw Error (msg_); } else { fprintf (f, "%s", keyData.c_str ()); fclose (f); @@ -2252,8 +2257,8 @@ void Options::load (bool lightweight) rtdir = Glib::ustring (path); if (!Glib::path_is_absolute (rtdir)) { - Glib::ustring msg = Glib::ustring::compose("Settings path %1 is not absolute", rtdir); - throw Error(msg); + Glib::ustring msg = Glib::ustring::compose ("Settings path %1 is not absolute", rtdir); + throw Error (msg); } } else { #ifdef WIN32 @@ -2291,8 +2296,8 @@ void Options::load (bool lightweight) cacheBaseDir = Glib::ustring (path); if (!Glib::path_is_absolute (cacheBaseDir)) { - Glib::ustring msg = Glib::ustring::compose("Cache base dir %1 is not absolute", cacheBaseDir); - throw Error(msg); + Glib::ustring msg = Glib::ustring::compose ("Cache base dir %1 is not absolute", cacheBaseDir); + throw Error (msg); } } // No environment variable provided, so falling back to the multi user mode, is enabled diff --git a/rtgui/options.h b/rtgui/options.h index 0b5882df0..320f75ee1 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -43,17 +43,16 @@ // Special name for the Dynamic profile #define DEFPROFILE_DYNAMIC "Dynamic" -struct SaveFormat -{ +struct SaveFormat { SaveFormat() : - format("jpg"), - pngBits(8), - pngCompression(6), - jpegQuality(90), - jpegSubSamp(2), - tiffBits(8), - tiffUncompressed(true), - saveParams(true) + format ("jpg"), + pngBits (8), + pngCompression (6), + jpegQuality (90), + jpegSubSamp (2), + tiffBits (8), + tiffUncompressed (true), + saveParams (true) { } @@ -75,11 +74,18 @@ enum prevdemo_t {PD_Sidecar = 1, PD_Fast = 0}; class Options { public: - class Error: public std::exception { + class Error: public std::exception + { public: - Error(const Glib::ustring &msg): msg_(msg) {} - const char *what() const throw() { return msg_.c_str(); } - const Glib::ustring &get_msg() const throw() { return msg_; } + Error (const Glib::ustring &msg): msg_ (msg) {} + const char *what() const throw() + { + return msg_.c_str(); + } + const Glib::ustring &get_msg() const throw() + { + return msg_; + } private: Glib::ustring msg_; @@ -90,8 +96,8 @@ private: bool defProfImgMissing; Glib::ustring userProfilePath; Glib::ustring globalProfilePath; - bool checkProfilePath(Glib::ustring &path); - bool checkDirPath(Glib::ustring &path, Glib::ustring errString); + bool checkProfilePath (Glib::ustring &path); + bool checkDirPath (Glib::ustring &path, Glib::ustring errString); void updatePaths(); int getString (const char* src, char* dst); void error (int line); @@ -106,8 +112,8 @@ private: * @param destination destination variable to store to * @return @c true if @p destination was changed */ - bool safeDirGet(const Glib::KeyFile& keyFile, const Glib::ustring& section, - const Glib::ustring& entryName, Glib::ustring& destination); + bool safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section, + const Glib::ustring& entryName, Glib::ustring& destination); public: @@ -336,9 +342,9 @@ public: Options* copyFrom (Options* other); void filterOutParsedExtensions (); void setDefaults (); - void readFromFile(Glib::ustring fname); - void saveToFile(Glib::ustring fname); - static void load(bool lightweight = false); + void readFromFile (Glib::ustring fname); + void saveToFile (Glib::ustring fname); + static void load (bool lightweight = false); static void save(); // if multiUser=false, send back the global profile path @@ -351,10 +357,10 @@ public: { return globalProfilePath; } - Glib::ustring findProfilePath(Glib::ustring &profName); + Glib::ustring findProfilePath (Glib::ustring &profName); bool is_parse_extention (Glib::ustring fname); bool has_retained_extention (Glib::ustring fname); - bool is_extention_enabled(Glib::ustring ext); + bool is_extention_enabled (Glib::ustring ext); bool is_defProfRawMissing() { return defProfRawMissing; @@ -363,11 +369,11 @@ public: { return defProfImgMissing; } - void setDefProfRawMissing(bool value) + void setDefProfRawMissing (bool value) { defProfRawMissing = value; } - void setDefProfImgMissing(bool value) + void setDefProfImgMissing (bool value) { defProfImgMissing = value; } diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index d9e016ae9..82b90dfb9 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -37,7 +37,7 @@ Glib::RefPtr themecss; Glib::RefPtr fontcss; Preferences::Preferences (RTWindow *rtwindow) - : Gtk::Dialog (M("MAIN_BUTTON_PREFERENCES"), *rtwindow, true) + : Gtk::Dialog (M ("MAIN_BUTTON_PREFERENCES"), *rtwindow, true) , splash (nullptr) , rprofiles (nullptr) , iprofiles (nullptr) @@ -45,7 +45,7 @@ Preferences::Preferences (RTWindow *rtwindow) , newFont (false) , newCPFont (false) { - regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); + regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); moptions.copyFrom (&options); @@ -66,7 +66,7 @@ Preferences::Preferences (RTWindow *rtwindow) Gtk::Box* mainBox = get_content_area (); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - mainBox->set_spacing(8); + mainBox->set_spacing (8); #endif //GTK318 //set_has_separator (false); @@ -75,32 +75,32 @@ Preferences::Preferences (RTWindow *rtwindow) nb->set_name ("PrefNotebook"); mainBox->pack_start (*nb); - Gtk::Button* about = Gtk::manage (new Gtk::Button (M("GENERAL_ABOUT"))); - Gtk::Button* ok = Gtk::manage (new Gtk::Button (M("GENERAL_OK"))); - Gtk::Button* cancel = Gtk::manage (new Gtk::Button (M("GENERAL_CANCEL"))); + Gtk::Button* about = Gtk::manage (new Gtk::Button (M ("GENERAL_ABOUT"))); + Gtk::Button* ok = Gtk::manage (new Gtk::Button (M ("GENERAL_OK"))); + Gtk::Button* cancel = Gtk::manage (new Gtk::Button (M ("GENERAL_CANCEL"))); - about->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::aboutPressed) ); - ok->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::okPressed) ); - cancel->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::cancelPressed) ); + about->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::aboutPressed) ); + ok->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::okPressed) ); + cancel->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::cancelPressed) ); get_action_area()->pack_start (*about); get_action_area()->pack_end (*ok); get_action_area()->pack_end (*cancel); - nb->append_page (*getGeneralPanel(), M("PREFERENCES_TAB_GENERAL")); - nb->append_page (*getProcParamsPanel(), M("PREFERENCES_TAB_IMPROC")); - nb->append_page (*getDynProfilePanel(), M("PREFERENCES_TAB_DYNAMICPROFILE")); - nb->append_page (*getFileBrowserPanel(), M("PREFERENCES_TAB_BROWSER")); - nb->append_page (*getColorManagementPanel(), M("PREFERENCES_TAB_COLORMGR")); - nb->append_page (*getBatchProcPanel(), M("PREFERENCES_BATCH_PROCESSING")); - nb->append_page (*getPerformancePanel(), M("PREFERENCES_TAB_PERFORMANCE")); + nb->append_page (*getGeneralPanel(), M ("PREFERENCES_TAB_GENERAL")); + nb->append_page (*getProcParamsPanel(), M ("PREFERENCES_TAB_IMPROC")); + nb->append_page (*getDynProfilePanel(), M ("PREFERENCES_TAB_DYNAMICPROFILE")); + nb->append_page (*getFileBrowserPanel(), M ("PREFERENCES_TAB_BROWSER")); + nb->append_page (*getColorManagementPanel(), M ("PREFERENCES_TAB_COLORMGR")); + nb->append_page (*getBatchProcPanel(), M ("PREFERENCES_BATCH_PROCESSING")); + nb->append_page (*getPerformancePanel(), M ("PREFERENCES_TAB_PERFORMANCE")); // Sounds only on Windows and Linux #if defined(WIN32) || defined(__linux__) - nb->append_page (*getSoundPanel(), M("PREFERENCES_TAB_SOUND")); + nb->append_page (*getSoundPanel(), M ("PREFERENCES_TAB_SOUND")); #endif nb->set_current_page (0); - ProfileStore::getInstance()->addListener(this); + ProfileStore::getInstance()->addListener (this); fillPreferences (); @@ -111,20 +111,21 @@ Preferences::Preferences (RTWindow *rtwindow) Preferences::~Preferences () { - ProfileStore::getInstance()->removeListener(this); - get_size(options.preferencesWidth, options.preferencesHeight); + ProfileStore::getInstance()->removeListener (this); + get_size (options.preferencesWidth, options.preferencesHeight); } -int Preferences::getThemeRowNumber(Glib::ustring& longThemeFName) +int Preferences::getThemeRowNumber (Glib::ustring& longThemeFName) { - if (regex->match(longThemeFName + ".css", matchInfo)) { - for (size_t i=0 ; imatch (longThemeFName + ".css", matchInfo)) { + for (size_t i = 0 ; i < themeFNames.size(); ++i) { + if (themeFNames.at (i).longFName == longThemeFName) { return (int)i; } } } + return -1; } @@ -135,10 +136,10 @@ Gtk::Widget* Preferences::getBatchProcPanel () Gtk::ScrolledWindow* behscrollw = Gtk::manage (new Gtk::ScrolledWindow ()); behscrollw->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - behscrollw->set_size_request(-1, 60); - Gtk::VBox* vbbeh = Gtk::manage( new Gtk::VBox () ); + behscrollw->set_size_request (-1, 60); + Gtk::VBox* vbbeh = Gtk::manage ( new Gtk::VBox () ); vbbeh->pack_start (*behscrollw, Gtk::PACK_EXPAND_WIDGET); - Gtk::Frame* behFrame = Gtk::manage (new Gtk::Frame (M("PREFERENCES_BEHAVIOR"))); + Gtk::Frame* behFrame = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_BEHAVIOR"))); behFrame->add (*vbbeh); //mvbpp->pack_start (*behFrame); mvbpp->pack_start (*behFrame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -148,25 +149,25 @@ Gtk::Widget* Preferences::getBatchProcPanel () behModel = Gtk::TreeStore::create (behavColumns); behTreeView->set_model (behModel); - behTreeView->append_column (M("PREFERENCES_PROPERTY"), behavColumns.label); - behTreeView->append_column_editable (M("PREFERENCES_ADD"), behavColumns.badd); - behTreeView->append_column_editable (M("PREFERENCES_SET"), behavColumns.bset); + behTreeView->append_column (M ("PREFERENCES_PROPERTY"), behavColumns.label); + behTreeView->append_column_editable (M ("PREFERENCES_ADD"), behavColumns.badd); + behTreeView->append_column_editable (M ("PREFERENCES_SET"), behavColumns.bset); Gtk::CellRendererToggle* cr_add = static_cast (behTreeView->get_column (1)->get_first_cell()); Gtk::CellRendererToggle* cr_set = static_cast (behTreeView->get_column (2)->get_first_cell()); cr_add->set_radio (true); - cr_add->set_property("xalign", 0.0f); + cr_add->set_property ("xalign", 0.0f); sigc::connection addc = cr_add->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::behAddRadioToggled)); cr_set->set_radio (true); - cr_set->set_property("xalign", 0.0f); + cr_set->set_property ("xalign", 0.0f); sigc::connection setc = cr_set->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::behSetRadioToggled)); behTreeView->get_column (1)->add_attribute (*cr_add, "visible", behavColumns.visible); - behTreeView->get_column (1)->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); + behTreeView->get_column (1)->set_sizing (Gtk::TREE_VIEW_COLUMN_FIXED); behTreeView->get_column (1)->set_fixed_width (50); behTreeView->get_column (2)->add_attribute (*cr_set, "visible", behavColumns.visible); - behTreeView->get_column (2)->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); + behTreeView->get_column (2)->set_sizing (Gtk::TREE_VIEW_COLUMN_FIXED); behTreeView->get_column (2)->set_fixed_width (50); // fill model @@ -176,216 +177,216 @@ Gtk::Widget* Preferences::getBatchProcPanel () * The TRUE/FALSE values of appendBehavList are replaced by the one defined in options.cc, */ mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_EXPOSURE_LABEL")); - appendBehavList (mi, M("TP_EXPOSURE_EXPCOMP"), ADDSET_TC_EXPCOMP, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRHIGHLIGHTS"), ADDSET_TC_HLCOMPAMOUNT, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), ADDSET_TC_HLCOMPTHRESH, false); - appendBehavList (mi, M("TP_EXPOSURE_BLACKLEVEL"), ADDSET_TC_BLACKLEVEL, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRSHADOWS"), ADDSET_TC_SHCOMP, false); - appendBehavList (mi, M("TP_EXPOSURE_BRIGHTNESS"), ADDSET_TC_BRIGHTNESS, false); - appendBehavList (mi, M("TP_EXPOSURE_CONTRAST"), ADDSET_TC_CONTRAST, false); - appendBehavList (mi, M("TP_EXPOSURE_SATURATION"), ADDSET_TC_SATURATION, false); + mi->set_value (behavColumns.label, M ("TP_EXPOSURE_LABEL")); + appendBehavList (mi, M ("TP_EXPOSURE_EXPCOMP"), ADDSET_TC_EXPCOMP, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRHIGHLIGHTS"), ADDSET_TC_HLCOMPAMOUNT, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), ADDSET_TC_HLCOMPTHRESH, false); + appendBehavList (mi, M ("TP_EXPOSURE_BLACKLEVEL"), ADDSET_TC_BLACKLEVEL, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRSHADOWS"), ADDSET_TC_SHCOMP, false); + appendBehavList (mi, M ("TP_EXPOSURE_BRIGHTNESS"), ADDSET_TC_BRIGHTNESS, false); + appendBehavList (mi, M ("TP_EXPOSURE_CONTRAST"), ADDSET_TC_CONTRAST, false); + appendBehavList (mi, M ("TP_EXPOSURE_SATURATION"), ADDSET_TC_SATURATION, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_RETINEX_LABEL")); - appendBehavList (mi, M("TP_RETINEX_STRENGTH"), ADDSET_RETI_STR, false); - appendBehavList (mi, M("TP_RETINEX_NEIGHBOR"), ADDSET_RETI_NEIGH, false); - appendBehavList (mi, M("TP_RETINEX_VARIANCE"), ADDSET_RETI_VART, false); - appendBehavList (mi, M("TP_RETINEX_GAMMA"), ADDSET_RETI_GAM, false); - appendBehavList (mi, M("TP_RETINEX_SLOPE"), ADDSET_RETI_SLO, false); - appendBehavList (mi, M("TP_RETINEX_GAIN"), ADDSET_RETI_GAIN, false); - appendBehavList (mi, M("TP_RETINEX_OFFSET"), ADDSET_RETI_OFFS, false); - appendBehavList (mi, M("TP_RETINEX_THRESHOLD"), ADDSET_RETI_LIMD, false); + mi->set_value (behavColumns.label, M ("TP_RETINEX_LABEL")); + appendBehavList (mi, M ("TP_RETINEX_STRENGTH"), ADDSET_RETI_STR, false); + appendBehavList (mi, M ("TP_RETINEX_NEIGHBOR"), ADDSET_RETI_NEIGH, false); + appendBehavList (mi, M ("TP_RETINEX_VARIANCE"), ADDSET_RETI_VART, false); + appendBehavList (mi, M ("TP_RETINEX_GAMMA"), ADDSET_RETI_GAM, false); + appendBehavList (mi, M ("TP_RETINEX_SLOPE"), ADDSET_RETI_SLO, false); + appendBehavList (mi, M ("TP_RETINEX_GAIN"), ADDSET_RETI_GAIN, false); + appendBehavList (mi, M ("TP_RETINEX_OFFSET"), ADDSET_RETI_OFFS, false); + appendBehavList (mi, M ("TP_RETINEX_THRESHOLD"), ADDSET_RETI_LIMD, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHADOWSHLIGHTS_LABEL")); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), ADDSET_SH_HIGHLIGHTS, false); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_SHADOWS"), ADDSET_SH_SHADOWS, false); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_LOCALCONTR"), ADDSET_SH_LOCALCONTRAST, false); + mi->set_value (behavColumns.label, M ("TP_SHADOWSHLIGHTS_LABEL")); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), ADDSET_SH_HIGHLIGHTS, false); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_SHADOWS"), ADDSET_SH_SHADOWS, false); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_LOCALCONTR"), ADDSET_SH_LOCALCONTRAST, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_LABCURVE_LABEL")); - appendBehavList (mi, M("TP_LABCURVE_BRIGHTNESS"), ADDSET_LC_BRIGHTNESS, false); - appendBehavList (mi, M("TP_LABCURVE_CONTRAST"), ADDSET_LC_CONTRAST, false); - appendBehavList (mi, M("TP_LABCURVE_CHROMATICITY"), ADDSET_LC_CHROMATICITY, false); + mi->set_value (behavColumns.label, M ("TP_LABCURVE_LABEL")); + appendBehavList (mi, M ("TP_LABCURVE_BRIGHTNESS"), ADDSET_LC_BRIGHTNESS, false); + appendBehavList (mi, M ("TP_LABCURVE_CONTRAST"), ADDSET_LC_CONTRAST, false); + appendBehavList (mi, M ("TP_LABCURVE_CHROMATICITY"), ADDSET_LC_CHROMATICITY, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENING_LABEL")); - appendBehavList (mi, M("TP_SHARPENING_AMOUNT"), ADDSET_SHARP_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENING_LABEL")); + appendBehavList (mi, M ("TP_SHARPENING_AMOUNT"), ADDSET_SHARP_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENEDGE_LABEL")); - appendBehavList (mi, M("TP_SHARPENEDGE_PASSES"), ADDSET_SHARPENEDGE_PASS, false); - appendBehavList (mi, M("TP_SHARPENEDGE_AMOUNT"), ADDSET_SHARPENEDGE_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENEDGE_LABEL")); + appendBehavList (mi, M ("TP_SHARPENEDGE_PASSES"), ADDSET_SHARPENEDGE_PASS, false); + appendBehavList (mi, M ("TP_SHARPENEDGE_AMOUNT"), ADDSET_SHARPENEDGE_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENMICRO_LABEL")); - appendBehavList (mi, M("TP_SHARPENMICRO_AMOUNT"), ADDSET_SHARPENMICRO_AMOUNT, false); - appendBehavList (mi, M("TP_SHARPENMICRO_UNIFORMITY"), ADDSET_SHARPENMICRO_UNIFORMITY, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENMICRO_LABEL")); + appendBehavList (mi, M ("TP_SHARPENMICRO_AMOUNT"), ADDSET_SHARPENMICRO_AMOUNT, false); + appendBehavList (mi, M ("TP_SHARPENMICRO_UNIFORMITY"), ADDSET_SHARPENMICRO_UNIFORMITY, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DIRPYRDENOISE_LABEL")); + mi->set_value (behavColumns.label, M ("TP_DIRPYRDENOISE_LABEL")); // appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA")+", "+M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHLUM, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA"), ADDSET_DIRPYRDN_LUMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_LDETAIL"), ADDSET_DIRPYRDN_LUMDET, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHROMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_RED"), ADDSET_DIRPYRDN_CHROMARED, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_BLUE"), ADDSET_DIRPYRDN_CHROMABLUE, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_GAMMA"), ADDSET_DIRPYRDN_GAMMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_PASSES"), ADDSET_DIRPYRDN_PASSES, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_LUMA"), ADDSET_DIRPYRDN_LUMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_LDETAIL"), ADDSET_DIRPYRDN_LUMDET, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHROMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_RED"), ADDSET_DIRPYRDN_CHROMARED, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_BLUE"), ADDSET_DIRPYRDN_CHROMABLUE, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_GAMMA"), ADDSET_DIRPYRDN_GAMMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_PASSES"), ADDSET_DIRPYRDN_PASSES, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_WBALANCE_LABEL")); - appendBehavList (mi, M("TP_WBALANCE_TEMPERATURE"), ADDSET_WB_TEMPERATURE, true); - appendBehavList (mi, M("TP_WBALANCE_GREEN"), ADDSET_WB_GREEN, true); - appendBehavList (mi, M("TP_WBALANCE_EQBLUERED"), ADDSET_WB_EQUAL, true); - appendBehavList (mi, M("TP_WBALANCE_TEMPBIAS"), ADDSET_WB_TEMPBIAS, true); + mi->set_value (behavColumns.label, M ("TP_WBALANCE_LABEL")); + appendBehavList (mi, M ("TP_WBALANCE_TEMPERATURE"), ADDSET_WB_TEMPERATURE, true); + appendBehavList (mi, M ("TP_WBALANCE_GREEN"), ADDSET_WB_GREEN, true); + appendBehavList (mi, M ("TP_WBALANCE_EQBLUERED"), ADDSET_WB_EQUAL, true); + appendBehavList (mi, M ("TP_WBALANCE_TEMPBIAS"), ADDSET_WB_TEMPBIAS, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_COLORAPP_LABEL")); - appendBehavList (mi, M("TP_COLORAPP_CIECAT_DEGREE"), ADDSET_CAT_DEGREE, true); - appendBehavList (mi, M("TP_COLORAPP_ADAPTSCENE"), ADDSET_CAT_ADAPTSCENE, true); - appendBehavList (mi, M("TP_COLORAPP_LIGHT"), ADDSET_CAT_LIGHT, true); - appendBehavList (mi, M("TP_COLORAPP_BRIGHT"), ADDSET_CAT_BRIGHT, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA"), ADDSET_CAT_CHROMA, true); - appendBehavList (mi, M("TP_COLORAPP_RSTPRO"), ADDSET_CAT_RSTPRO, true); - appendBehavList (mi, M("TP_COLORAPP_CONTRAST"), ADDSET_CAT_CONTRAST, true); - appendBehavList (mi, M("TP_COLORAPP_CONTRAST_Q"), ADDSET_CAT_CONTRAST_Q, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true); - appendBehavList (mi, M("TP_COLORAPP_HUE"), ADDSET_CAT_HUE, true); - appendBehavList (mi, M("TP_COLORAPP_ADAPTVIEWING"), ADDSET_CAT_ADAPTVIEWING, true); - appendBehavList (mi, M("TP_COLORAPP_BADPIXSL"), ADDSET_CAT_BADPIX, true); + mi->set_value (behavColumns.label, M ("TP_COLORAPP_LABEL")); + appendBehavList (mi, M ("TP_COLORAPP_CIECAT_DEGREE"), ADDSET_CAT_DEGREE, true); + appendBehavList (mi, M ("TP_COLORAPP_ADAPTSCENE"), ADDSET_CAT_ADAPTSCENE, true); + appendBehavList (mi, M ("TP_COLORAPP_LIGHT"), ADDSET_CAT_LIGHT, true); + appendBehavList (mi, M ("TP_COLORAPP_BRIGHT"), ADDSET_CAT_BRIGHT, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA"), ADDSET_CAT_CHROMA, true); + appendBehavList (mi, M ("TP_COLORAPP_RSTPRO"), ADDSET_CAT_RSTPRO, true); + appendBehavList (mi, M ("TP_COLORAPP_CONTRAST"), ADDSET_CAT_CONTRAST, true); + appendBehavList (mi, M ("TP_COLORAPP_CONTRAST_Q"), ADDSET_CAT_CONTRAST_Q, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true); + appendBehavList (mi, M ("TP_COLORAPP_HUE"), ADDSET_CAT_HUE, true); + appendBehavList (mi, M ("TP_COLORAPP_ADAPTVIEWING"), ADDSET_CAT_ADAPTVIEWING, true); + appendBehavList (mi, M ("TP_COLORAPP_BADPIXSL"), ADDSET_CAT_BADPIX, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_VIBRANCE_LABEL")); - appendBehavList (mi, M("TP_VIBRANCE_PASTELS"), ADDSET_VIBRANCE_PASTELS, false); - appendBehavList (mi, M("TP_VIBRANCE_SATURATED"), ADDSET_VIBRANCE_SATURATED, false); + mi->set_value (behavColumns.label, M ("TP_VIBRANCE_LABEL")); + appendBehavList (mi, M ("TP_VIBRANCE_PASTELS"), ADDSET_VIBRANCE_PASTELS, false); + appendBehavList (mi, M ("TP_VIBRANCE_SATURATED"), ADDSET_VIBRANCE_SATURATED, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_GAMMA_OUTPUT")); - appendBehavList (mi, M("TP_GAMMA_CURV"), ADDSET_FREE_OUPUT_GAMMA, false); - appendBehavList (mi, M("TP_GAMMA_SLOP"), ADDSET_FREE_OUTPUT_SLOPE, false); + mi->set_value (behavColumns.label, M ("TP_GAMMA_OUTPUT")); + appendBehavList (mi, M ("TP_GAMMA_CURV"), ADDSET_FREE_OUPUT_GAMMA, false); + appendBehavList (mi, M ("TP_GAMMA_SLOP"), ADDSET_FREE_OUTPUT_SLOPE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CHMIXER_LABEL")); - appendBehavList (mi, M("TP_CHMIXER_RED") + ", " + M("TP_CHMIXER_GREEN") + ", " + M("TP_CHMIXER_BLUE"), ADDSET_CHMIXER, false); + mi->set_value (behavColumns.label, M ("TP_CHMIXER_LABEL")); + appendBehavList (mi, M ("TP_CHMIXER_RED") + ", " + M ("TP_CHMIXER_GREEN") + ", " + M ("TP_CHMIXER_BLUE"), ADDSET_CHMIXER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_BWMIX_LABEL")); - appendBehavList (mi, M("TP_BWMIX_MIXC"), ADDSET_BLACKWHITE_HUES, false); - appendBehavList (mi, M("TP_BWMIX_GAMMA"), ADDSET_BLACKWHITE_GAMMA, false); + mi->set_value (behavColumns.label, M ("TP_BWMIX_LABEL")); + appendBehavList (mi, M ("TP_BWMIX_MIXC"), ADDSET_BLACKWHITE_HUES, false); + appendBehavList (mi, M ("TP_BWMIX_GAMMA"), ADDSET_BLACKWHITE_GAMMA, false); mi = behModel->append (); - mi->set_value( behavColumns.label, M("TP_FILMSIMULATION_LABEL") ); - appendBehavList( mi, M( "TP_FILMSIMULATION_STRENGTH" ), ADDSET_FILMSIMULATION_STRENGTH, true ); + mi->set_value ( behavColumns.label, M ("TP_FILMSIMULATION_LABEL") ); + appendBehavList ( mi, M ( "TP_FILMSIMULATION_STRENGTH" ), ADDSET_FILMSIMULATION_STRENGTH, true ); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_COLORTONING_LABEL")); - appendBehavList (mi, M("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT , true); - appendBehavList (mi, M("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD , true); - appendBehavList (mi, M("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY , true); - appendBehavList (mi, M("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE , true); - appendBehavList (mi, M("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH , true); + mi->set_value (behavColumns.label, M ("TP_COLORTONING_LABEL")); + appendBehavList (mi, M ("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY, true); + appendBehavList (mi, M ("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE, true); + appendBehavList (mi, M ("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_ROTATE_LABEL")); - appendBehavList (mi, M("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false); + mi->set_value (behavColumns.label, M ("TP_ROTATE_LABEL")); + appendBehavList (mi, M ("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DISTORTION_LABEL")); - appendBehavList (mi, M("TP_DISTORTION_AMOUNT"), ADDSET_DIST_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_DISTORTION_LABEL")); + appendBehavList (mi, M ("TP_DISTORTION_AMOUNT"), ADDSET_DIST_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PERSPECTIVE_LABEL")); - appendBehavList (mi, M("TP_PERSPECTIVE_HORIZONTAL") + ", " + M("TP_PERSPECTIVE_VERTICAL"), ADDSET_PERSPECTIVE, false); + mi->set_value (behavColumns.label, M ("TP_PERSPECTIVE_LABEL")); + appendBehavList (mi, M ("TP_PERSPECTIVE_HORIZONTAL") + ", " + M ("TP_PERSPECTIVE_VERTICAL"), ADDSET_PERSPECTIVE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_GRADIENT_LABEL")); - appendBehavList (mi, M("TP_GRADIENT_DEGREE"), ADDSET_GRADIENT_DEGREE, false); - appendBehavList (mi, M("TP_GRADIENT_FEATHER"), ADDSET_GRADIENT_FEATHER, false); - appendBehavList (mi, M("TP_GRADIENT_STRENGTH"), ADDSET_GRADIENT_STRENGTH, false); - appendBehavList (mi, M("TP_GRADIENT_CENTER_X") + ", " + M("TP_GRADIENT_CENTER_Y"), ADDSET_GRADIENT_CENTER, false); + mi->set_value (behavColumns.label, M ("TP_GRADIENT_LABEL")); + appendBehavList (mi, M ("TP_GRADIENT_DEGREE"), ADDSET_GRADIENT_DEGREE, false); + appendBehavList (mi, M ("TP_GRADIENT_FEATHER"), ADDSET_GRADIENT_FEATHER, false); + appendBehavList (mi, M ("TP_GRADIENT_STRENGTH"), ADDSET_GRADIENT_STRENGTH, false); + appendBehavList (mi, M ("TP_GRADIENT_CENTER_X") + ", " + M ("TP_GRADIENT_CENTER_Y"), ADDSET_GRADIENT_CENTER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PCVIGNETTE_LABEL")); - appendBehavList (mi, M("TP_PCVIGNETTE_STRENGTH"), ADDSET_PCVIGNETTE_STRENGTH, false); - appendBehavList (mi, M("TP_PCVIGNETTE_FEATHER"), ADDSET_PCVIGNETTE_FEATHER, false); - appendBehavList (mi, M("TP_PCVIGNETTE_ROUNDNESS"), ADDSET_PCVIGNETTE_ROUNDNESS, false); + mi->set_value (behavColumns.label, M ("TP_PCVIGNETTE_LABEL")); + appendBehavList (mi, M ("TP_PCVIGNETTE_STRENGTH"), ADDSET_PCVIGNETTE_STRENGTH, false); + appendBehavList (mi, M ("TP_PCVIGNETTE_FEATHER"), ADDSET_PCVIGNETTE_FEATHER, false); + appendBehavList (mi, M ("TP_PCVIGNETTE_ROUNDNESS"), ADDSET_PCVIGNETTE_ROUNDNESS, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CACORRECTION_LABEL")); - appendBehavList (mi, M("TP_CACORRECTION_BLUE") + ", " + M("TP_CACORRECTION_RED"), ADDSET_CA, true); + mi->set_value (behavColumns.label, M ("TP_CACORRECTION_LABEL")); + appendBehavList (mi, M ("TP_CACORRECTION_BLUE") + ", " + M ("TP_CACORRECTION_RED"), ADDSET_CA, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_VIGNETTING_LABEL")); - appendBehavList (mi, M("TP_VIGNETTING_AMOUNT"), ADDSET_VIGN_AMOUNT, false); - appendBehavList (mi, M("TP_VIGNETTING_RADIUS"), ADDSET_VIGN_RADIUS, false); - appendBehavList (mi, M("TP_VIGNETTING_STRENGTH"), ADDSET_VIGN_STRENGTH, false); - appendBehavList (mi, M("TP_VIGNETTING_CENTER_X") + ", " + M("TP_VIGNETTING_CENTER_Y"), ADDSET_VIGN_CENTER, false); + mi->set_value (behavColumns.label, M ("TP_VIGNETTING_LABEL")); + appendBehavList (mi, M ("TP_VIGNETTING_AMOUNT"), ADDSET_VIGN_AMOUNT, false); + appendBehavList (mi, M ("TP_VIGNETTING_RADIUS"), ADDSET_VIGN_RADIUS, false); + appendBehavList (mi, M ("TP_VIGNETTING_STRENGTH"), ADDSET_VIGN_STRENGTH, false); + appendBehavList (mi, M ("TP_VIGNETTING_CENTER_X") + ", " + M ("TP_VIGNETTING_CENTER_Y"), ADDSET_VIGN_CENTER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DIRPYREQUALIZER_LABEL")); - appendBehavList (mi, M("TP_EXPOSURE_CONTRAST"), ADDSET_DIRPYREQ, true); - appendBehavList (mi, M("TP_DIRPYREQUALIZER_THRESHOLD"), ADDSET_DIRPYREQ_THRESHOLD, true); - appendBehavList (mi, M("TP_DIRPYREQUALIZER_SKIN"), ADDSET_DIRPYREQ_SKINPROTECT, true); + mi->set_value (behavColumns.label, M ("TP_DIRPYREQUALIZER_LABEL")); + appendBehavList (mi, M ("TP_EXPOSURE_CONTRAST"), ADDSET_DIRPYREQ, true); + appendBehavList (mi, M ("TP_DIRPYREQUALIZER_THRESHOLD"), ADDSET_DIRPYREQ_THRESHOLD, true); + appendBehavList (mi, M ("TP_DIRPYREQUALIZER_SKIN"), ADDSET_DIRPYREQ_SKINPROTECT, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_WAVELET_LABEL")); - appendBehavList (mi, M("TP_WAVELET_LEVELS"), ADDSET_WA_THRES, true); + mi->set_value (behavColumns.label, M ("TP_WAVELET_LABEL")); + appendBehavList (mi, M ("TP_WAVELET_LEVELS"), ADDSET_WA_THRES, true); // appendBehavList (mi, M("TP_WAVELET_CONTRAST"), ADDSET_WA, true); - appendBehavList (mi, M("TP_WAVELET_THRESHOLD"), ADDSET_WA_THRESHOLD, true); - appendBehavList (mi, M("TP_WAVELET_THRESHOLD2"), ADDSET_WA_THRESHOLD2, true); - appendBehavList (mi, M("TP_WAVELET_CHRO"), ADDSET_WA_CHRO, true); - appendBehavList (mi, M("TP_WAVELET_CHR"), ADDSET_WA_CHROMA, true); - appendBehavList (mi, M("TP_WAVELET_SKIN"), ADDSET_WA_SKINPROTECT, true); - appendBehavList (mi, M("TP_WAVELET_EDRAD"), ADDSET_WA_EDGRAD, true); - appendBehavList (mi, M("TP_WAVELET_EDVAL"), ADDSET_WA_EDGVAL, true); - appendBehavList (mi, M("TP_WAVELET_RESCON"), ADDSET_WA_RESCON, true); - appendBehavList (mi, M("TP_WAVELET_THR"), ADDSET_WA_THRR, true); - appendBehavList (mi, M("TP_WAVELET_RESCONH"), ADDSET_WA_RESCONH, true); - appendBehavList (mi, M("TP_WAVELET_THRH"), ADDSET_WA_THRRH, true); - appendBehavList (mi, M("TP_WAVELET_RESCHRO"), ADDSET_WA_RESCHRO, true); - appendBehavList (mi, M("TP_WAVELET_TMSTRENGTH"), ADDSET_WA_TMRS, true); - appendBehavList (mi, M("TP_WAVELET_SKY"), ADDSET_WA_SKYPROTECT, true); - appendBehavList (mi, M("TP_WAVELET_CONTRA"), ADDSET_WA_CONTRAST, true); - appendBehavList (mi, M("TP_WAVELET_STRENGTH"), ADDSET_WA_STRENGTH, true); - appendBehavList (mi, M("TP_WAVELET_COMPGAMMA"), ADDSET_WA_GAMMA, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECT"), ADDSET_WA_EDGEDETECT, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECTTHR"), ADDSET_WA_EDGEDETECTTHR, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECTTHR2"), ADDSET_WA_EDGEDETECTTHR2, true); + appendBehavList (mi, M ("TP_WAVELET_THRESHOLD"), ADDSET_WA_THRESHOLD, true); + appendBehavList (mi, M ("TP_WAVELET_THRESHOLD2"), ADDSET_WA_THRESHOLD2, true); + appendBehavList (mi, M ("TP_WAVELET_CHRO"), ADDSET_WA_CHRO, true); + appendBehavList (mi, M ("TP_WAVELET_CHR"), ADDSET_WA_CHROMA, true); + appendBehavList (mi, M ("TP_WAVELET_SKIN"), ADDSET_WA_SKINPROTECT, true); + appendBehavList (mi, M ("TP_WAVELET_EDRAD"), ADDSET_WA_EDGRAD, true); + appendBehavList (mi, M ("TP_WAVELET_EDVAL"), ADDSET_WA_EDGVAL, true); + appendBehavList (mi, M ("TP_WAVELET_RESCON"), ADDSET_WA_RESCON, true); + appendBehavList (mi, M ("TP_WAVELET_THR"), ADDSET_WA_THRR, true); + appendBehavList (mi, M ("TP_WAVELET_RESCONH"), ADDSET_WA_RESCONH, true); + appendBehavList (mi, M ("TP_WAVELET_THRH"), ADDSET_WA_THRRH, true); + appendBehavList (mi, M ("TP_WAVELET_RESCHRO"), ADDSET_WA_RESCHRO, true); + appendBehavList (mi, M ("TP_WAVELET_TMSTRENGTH"), ADDSET_WA_TMRS, true); + appendBehavList (mi, M ("TP_WAVELET_SKY"), ADDSET_WA_SKYPROTECT, true); + appendBehavList (mi, M ("TP_WAVELET_CONTRA"), ADDSET_WA_CONTRAST, true); + appendBehavList (mi, M ("TP_WAVELET_STRENGTH"), ADDSET_WA_STRENGTH, true); + appendBehavList (mi, M ("TP_WAVELET_COMPGAMMA"), ADDSET_WA_GAMMA, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECT"), ADDSET_WA_EDGEDETECT, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECTTHR"), ADDSET_WA_EDGEDETECTTHR, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECTTHR2"), ADDSET_WA_EDGEDETECTTHR2, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PREPROCESS_LABEL")); - appendBehavList (mi, M("TP_PREPROCESS_GREENEQUIL"), ADDSET_PREPROCESS_GREENEQUIL, false); - appendBehavList (mi, M("TP_PREPROCESS_LINEDENOISE"), ADDSET_PREPROCESS_LINEDENOISE, true); + mi->set_value (behavColumns.label, M ("TP_PREPROCESS_LABEL")); + appendBehavList (mi, M ("TP_PREPROCESS_GREENEQUIL"), ADDSET_PREPROCESS_GREENEQUIL, false); + appendBehavList (mi, M ("TP_PREPROCESS_LINEDENOISE"), ADDSET_PREPROCESS_LINEDENOISE, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_EXPOS_WHITEPOINT_LABEL")); - appendBehavList (mi, M("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false); - appendBehavList (mi, M("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false); + mi->set_value (behavColumns.label, M ("TP_EXPOS_WHITEPOINT_LABEL")); + appendBehavList (mi, M ("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false); + appendBehavList (mi, M ("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_RAWEXPOS_BLACKS")); - appendBehavList (mi, M("TP_RAWEXPOS_RGB"), ADDSET_RAWEXPOS_BLACKS, false); + mi->set_value (behavColumns.label, M ("TP_RAWEXPOS_BLACKS")); + appendBehavList (mi, M ("TP_RAWEXPOS_RGB"), ADDSET_RAWEXPOS_BLACKS, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_FLATFIELD_LABEL")); - appendBehavList (mi, M("TP_FLATFIELD_CLIPCONTROL"), ADDSET_RAWFFCLIPCONTROL, true); + mi->set_value (behavColumns.label, M ("TP_FLATFIELD_LABEL")); + appendBehavList (mi, M ("TP_FLATFIELD_CLIPCONTROL"), ADDSET_RAWFFCLIPCONTROL, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CHROMATABERR_LABEL")); - appendBehavList (mi, M("TP_RAWCACORR_CARED") + ", " + M("TP_RAWCACORR_CABLUE"), ADDSET_RAWCACORR, true); + mi->set_value (behavColumns.label, M ("TP_CHROMATABERR_LABEL")); + appendBehavList (mi, M ("TP_RAWCACORR_CARED") + ", " + M ("TP_RAWCACORR_CABLUE"), ADDSET_RAWCACORR, true); behTreeView->expand_all (); - behAddAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_BEHADDALL")) ); - behSetAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_BEHSETALL")) ); - behAddAll->set_tooltip_markup (M("PREFERENCES_BEHADDALLHINT")); - behSetAll->set_tooltip_markup (M("PREFERENCES_BEHSETALLHINT")); + behAddAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_BEHADDALL")) ); + behSetAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_BEHSETALL")) ); + behAddAll->set_tooltip_markup (M ("PREFERENCES_BEHADDALLHINT")); + behSetAll->set_tooltip_markup (M ("PREFERENCES_BEHSETALLHINT")); - behAddAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::behAddAllPressed) ); - behSetAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::behSetAllPressed) ); + behAddAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::behAddAllPressed) ); + behSetAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::behSetAllPressed) ); Gtk::HBox* buttonpanel1 = Gtk::manage (new Gtk::HBox ()); //buttonpanel1->set_spacing(8); @@ -393,8 +394,8 @@ Gtk::Widget* Preferences::getBatchProcPanel () buttonpanel1->pack_end (*behAddAll, Gtk::PACK_SHRINK, 4); vbbeh->pack_start (*buttonpanel1, Gtk::PACK_SHRINK, 4); - chOverwriteOutputFile = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERWRITEOUTPUTFILE")) ); - mvbpp->pack_start(*chOverwriteOutputFile, Gtk::PACK_SHRINK, 4); + chOverwriteOutputFile = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERWRITEOUTPUTFILE")) ); + mvbpp->pack_start (*chOverwriteOutputFile, Gtk::PACK_SHRINK, 4); return mvbpp; } @@ -431,7 +432,7 @@ void Preferences::behSetRadioToggled (const Glib::ustring& path) Gtk::Widget *Preferences::getDynProfilePanel() { - dynProfilePanel = Gtk::manage(new DynamicProfilePanel()); + dynProfilePanel = Gtk::manage (new DynamicProfilePanel()); return dynProfilePanel; } @@ -441,43 +442,43 @@ Gtk::Widget* Preferences::getProcParamsPanel () Gtk::VBox* mvbpp = Gtk::manage (new Gtk::VBox ()); - Gtk::Frame* fpp = Gtk::manage (new Gtk::Frame (M("PREFERENCES_IMPROCPARAMS"))); + Gtk::Frame* fpp = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_IMPROCPARAMS"))); Gtk::VBox* vbpp = Gtk::manage (new Gtk::VBox ()); - Gtk::Label* drlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_FORRAW") + ":", Gtk::ALIGN_START)); + Gtk::Label* drlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FORRAW") + ":", Gtk::ALIGN_START)); rprofiles = Gtk::manage (new ProfileStoreComboBox ()); const ProfileStoreEntry* dynpse = ProfileStore::getInstance()->getInternalDynamicPSE(); - rprofiles->addRow(dynpse); - setExpandAlignProperties(rprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - rprofiles->set_size_request(50, -1); - rpconn = rprofiles->signal_changed().connect( sigc::mem_fun(*this, &Preferences::forRAWComboChanged) ); - Gtk::Label* drimg = Gtk::manage (new Gtk::Label (M("PREFERENCES_FORIMAGE") + ":", Gtk::ALIGN_START)); + rprofiles->addRow (dynpse); + setExpandAlignProperties (rprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + rprofiles->set_size_request (50, -1); + rpconn = rprofiles->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::forRAWComboChanged) ); + Gtk::Label* drimg = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FORIMAGE") + ":", Gtk::ALIGN_START)); iprofiles = Gtk::manage (new ProfileStoreComboBox ()); - iprofiles->addRow(dynpse); - iprofiles->set_size_request(50, -1); - setExpandAlignProperties(iprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - ipconn = iprofiles->signal_changed().connect( sigc::mem_fun(*this, &Preferences::forImageComboChanged) ); + iprofiles->addRow (dynpse); + iprofiles->set_size_request (50, -1); + setExpandAlignProperties (iprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + ipconn = iprofiles->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::forImageComboChanged) ); Gtk::Table* defpt = Gtk::manage (new Gtk::Table (2, 2)); defpt->attach (*drlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); defpt->attach (*rprofiles, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); defpt->attach (*drimg, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); defpt->attach (*iprofiles, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); vbpp->pack_start (*defpt, Gtk::PACK_SHRINK, 4); - useBundledProfiles = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_USEBUNDLEDPROFILES"))); - bpconn = useBundledProfiles->signal_clicked().connect ( sigc::mem_fun(*this, &Preferences::bundledProfilesChanged) ); + useBundledProfiles = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_USEBUNDLEDPROFILES"))); + bpconn = useBundledProfiles->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::bundledProfilesChanged) ); vbpp->pack_start (*useBundledProfiles, Gtk::PACK_SHRINK, 4); fpp->add (*vbpp); mvbpp->pack_start (*fpp, Gtk::PACK_SHRINK, 4); // Custom profile builder box - Gtk::Frame* cpfrm = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CUSTPROFBUILD")) ); - Gtk::Label* cplab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUSTPROFBUILDPATH") + ":", Gtk::ALIGN_START) ); - txtCustProfBuilderPath = Gtk::manage( new Gtk::Entry () ); - txtCustProfBuilderPath->set_tooltip_markup (M("PREFERENCES_CUSTPROFBUILDHINT")); - Gtk::Label* cpltypelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT") + ":", Gtk::ALIGN_START) ); + Gtk::Frame* cpfrm = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CUSTPROFBUILD")) ); + Gtk::Label* cplab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUSTPROFBUILDPATH") + ":", Gtk::ALIGN_START) ); + txtCustProfBuilderPath = Gtk::manage ( new Gtk::Entry () ); + txtCustProfBuilderPath->set_tooltip_markup (M ("PREFERENCES_CUSTPROFBUILDHINT")); + Gtk::Label* cpltypelab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT") + ":", Gtk::ALIGN_START) ); custProfBuilderLabelType = Gtk::manage (new Gtk::ComboBoxText ()); - custProfBuilderLabelType->append (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID")); - custProfBuilderLabelType->append (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); - custProfBuilderLabelType->append (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); Gtk::Table* cpbt = Gtk::manage (new Gtk::Table (2, 2)); cpbt->attach (*cplab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); cpbt->attach (*txtCustProfBuilderPath, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); @@ -486,72 +487,72 @@ Gtk::Widget* Preferences::getProcParamsPanel () cpfrm->add (*cpbt); mvbpp->pack_start (*cpfrm, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdp = Gtk::manage (new Gtk::Frame (M("PREFERENCES_PROFILEHANDLING"))); + Gtk::Frame* fdp = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_PROFILEHANDLING"))); Gtk::Table* vbdp = Gtk::manage (new Gtk::Table (2, 2)); saveParamsPreference = Gtk::manage (new Gtk::ComboBoxText ()); - saveParamsPreference->append(M("PREFERENCES_PROFILESAVEINPUT")); - saveParamsPreference->append(M("PREFERENCES_PROFILESAVECACHE")); - saveParamsPreference->append(M("PREFERENCES_PROFILESAVEBOTH")); - Gtk::Label *splab = Gtk::manage(new Gtk::Label(M("PREFERENCES_PROFILESAVELOCATION") + ":")); - vbdp->attach(*splab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - vbdp->attach(*saveParamsPreference, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - Gtk::Label* lplab = Gtk::manage (new Gtk::Label (M("PREFERENCES_PROFILELOADPR") + ":")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVEINPUT")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVECACHE")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVEBOTH")); + Gtk::Label *splab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILESAVELOCATION") + ":")); + vbdp->attach (*splab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); + vbdp->attach (*saveParamsPreference, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + Gtk::Label* lplab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILELOADPR") + ":")); loadParamsPreference = Gtk::manage (new Gtk::ComboBoxText ()); - loadParamsPreference->append (M("PREFERENCES_PROFILEPRCACHE")); - loadParamsPreference->append (M("PREFERENCES_PROFILEPRFILE")); - vbdp->attach(*lplab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); - vbdp->attach(*loadParamsPreference, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + loadParamsPreference->append (M ("PREFERENCES_PROFILEPRCACHE")); + loadParamsPreference->append (M ("PREFERENCES_PROFILEPRFILE")); + vbdp->attach (*lplab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); + vbdp->attach (*loadParamsPreference, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); fdp->add (*vbdp); mvbpp->pack_start (*fdp, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdf = Gtk::manage (new Gtk::Frame (M("PREFERENCES_DARKFRAME")) ); + Gtk::Frame* fdf = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_DARKFRAME")) ); Gtk::HBox* hb42 = Gtk::manage (new Gtk::HBox ()); - darkFrameDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *dfLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_DIRDARKFRAMES") + ":")); - hb42->pack_start(*dfLab , Gtk::PACK_SHRINK, 4 ); - hb42->pack_start(*darkFrameDir, Gtk::PACK_EXPAND_WIDGET, 4); - dfLabel = Gtk::manage(new Gtk::Label("Found:")); + darkFrameDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *dfLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_DIRDARKFRAMES") + ":")); + hb42->pack_start (*dfLab, Gtk::PACK_SHRINK, 4 ); + hb42->pack_start (*darkFrameDir, Gtk::PACK_EXPAND_WIDGET, 4); + dfLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbdf = Gtk::manage (new Gtk::VBox ()); - vbdf->pack_start( *hb42, Gtk::PACK_SHRINK, 4); - vbdf->pack_start( *dfLabel, Gtk::PACK_SHRINK, 4 ); - fdf->add( *vbdf ); - mvbpp->pack_start ( *fdf , Gtk::PACK_SHRINK, 4); + vbdf->pack_start ( *hb42, Gtk::PACK_SHRINK, 4); + vbdf->pack_start ( *dfLabel, Gtk::PACK_SHRINK, 4 ); + fdf->add ( *vbdf ); + mvbpp->pack_start ( *fdf, Gtk::PACK_SHRINK, 4); //dfconn = darkFrameDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::darkFrameChanged), true); - dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun(*this, &Preferences::darkFrameChanged), true); + dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::darkFrameChanged), true); // FLATFIELD - Gtk::Frame* fff = Gtk::manage (new Gtk::Frame (M("PREFERENCES_FLATFIELD")) ); + Gtk::Frame* fff = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_FLATFIELD")) ); Gtk::HBox* hb43 = Gtk::manage (new Gtk::HBox ()); - flatFieldDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *ffLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_FLATFIELDSDIR") + ":")); - hb43->pack_start(*ffLab , Gtk::PACK_SHRINK, 4 ); - hb43->pack_start(*flatFieldDir); - ffLabel = Gtk::manage(new Gtk::Label("Found:")); + flatFieldDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *ffLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FLATFIELDSDIR") + ":")); + hb43->pack_start (*ffLab, Gtk::PACK_SHRINK, 4 ); + hb43->pack_start (*flatFieldDir); + ffLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbff = Gtk::manage (new Gtk::VBox ()); - vbff->pack_start( *hb43, Gtk::PACK_SHRINK, 4); - vbff->pack_start( *ffLabel, Gtk::PACK_SHRINK, 4 ); - fff->add( *vbff ); - mvbpp->pack_start ( *fff , Gtk::PACK_SHRINK, 4); + vbff->pack_start ( *hb43, Gtk::PACK_SHRINK, 4); + vbff->pack_start ( *ffLabel, Gtk::PACK_SHRINK, 4 ); + fff->add ( *vbff ); + mvbpp->pack_start ( *fff, Gtk::PACK_SHRINK, 4); //ffconn = flatFieldDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::flatFieldChanged), true); - ffconn = flatFieldDir->signal_selection_changed().connect ( sigc::mem_fun(*this, &Preferences::flatFieldChanged), true); + ffconn = flatFieldDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::flatFieldChanged), true); //Cluts Dir - Gtk::Frame* clutsDirFrame = Gtk::manage (new Gtk::Frame (M("PREFERENCES_FILMSIMULATION")) ); + Gtk::Frame* clutsDirFrame = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_FILMSIMULATION")) ); Gtk::HBox* clutsDirBox = Gtk::manage (new Gtk::HBox ()); - clutsDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_CLUTSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *clutsDirLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_CLUTSDIR") + ":")); - Gtk::Label* clutsRestartNeeded = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - clutsDirBox->pack_start( *clutsDirLabel, Gtk::PACK_SHRINK, 4 ); - clutsDirBox->pack_start( *clutsDir ); - clutsDirBox->pack_start( *clutsRestartNeeded, Gtk::PACK_SHRINK, 4 ); - clutsDirFrame->add( *clutsDirBox ); - mvbpp->pack_start( *clutsDirFrame, Gtk::PACK_SHRINK, 4 ); + clutsDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_CLUTSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *clutsDirLabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_CLUTSDIR") + ":")); + Gtk::Label* clutsRestartNeeded = Gtk::manage ( new Gtk::Label (Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + clutsDirBox->pack_start ( *clutsDirLabel, Gtk::PACK_SHRINK, 4 ); + clutsDirBox->pack_start ( *clutsDir ); + clutsDirBox->pack_start ( *clutsRestartNeeded, Gtk::PACK_SHRINK, 4 ); + clutsDirFrame->add ( *clutsDirBox ); + mvbpp->pack_start ( *clutsDirFrame, Gtk::PACK_SHRINK, 4 ); - Gtk::Frame* fmd = Gtk::manage (new Gtk::Frame (M("PREFERENCES_METADATA"))); + Gtk::Frame* fmd = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_METADATA"))); Gtk::VBox* vbmd = Gtk::manage (new Gtk::VBox ()); - ckbTunnelMetaData = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_TUNNELMETADATA"))); + ckbTunnelMetaData = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_TUNNELMETADATA"))); vbmd->pack_start (*ckbTunnelMetaData, Gtk::PACK_SHRINK, 4); fmd->add (*vbmd); mvbpp->pack_start (*fmd, Gtk::PACK_SHRINK, 4); @@ -561,37 +562,37 @@ Gtk::Widget* Preferences::getProcParamsPanel () Gtk::Widget* Preferences::getPerformancePanel () { - Gtk::VBox* mainContainer = Gtk::manage( new Gtk::VBox () ); - mainContainer->set_spacing(4); + Gtk::VBox* mainContainer = Gtk::manage ( new Gtk::VBox () ); + mainContainer->set_spacing (4); - Gtk::Frame* fprevdemo = Gtk::manage (new Gtk::Frame (M("PREFERENCES_PREVDEMO"))); + Gtk::Frame* fprevdemo = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_PREVDEMO"))); Gtk::HBox* hbprevdemo = Gtk::manage (new Gtk::HBox (false, 4)); - Gtk::Label* lprevdemo = Gtk::manage (new Gtk::Label (M("PREFERENCES_PREVDEMO_LABEL"))); + Gtk::Label* lprevdemo = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PREVDEMO_LABEL"))); cprevdemo = Gtk::manage (new Gtk::ComboBoxText ()); - cprevdemo->append (M("PREFERENCES_PREVDEMO_FAST")); - cprevdemo->append (M("PREFERENCES_PREVDEMO_SIDECAR")); + cprevdemo->append (M ("PREFERENCES_PREVDEMO_FAST")); + cprevdemo->append (M ("PREFERENCES_PREVDEMO_SIDECAR")); cprevdemo->set_active (1); hbprevdemo->pack_start (*lprevdemo, Gtk::PACK_SHRINK); hbprevdemo->pack_start (*cprevdemo); fprevdemo->add (*hbprevdemo); mainContainer->pack_start (*fprevdemo, Gtk::PACK_SHRINK, 4); - Gtk::Frame* ftiffserialize = Gtk::manage (new Gtk::Frame (M("PREFERENCES_SERIALIZE_TIFF_READ"))); + Gtk::Frame* ftiffserialize = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_SERIALIZE_TIFF_READ"))); Gtk::HBox* htiffserialize = Gtk::manage (new Gtk::HBox (false, 4)); - ctiffserialize = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SERIALIZE_TIFF_READ_LABEL")) ); - ctiffserialize->set_tooltip_text(M("PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP")); + ctiffserialize = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SERIALIZE_TIFF_READ_LABEL")) ); + ctiffserialize->set_tooltip_text (M ("PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP")); htiffserialize->pack_start (*ctiffserialize); ftiffserialize->add (*htiffserialize); mainContainer->pack_start (*ftiffserialize, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fclut = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLUTSCACHE")) ); - Gtk::HBox* clutCacheSizeHB = Gtk::manage( new Gtk::HBox () ); - clutCacheSizeHB->set_spacing(4); - Gtk::Label* CLUTLl = Gtk::manage( new Gtk::Label (M("PREFERENCES_CLUTSCACHE_LABEL") + ":", Gtk::ALIGN_START)); - clutCacheSizeSB = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Frame* fclut = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CLUTSCACHE")) ); + Gtk::HBox* clutCacheSizeHB = Gtk::manage ( new Gtk::HBox () ); + clutCacheSizeHB->set_spacing (4); + Gtk::Label* CLUTLl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CLUTSCACHE_LABEL") + ":", Gtk::ALIGN_START)); + clutCacheSizeSB = Gtk::manage ( new Gtk::SpinButton () ); clutCacheSizeSB->set_digits (0); clutCacheSizeSB->set_increments (1, 5); - clutCacheSizeSB->set_max_length(2); // Will this be sufficient? :) + clutCacheSizeSB->set_max_length (2); // Will this be sufficient? :) #ifdef _OPENMP clutCacheSizeSB->set_range (1, 3 * omp_get_num_procs()); #else @@ -602,32 +603,32 @@ Gtk::Widget* Preferences::getPerformancePanel () fclut->add (*clutCacheSizeHB); mainContainer->pack_start (*fclut, Gtk::PACK_SHRINK, 4); - Gtk::Frame* finspect = Gtk::manage( new Gtk::Frame (M("PREFERENCES_INSPECT_LABEL")) ); - Gtk::HBox* maxIBuffersHB = Gtk::manage( new Gtk::HBox () ); - maxIBuffersHB->set_spacing(4); - maxIBuffersHB->set_tooltip_text(M("PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP")); - Gtk::Label* maxIBufferLbl = Gtk::manage( new Gtk::Label (M("PREFERENCES_INSPECT_MAXBUFFERS_LABEL") + ":", Gtk::ALIGN_START)); - maxInspectorBuffersSB = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Frame* finspect = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_INSPECT_LABEL")) ); + Gtk::HBox* maxIBuffersHB = Gtk::manage ( new Gtk::HBox () ); + maxIBuffersHB->set_spacing (4); + maxIBuffersHB->set_tooltip_text (M ("PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP")); + Gtk::Label* maxIBufferLbl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_INSPECT_MAXBUFFERS_LABEL") + ":", Gtk::ALIGN_START)); + maxInspectorBuffersSB = Gtk::manage ( new Gtk::SpinButton () ); maxInspectorBuffersSB->set_digits (0); maxInspectorBuffersSB->set_increments (1, 5); - maxInspectorBuffersSB->set_max_length(2); + maxInspectorBuffersSB->set_max_length (2); maxInspectorBuffersSB->set_range (1, 12); // ... we have to set a limit, 12 seem to be enough even for systems with tons of RAM maxIBuffersHB->pack_start (*maxIBufferLbl, Gtk::PACK_SHRINK, 0); maxIBuffersHB->pack_end (*maxInspectorBuffersSB, Gtk::PACK_SHRINK, 0); - finspect->add(*maxIBuffersHB); - mainContainer->pack_start(*finspect, Gtk::PACK_SHRINK, 4); + finspect->add (*maxIBuffersHB); + mainContainer->pack_start (*finspect, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdenoise = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NOISE")) ); - Gtk::VBox* vbdenoise = Gtk::manage( new Gtk::VBox (Gtk::PACK_SHRINK, 4) ); + Gtk::Frame* fdenoise = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_NOISE")) ); + Gtk::VBox* vbdenoise = Gtk::manage ( new Gtk::VBox (Gtk::PACK_SHRINK, 4) ); - Gtk::Label* lreloadneeded2 = Gtk::manage (new Gtk::Label (M("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); + Gtk::Label* lreloadneeded2 = Gtk::manage (new Gtk::Label (M ("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); Gtk::HBox* threadLimitHB = Gtk::manage (new Gtk::HBox (Gtk::PACK_SHRINK, 4)); - threadLimitHB->set_tooltip_text(M("PREFERENCES_RGBDTL_TOOLTIP")); - Gtk::Label* RGBDTLl = Gtk::manage( new Gtk::Label (M("PREFERENCES_RGBDTL_LABEL") + ":", Gtk::ALIGN_START)); - rgbDenoiseTreadLimitSB = Gtk::manage( new Gtk::SpinButton () ); + threadLimitHB->set_tooltip_text (M ("PREFERENCES_RGBDTL_TOOLTIP")); + Gtk::Label* RGBDTLl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_RGBDTL_LABEL") + ":", Gtk::ALIGN_START)); + rgbDenoiseTreadLimitSB = Gtk::manage ( new Gtk::SpinButton () ); rgbDenoiseTreadLimitSB->set_digits (0); rgbDenoiseTreadLimitSB->set_increments (1, 5); - rgbDenoiseTreadLimitSB->set_max_length(2); // Will this be sufficient? :) + rgbDenoiseTreadLimitSB->set_max_length (2); // Will this be sufficient? :) #ifdef _OPENMP int maxThreadNumber = omp_get_max_threads(); #else @@ -637,40 +638,40 @@ Gtk::Widget* Preferences::getPerformancePanel () threadLimitHB->pack_start (*RGBDTLl, Gtk::PACK_SHRINK, 2); threadLimitHB->pack_end (*rgbDenoiseTreadLimitSB, Gtk::PACK_SHRINK, 2); - Gtk::Label* dnlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LEVDN") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnautlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LEVAUTDN") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnautsimpllab = Gtk::manage (new Gtk::Label (M("PREFERENCES_SIMPLAUT") + ":", Gtk::ALIGN_START)); - Gtk::Label* dntilab = Gtk::manage (new Gtk::Label (M("PREFERENCES_TINB") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnwavlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_WAVLEV") + ":", Gtk::ALIGN_START)); - Gtk::Label* dnlisslab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LISS") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LEVDN") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnautlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LEVAUTDN") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnautsimpllab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SIMPLAUT") + ":", Gtk::ALIGN_START)); + Gtk::Label* dntilab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_TINB") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnwavlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_WAVLEV") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnlisslab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LISS") + ":", Gtk::ALIGN_START)); dnv = Gtk::manage (new Gtk::ComboBoxText ()); - dnv->append (M("PREFERENCES_MIN")); - dnv->append (M("PREFERENCES_SMA")); - dnv->append (M("PREFERENCES_MED")); - dnv->append (M("PREFERENCES_MAX")); + dnv->append (M ("PREFERENCES_MIN")); + dnv->append (M ("PREFERENCES_SMA")); + dnv->append (M ("PREFERENCES_MED")); + dnv->append (M ("PREFERENCES_MAX")); dnaut = Gtk::manage (new Gtk::ComboBoxText ()); - dnaut->append (M("PREFERENCES_AUTLOW")); - dnaut->append (M("PREFERENCES_AUTSTD")); + dnaut->append (M ("PREFERENCES_AUTLOW")); + dnaut->append (M ("PREFERENCES_AUTSTD")); dnautsimpl = Gtk::manage (new Gtk::ComboBoxText ()); - dnautsimpl->append (M("PREFERENCES_STDAUT")); - dnautsimpl->append (M("PREFERENCES_EXPAUT")); + dnautsimpl->append (M ("PREFERENCES_STDAUT")); + dnautsimpl->append (M ("PREFERENCES_EXPAUT")); dnliss = Gtk::manage (new Gtk::ComboBoxText ()); - dnliss->append (M("PREFERENCES_AUTLISVLOW"));//very low - dnliss->append (M("PREFERENCES_AUTLISLOW"));//low - dnliss->append (M("PREFERENCES_AUTLISSTD"));//med - dnliss->append (M("PREFERENCES_AUTLISMAX"));//max + dnliss->append (M ("PREFERENCES_AUTLISVLOW")); //very low + dnliss->append (M ("PREFERENCES_AUTLISLOW")); //low + dnliss->append (M ("PREFERENCES_AUTLISSTD")); //med + dnliss->append (M ("PREFERENCES_AUTLISMAX")); //max dnti = Gtk::manage (new Gtk::ComboBoxText ()); - dnti->append (M("PREFERENCES_TISTD")); - dnti->append (M("PREFERENCES_TIMAX")); + dnti->append (M ("PREFERENCES_TISTD")); + dnti->append (M ("PREFERENCES_TIMAX")); dnwavlev = Gtk::manage (new Gtk::ComboBoxText ()); - dnwavlev->append (M("PREFERENCES_WLZER")); - dnwavlev->append (M("PREFERENCES_WLONE")); - dnwavlev->append (M("PREFERENCES_WLTWO")); + dnwavlev->append (M ("PREFERENCES_WLZER")); + dnwavlev->append (M ("PREFERENCES_WLONE")); + dnwavlev->append (M ("PREFERENCES_WLTWO")); Gtk::Table* colon = Gtk::manage (new Gtk::Table (6, 2)); colon->attach (*dnlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); @@ -688,10 +689,10 @@ Gtk::Widget* Preferences::getPerformancePanel () vbdenoise->pack_start (*lreloadneeded2, Gtk::PACK_SHRINK); vbdenoise->pack_start (*colon, Gtk::PACK_SHRINK); - vbdenoise->pack_start(*threadLimitHB, Gtk::PACK_SHRINK); + vbdenoise->pack_start (*threadLimitHB, Gtk::PACK_SHRINK); // <--- To be hard-coded and removed once tested - cbdaubech = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_DAUB_LABEL"), Gtk::ALIGN_START)); - cbdaubech->set_tooltip_markup (M("PREFERENCES_DAUB_TOOLTIP")); + cbdaubech = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_DAUB_LABEL"), Gtk::ALIGN_START)); + cbdaubech->set_tooltip_markup (M ("PREFERENCES_DAUB_TOOLTIP")); // vbdenoise->pack_start (*cbdaubech, Gtk::PACK_SHRINK); // ---> fdenoise->add (*vbdenoise); @@ -706,10 +707,10 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::VBox* mvbcm = Gtk::manage (new Gtk::VBox ()); mvbcm->set_spacing (4); - iccDir = Gtk::manage (new Gtk::FileChooserButton (M("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - setExpandAlignProperties(iccDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(pdlabel, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + iccDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + setExpandAlignProperties (iccDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (pdlabel, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::Grid* iccdgrid = Gtk::manage (new Gtk::Grid ()); setExpandAlignProperties (iccdgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); @@ -720,56 +721,57 @@ Gtk::Widget* Preferences::getColorManagementPanel () iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); - mvbcm->pack_start(*iccdgrid, Gtk::PACK_SHRINK); + mvbcm->pack_start (*iccdgrid, Gtk::PACK_SHRINK); //------------------------- MONITOR ---------------------- - Gtk::Frame* fmonitor = Gtk::manage( new Gtk::Frame (M("PREFERENCES_MONITOR")) ); - Gtk::Grid* gmonitor = Gtk::manage( new Gtk::Grid () ); + Gtk::Frame* fmonitor = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_MONITOR")) ); + Gtk::Grid* gmonitor = Gtk::manage ( new Gtk::Grid () ); gmonitor->set_column_spacing (4); monProfile = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(monProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(mplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (monProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (mplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); monIntent = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(monIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONINTENT")+":", Gtk::ALIGN_START)); - setExpandAlignProperties(milabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (monIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONINTENT") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (milabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - monProfile->append (M("PREFERENCES_PROFILE_NONE")); + monProfile->append (M ("PREFERENCES_PROFILE_NONE")); monProfile->set_active (0); const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR); + for (const auto profile : profiles) { - if (profile.find("file:") != 0) { + if (profile.find ("file:") != 0) { monProfile->append (profile); } } // same order as the enum - monIntent->append (M("PREFERENCES_INTENT_PERCEPTUAL")); - monIntent->append (M("PREFERENCES_INTENT_RELATIVE")); - monIntent->append (M("PREFERENCES_INTENT_ABSOLUTE")); + monIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL")); + monIntent->append (M ("PREFERENCES_INTENT_RELATIVE")); + monIntent->append (M ("PREFERENCES_INTENT_ABSOLUTE")); monIntent->set_active (1); - monIntent->set_size_request(120, -1); + monIntent->set_size_request (120, -1); - monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC"))); - setExpandAlignProperties(monBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + monBPC = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CMMBPC"))); + setExpandAlignProperties (monBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); monBPC->set_active (true); //#if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 - cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_AUTOMONPROFILE"))); - setExpandAlignProperties(cbAutoMonProfile, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::autoMonProfileToggled)); + cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_AUTOMONPROFILE"))); + setExpandAlignProperties (cbAutoMonProfile, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::autoMonProfileToggled)); //#endif int row = 0; gmonitor->attach (*mplabel, 0, row, 1, 1); #if defined(__APPLE__) // monitor profile not supported on apple - Gtk::Label *osxwarn = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE_WARNOSX"), Gtk::ALIGN_START)); - setExpandAlignProperties(osxwarn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label *osxwarn = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONPROFILE_WARNOSX"), Gtk::ALIGN_START)); + setExpandAlignProperties (osxwarn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); gmonitor->attach (*osxwarn, 1, row, 1, 1); #else gmonitor->attach (*monProfile, 1, row, 1, 1); @@ -788,40 +790,42 @@ Gtk::Widget* Preferences::getColorManagementPanel () autoMonProfileToggled(); //#endif - fmonitor->add(*gmonitor); + fmonitor->add (*gmonitor); - mvbcm->pack_start(*fmonitor, Gtk::PACK_SHRINK); + mvbcm->pack_start (*fmonitor, Gtk::PACK_SHRINK); //------------------------- PRINTER ---------------------- - Gtk::Frame* fprinter = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PRINTER")) ); - Gtk::Grid* gprinter = Gtk::manage( new Gtk::Grid () ); + Gtk::Frame* fprinter = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_PRINTER")) ); + Gtk::Grid* gprinter = Gtk::manage ( new Gtk::Grid () ); gprinter->set_column_spacing (4); prtProfile = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(prtProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* pplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTPROFILE") + ":")); - setExpandAlignProperties(pplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (prtProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pplabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PRTPROFILE") + ":")); + setExpandAlignProperties (pplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); prtIntent = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(prtIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - Gtk::Label* pilabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTINTENT")+":")); - setExpandAlignProperties(pilabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (prtIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pilabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PRTINTENT") + ":")); + setExpandAlignProperties (pilabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - prtProfile->append (M("PREFERENCES_PROFILE_NONE")); + prtProfile->append (M ("PREFERENCES_PROFILE_NONE")); prtProfile->set_active (0); const std::vector prtprofiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::PRINTER); - for (const auto prtprofile : prtprofiles) + + for (const auto prtprofile : prtprofiles) { prtProfile->append (prtprofile); + } // same order as the enum - prtIntent->append (M("PREFERENCES_INTENT_PERCEPTUAL")); - prtIntent->append (M("PREFERENCES_INTENT_RELATIVE")); - prtIntent->append (M("PREFERENCES_INTENT_ABSOLUTE")); + prtIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL")); + prtIntent->append (M ("PREFERENCES_INTENT_RELATIVE")); + prtIntent->append (M ("PREFERENCES_INTENT_ABSOLUTE")); prtIntent->set_active (1); - prtBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC"))); - setExpandAlignProperties(prtBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + prtBPC = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CMMBPC"))); + setExpandAlignProperties (prtBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); prtBPC->set_active (true); row = 0; @@ -837,52 +841,52 @@ Gtk::Widget* Preferences::getColorManagementPanel () autoMonProfileToggled(); //#endif - fprinter->add(*gprinter); + fprinter->add (*gprinter); - mvbcm->pack_start(*fprinter, Gtk::PACK_SHRINK); + mvbcm->pack_start (*fprinter, Gtk::PACK_SHRINK); //------------------------- CIECAM ---------------------- - Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); view = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - view->append (M("PREFERENCES_D50")); - view->append (M("PREFERENCES_D55")); - view->append (M("PREFERENCES_D60")); - view->append (M("PREFERENCES_D65")); - view->append (M("PREFERENCES_BLACKBODY")); - view->append (M("PREFERENCES_FLUOF2")); - view->append (M("PREFERENCES_FLUOF7")); - view->append (M("PREFERENCES_FLUOF11")); + setExpandAlignProperties (view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + view->append (M ("PREFERENCES_D50")); + view->append (M ("PREFERENCES_D55")); + view->append (M ("PREFERENCES_D60")); + view->append (M ("PREFERENCES_D65")); + view->append (M ("PREFERENCES_BLACKBODY")); + view->append (M ("PREFERENCES_FLUOF2")); + view->append (M ("PREFERENCES_FLUOF7")); + view->append (M ("PREFERENCES_FLUOF11")); - Gtk::Label* greylab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREY") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(greylab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Label* greylab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREY") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (greylab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); grey = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(grey, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - grey->append (M("PREFERENCES_GREY05")); - grey->append (M("PREFERENCES_GREY10")); - grey->append (M("PREFERENCES_GREY15")); - grey->append (M("PREFERENCES_GREY18")); - grey->append (M("PREFERENCES_GREY23")); - grey->append (M("PREFERENCES_GREY30")); - grey->append (M("PREFERENCES_GREY40")); + setExpandAlignProperties (grey, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + grey->append (M ("PREFERENCES_GREY05")); + grey->append (M ("PREFERENCES_GREY10")); + grey->append (M ("PREFERENCES_GREY15")); + grey->append (M ("PREFERENCES_GREY18")); + grey->append (M ("PREFERENCES_GREY23")); + grey->append (M ("PREFERENCES_GREY30")); + grey->append (M ("PREFERENCES_GREY40")); - Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); greySc = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - greySc->append (M("PREFERENCES_GREYSCA")); - greySc->append (M("PREFERENCES_GREYSC18")); + setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + greySc->append (M ("PREFERENCES_GREYSCA")); + greySc->append (M ("PREFERENCES_GREYSC18")); - Gtk::Frame* fcielab = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CIEART_FRAME")) ); - setExpandAlignProperties(fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) ); + setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* colo = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(colo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* lreloadneeded1 = Gtk::manage (new Gtk::Label (M("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); - setExpandAlignProperties(lreloadneeded1, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties (colo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Label* lreloadneeded1 = Gtk::manage (new Gtk::Label (M ("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); + setExpandAlignProperties (lreloadneeded1, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); colo->attach (*lreloadneeded1, 0, 0, 2, 1); colo->attach (*viewlab, 0, 1, 1, 1); colo->attach (*view, 1, 1, 1, 1); @@ -890,10 +894,10 @@ Gtk::Widget* Preferences::getColorManagementPanel () colo->attach (*grey, 1, 2, 1, 1); colo->attach (*greySclab, 0, 3, 1, 1); colo->attach (*greySc, 1, 3, 1, 1); - cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CIEART_LABEL"))); - setExpandAlignProperties(cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CIEART_LABEL"))); + setExpandAlignProperties (cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); colo->attach (*cbciecamfloat, 0, 4, 2, 1); - cbciecamfloat->set_tooltip_markup (M("PREFERENCES_CIEART_TOOLTIP")); + cbciecamfloat->set_tooltip_markup (M ("PREFERENCES_CIEART_TOOLTIP")); fcielab->add (*colo); mvbcm->pack_start (*fcielab, Gtk::PACK_SHRINK, 4); @@ -904,96 +908,96 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::Widget* Preferences::getGeneralPanel () { - Gtk::Grid* mvbsd = Gtk::manage( new Gtk::Grid () ); - mvbsd->set_column_spacing(4); - mvbsd->set_row_spacing(4); + Gtk::Grid* mvbsd = Gtk::manage ( new Gtk::Grid () ); + mvbsd->set_column_spacing (4); + mvbsd->set_row_spacing (4); - Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M("PREFERENCES_WORKFLOW"))); - setExpandAlignProperties(fworklflow, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_WORKFLOW"))); + setExpandAlignProperties (fworklflow, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* workflowGrid = Gtk::manage (new Gtk::Grid()); - workflowGrid->set_column_spacing(4); - workflowGrid->set_row_spacing(4); - setExpandAlignProperties(workflowGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + workflowGrid->set_column_spacing (4); + workflowGrid->set_row_spacing (4); + setExpandAlignProperties (workflowGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_EDITORLAYOUT") + ":")); - setExpandAlignProperties(flayoutlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_EDITORLAYOUT") + ":")); + setExpandAlignProperties (flayoutlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); editorLayout = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(editorLayout, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - editorLayout->append (M("PREFERENCES_SINGLETAB")); - editorLayout->append (M("PREFERENCES_SINGLETABVERTAB")); - editorLayout->append (M("PREFERENCES_MULTITAB")); - editorLayout->append (M("PREFERENCES_MULTITABDUALMON")); + setExpandAlignProperties (editorLayout, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + editorLayout->append (M ("PREFERENCES_SINGLETAB")); + editorLayout->append (M ("PREFERENCES_SINGLETABVERTAB")); + editorLayout->append (M ("PREFERENCES_MULTITAB")); + editorLayout->append (M ("PREFERENCES_MULTITABDUALMON")); editorLayout->set_active (2); - Gtk::CellRendererText* cellRenderer = dynamic_cast(editorLayout->get_first_cell()); + Gtk::CellRendererText* cellRenderer = dynamic_cast (editorLayout->get_first_cell()); cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; cellRenderer->property_ellipsize_set() = true; - editorLayout->signal_changed().connect (sigc::mem_fun(*this, &Preferences::layoutComboChanged)); + editorLayout->signal_changed().connect (sigc::mem_fun (*this, &Preferences::layoutComboChanged)); layoutComboChanged(); // update the tooltip - Gtk::Label* lNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - setExpandAlignProperties(lNextStart, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*flayoutlab, Gtk::POS_LEFT, 1, 1); - workflowGrid->attach_next_to(*editorLayout, *flayoutlab, Gtk::POS_RIGHT, 1, 1); - workflowGrid->attach_next_to(*lNextStart, *editorLayout, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* lNextStart = Gtk::manage ( new Gtk::Label (Glib::ustring ("(") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + setExpandAlignProperties (lNextStart, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*flayoutlab, Gtk::POS_LEFT, 1, 1); + workflowGrid->attach_next_to (*editorLayout, *flayoutlab, Gtk::POS_RIGHT, 1, 1); + workflowGrid->attach_next_to (*lNextStart, *editorLayout, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M("PREFERENCES_CURVEBBOXPOS") + ":")); - setExpandAlignProperties(curveBBoxPosL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M ("PREFERENCES_CURVEBBOXPOS") + ":")); + setExpandAlignProperties (curveBBoxPosL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); curveBBoxPosC = Gtk::manage (new Gtk::ComboBoxText ()); - setExpandAlignProperties(curveBBoxPosC, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_ABOVE")); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_RIGHT")); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_BELOW")); - curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_LEFT")); + setExpandAlignProperties (curveBBoxPosC, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_ABOVE")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_RIGHT")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_BELOW")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_LEFT")); curveBBoxPosC->set_active (1); - Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")")); - setExpandAlignProperties(curveBBoxPosRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1); + Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring ("(") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")")); + setExpandAlignProperties (curveBBoxPosRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1); - ckbHistogramPositionLeft = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); - setExpandAlignProperties(ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHistogramWorking = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMWORKING")) ); - setExpandAlignProperties(ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHistogramWorking->set_tooltip_markup (M("PREFERENCES_HISTOGRAM_TOOLTIP")); - workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); + ckbHistogramPositionLeft = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); + setExpandAlignProperties (ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHistogramWorking = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMWORKING")) ); + setExpandAlignProperties (ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHistogramWorking->set_tooltip_markup (M ("PREFERENCES_HISTOGRAM_TOOLTIP")); + workflowGrid->attach_next_to (*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); - ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); - setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); - ckbShowFilmStripToolBar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); - setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); - workflowGrid->attach_next_to(*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1); + ckbFileBrowserToolbarSingleRow = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); + setExpandAlignProperties (ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); + ckbShowFilmStripToolBar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); + setExpandAlignProperties (ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); + workflowGrid->attach_next_to (*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1); - Gtk::Label* hb4label = Gtk::manage( new Gtk::Label (M("PREFERENCES_TP_LABEL")) ); - setExpandAlignProperties(hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbHideTPVScrollbar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_VSCROLLBAR")) ); - setExpandAlignProperties(ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - ckbUseIconNoText = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_USEICONORTEXT")) ); - setExpandAlignProperties(ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - workflowGrid->attach_next_to(*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1); - workflowGrid->attach_next_to(*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1); - workflowGrid->attach_next_to(*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* hb4label = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_TP_LABEL")) ); + setExpandAlignProperties (hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHideTPVScrollbar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_VSCROLLBAR")) ); + setExpandAlignProperties (ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbUseIconNoText = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_USEICONORTEXT")) ); + setExpandAlignProperties (ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1); + workflowGrid->attach_next_to (*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1); fworklflow->add (*workflowGrid); - mvbsd->attach_next_to(*fworklflow, Gtk::POS_TOP, 2, 1); + mvbsd->attach_next_to (*fworklflow, Gtk::POS_TOP, 2, 1); // --------------------------------------------- - Gtk::Frame* flang = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTLANG")) ); - setExpandAlignProperties(flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - Gtk::Grid* langGrid = Gtk::manage( new Gtk::Grid() ); - langGrid->set_column_spacing(4); - langGrid->set_row_spacing(4); - setExpandAlignProperties(langGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + Gtk::Frame* flang = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTLANG")) ); + setExpandAlignProperties (flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* langGrid = Gtk::manage ( new Gtk::Grid() ); + langGrid->set_column_spacing (4); + langGrid->set_row_spacing (4); + setExpandAlignProperties (langGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - ckbLangAutoDetect = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_LANGAUTODETECT")) ); - setExpandAlignProperties(ckbLangAutoDetect, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbLangAutoDetect = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_LANGAUTODETECT")) ); + setExpandAlignProperties (ckbLangAutoDetect, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - Gtk::Label* langlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTLANG") + ":") ); - setExpandAlignProperties(langlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - languages = Gtk::manage( new Gtk::ComboBoxText () ); - setExpandAlignProperties(languages, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* langlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTLANG") + ":") ); + setExpandAlignProperties (langlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + languages = Gtk::manage ( new Gtk::ComboBoxText () ); + setExpandAlignProperties (languages, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); std::vector langs; parseDir (argv0 + "/languages", langs, ""); @@ -1004,214 +1008,216 @@ Gtk::Widget* Preferences::getGeneralPanel () } } - Gtk::Label* langw = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - setExpandAlignProperties(langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - langGrid->attach_next_to(*ckbLangAutoDetect, Gtk::POS_LEFT, 3, 1); - langGrid->attach_next_to(*langlab, *ckbLangAutoDetect, Gtk::POS_BOTTOM, 1, 1); - langGrid->attach_next_to(*languages, *langlab, Gtk::POS_RIGHT, 1, 1); - langGrid->attach_next_to(*langw, *languages, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* langw = Gtk::manage ( new Gtk::Label (Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + setExpandAlignProperties (langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + langGrid->attach_next_to (*ckbLangAutoDetect, Gtk::POS_LEFT, 3, 1); + langGrid->attach_next_to (*langlab, *ckbLangAutoDetect, Gtk::POS_BOTTOM, 1, 1); + langGrid->attach_next_to (*languages, *langlab, Gtk::POS_RIGHT, 1, 1); + langGrid->attach_next_to (*langw, *languages, Gtk::POS_RIGHT, 1, 1); flang->add (*langGrid); - mvbsd->attach_next_to(*flang, *fworklflow, Gtk::POS_BOTTOM, 2, 1); + mvbsd->attach_next_to (*flang, *fworklflow, Gtk::POS_BOTTOM, 2, 1); // --------------------------------------------- - Gtk::Frame* ftheme = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTTHEME")) ); - setExpandAlignProperties(ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - Gtk::Grid* themeGrid = Gtk::manage( new Gtk::Grid() ); - themeGrid->set_column_spacing(4); - themeGrid->set_row_spacing(4); - setExpandAlignProperties(themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Frame* ftheme = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTTHEME")) ); + setExpandAlignProperties (ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* themeGrid = Gtk::manage ( new Gtk::Grid() ); + themeGrid->set_column_spacing (4); + themeGrid->set_row_spacing (4); + setExpandAlignProperties (themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* themelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTTHEME") + ":") ); - setExpandAlignProperties(themelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - theme = Gtk::manage( new Gtk::ComboBoxText () ); - setExpandAlignProperties(theme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* themelab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTTHEME") + ":") ); + setExpandAlignProperties (themelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + theme = Gtk::manage ( new Gtk::ComboBoxText () ); + setExpandAlignProperties (theme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); theme->set_active (0); - parseThemeDir (Glib::build_filename(argv0, "themes")); + parseThemeDir (Glib::build_filename (argv0, "themes")); for (size_t i = 0; i < themeFNames.size(); i++) { - theme->append (themeFNames.at(i).shortFName); + theme->append (themeFNames.at (i).shortFName); } - themeGrid->attach_next_to(*themelab, Gtk::POS_LEFT, 1, 1); - themeGrid->attach_next_to(*theme, *themelab, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*themelab, Gtk::POS_LEFT, 1, 1); + themeGrid->attach_next_to (*theme, *themelab, Gtk::POS_RIGHT, 1, 1); + + Gtk::Label* fontlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTFONT")) ); + setExpandAlignProperties (fontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + fontButton = Gtk::manage ( new Gtk::FontButton ()); + setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + fontButton->set_use_size (true); - Gtk::Label* fontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT")) ); - setExpandAlignProperties(fontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - fontButton = Gtk::manage( new Gtk::FontButton ()); - setExpandAlignProperties(fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - fontButton->set_use_size(true); if (options.fontFamily == "default") { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", options.fontFamily, options.fontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.fontFamily, options.fontSize)); } - themeGrid->attach_next_to(*fontlab, *theme, Gtk::POS_RIGHT, 1, 1); - themeGrid->attach_next_to(*fontButton, *fontlab, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*fontlab, *theme, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*fontButton, *fontlab, Gtk::POS_RIGHT, 1, 1); + + Gtk::Label* cpfontlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTFONT_COLPICKER") + ":") ); + setExpandAlignProperties (cpfontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + colorPickerFontButton = Gtk::manage ( new Gtk::FontButton ()); + setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + colorPickerFontButton->set_use_size (true); - Gtk::Label* cpfontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT_COLPICKER") + ":") ); - setExpandAlignProperties(cpfontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - colorPickerFontButton = Gtk::manage( new Gtk::FontButton ()); - setExpandAlignProperties(fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - colorPickerFontButton->set_use_size(true); if (options.fontFamily == "default") { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", options.CPFontFamily, options.CPFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize)); } - themeGrid->attach_next_to(*cpfontlab, *fontButton, Gtk::POS_RIGHT, 1, 1); - themeGrid->attach_next_to(*colorPickerFontButton, *cpfontlab, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*cpfontlab, *fontButton, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*colorPickerFontButton, *cpfontlab, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* cutOverlayLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":") ); - setExpandAlignProperties(cutOverlayLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - butCropCol = Gtk::manage( new Gtk::ColorButton() ); - setExpandAlignProperties(butCropCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - butCropCol->set_use_alpha(true); - themeGrid->attach_next_to(*cutOverlayLabel, *themelab, Gtk::POS_BOTTOM, 1, 1); - themeGrid->attach_next_to(*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* cutOverlayLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUTOVERLAYBRUSH") + ":") ); + setExpandAlignProperties (cutOverlayLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + butCropCol = Gtk::manage ( new Gtk::ColorButton() ); + setExpandAlignProperties (butCropCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + butCropCol->set_use_alpha (true); + themeGrid->attach_next_to (*cutOverlayLabel, *themelab, Gtk::POS_BOTTOM, 1, 1); + themeGrid->attach_next_to (*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* navGuideLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_NAVGUIDEBRUSH") + ":") ); - setExpandAlignProperties(navGuideLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - butNavGuideCol = Gtk::manage( new Gtk::ColorButton() ); - setExpandAlignProperties(butNavGuideCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - butNavGuideCol->set_use_alpha(true); - themeGrid->attach_next_to(*navGuideLabel, *butCropCol, Gtk::POS_RIGHT, 2, 1); - themeGrid->attach_next_to(*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1); + Gtk::Label* navGuideLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_NAVGUIDEBRUSH") + ":") ); + setExpandAlignProperties (navGuideLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + butNavGuideCol = Gtk::manage ( new Gtk::ColorButton() ); + setExpandAlignProperties (butNavGuideCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + butNavGuideCol->set_use_alpha (true); + themeGrid->attach_next_to (*navGuideLabel, *butCropCol, Gtk::POS_RIGHT, 2, 1); + themeGrid->attach_next_to (*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1); ftheme->add (*themeGrid); - mvbsd->attach_next_to(*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1); + mvbsd->attach_next_to (*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1); // --------------------------------------------- - Gtk::Frame* fclip = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLIPPINGIND"))); - setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Grid* clipGrid = Gtk::manage( new Gtk::Grid() ); - clipGrid->set_column_spacing(4); - clipGrid->set_row_spacing(4); - setExpandAlignProperties(clipGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Frame* fclip = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CLIPPINGIND"))); + setExpandAlignProperties (fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* clipGrid = Gtk::manage ( new Gtk::Grid() ); + clipGrid->set_column_spacing (4); + clipGrid->set_row_spacing (4); + setExpandAlignProperties (clipGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* hll = Gtk::manage( new Gtk::Label (M("PREFERENCES_HLTHRESHOLD") + ": ")); - setExpandAlignProperties(hll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - hlThresh = Gtk::manage( new Gtk::SpinButton () ); - setExpandAlignProperties(hlThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + Gtk::Label* hll = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_HLTHRESHOLD") + ": ")); + setExpandAlignProperties (hll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + hlThresh = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (hlThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); hlThresh->set_digits (0); hlThresh->set_increments (1, 10); hlThresh->set_range (0, 255); - clipGrid->attach_next_to(*hll, Gtk::POS_LEFT, 1, 1); - clipGrid->attach_next_to(*hlThresh, *hll, Gtk::POS_RIGHT, 1, 1); + clipGrid->attach_next_to (*hll, Gtk::POS_LEFT, 1, 1); + clipGrid->attach_next_to (*hlThresh, *hll, Gtk::POS_RIGHT, 1, 1); - Gtk::Label* shl = Gtk::manage( new Gtk::Label (M("PREFERENCES_SHTHRESHOLD") + ": ") ); - setExpandAlignProperties(shl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - shThresh = Gtk::manage( new Gtk::SpinButton () ); - setExpandAlignProperties(shThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + Gtk::Label* shl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SHTHRESHOLD") + ": ") ); + setExpandAlignProperties (shl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + shThresh = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (shThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); shThresh->show (); shThresh->set_digits (0); shThresh->set_increments (1, 10); shThresh->set_range (0, 255); - clipGrid->attach_next_to(*shl, *hll, Gtk::POS_BOTTOM, 1, 1); - clipGrid->attach_next_to(*shThresh, *shl, Gtk::POS_RIGHT, 1, 1); + clipGrid->attach_next_to (*shl, *hll, Gtk::POS_BOTTOM, 1, 1); + clipGrid->attach_next_to (*shThresh, *shl, Gtk::POS_RIGHT, 1, 1); fclip->add (*clipGrid); - mvbsd->attach_next_to(*fclip, *ftheme, Gtk::POS_BOTTOM, 1, 1); + mvbsd->attach_next_to (*fclip, *ftheme, Gtk::POS_BOTTOM, 1, 1); // --------------------------------------------- - Gtk::Frame* fnav = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NAVIGATIONFRAME")) ); - setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Grid* navigationGrid = Gtk::manage( new Gtk::Grid() ); - navigationGrid->set_column_spacing(4); - navigationGrid->set_row_spacing(4); - setExpandAlignProperties(fclip, false, false, Gtk::ALIGN_START, Gtk::ALIGN_FILL); + Gtk::Frame* fnav = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_NAVIGATIONFRAME")) ); + setExpandAlignProperties (fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* navigationGrid = Gtk::manage ( new Gtk::Grid() ); + navigationGrid->set_column_spacing (4); + navigationGrid->set_row_spacing (4); + setExpandAlignProperties (fclip, false, false, Gtk::ALIGN_START, Gtk::ALIGN_FILL); - Gtk::Label* panFactorLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START)); - setExpandAlignProperties(panFactorLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - panFactor = Gtk::manage( new Gtk::SpinButton () ); - setExpandAlignProperties(panFactor, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + Gtk::Label* panFactorLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (panFactorLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + panFactor = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (panFactor, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); panFactor->set_digits (0); panFactor->set_increments (1, 5); panFactor->set_range (1, 10); - navigationGrid->attach_next_to(*panFactorLabel, Gtk::POS_LEFT, 1, 1); - navigationGrid->attach_next_to(*panFactor, *panFactorLabel, Gtk::POS_RIGHT, 1, 1); + navigationGrid->attach_next_to (*panFactorLabel, Gtk::POS_LEFT, 1, 1); + navigationGrid->attach_next_to (*panFactor, *panFactorLabel, Gtk::POS_RIGHT, 1, 1); - rememberZoomPanCheckbutton = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_REMEMBERZOOMPAN")) ); - setExpandAlignProperties(rememberZoomPanCheckbutton, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); - rememberZoomPanCheckbutton->set_tooltip_text(M("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP")); + rememberZoomPanCheckbutton = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_REMEMBERZOOMPAN")) ); + setExpandAlignProperties (rememberZoomPanCheckbutton, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + rememberZoomPanCheckbutton->set_tooltip_text (M ("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP")); - navigationGrid->attach_next_to(*rememberZoomPanCheckbutton, *panFactorLabel, Gtk::POS_BOTTOM, 2, 1); + navigationGrid->attach_next_to (*rememberZoomPanCheckbutton, *panFactorLabel, Gtk::POS_BOTTOM, 2, 1); fnav->add (*navigationGrid); - mvbsd->attach_next_to(*fnav, *fclip, Gtk::POS_RIGHT, 1, 1); + mvbsd->attach_next_to (*fnav, *fclip, Gtk::POS_RIGHT, 1, 1); // --------------------------------------------- - Gtk::Frame* fdg = Gtk::manage( new Gtk::Frame (M("PREFERENCES_EXTERNALEDITOR")) ); - setExpandAlignProperties(fdg, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Grid* externaleditorGrid = Gtk::manage( new Gtk::Grid() ); - externaleditorGrid->set_column_spacing(4); - externaleditorGrid->set_row_spacing(4); - setExpandAlignProperties(externaleditorGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Frame* fdg = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_EXTERNALEDITOR")) ); + setExpandAlignProperties (fdg, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* externaleditorGrid = Gtk::manage ( new Gtk::Grid() ); + externaleditorGrid->set_column_spacing (4); + externaleditorGrid->set_row_spacing (4); + setExpandAlignProperties (externaleditorGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - edOther = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_EDITORCMDLINE") + ":")); - setExpandAlignProperties(edOther, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - editorToSendTo = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(editorToSendTo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + edOther = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_EDITORCMDLINE") + ":")); + setExpandAlignProperties (edOther, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + editorToSendTo = Gtk::manage ( new Gtk::Entry () ); + setExpandAlignProperties (editorToSendTo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); Gtk::RadioButton::Group ge = edOther->get_group(); #ifdef __APPLE__ - edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); - setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + edGimp = Gtk::manage ( new Gtk::RadioButton ("GIMP") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); edGimp->set_group (ge); - externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 2, 1); - edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":")); - setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); + edPS = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_PSPATH") + ":")); + setExpandAlignProperties (edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + psDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); edPS->set_group (ge); - externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); + externaleditorGrid->attach_next_to (*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #elif defined WIN32 - edGimp = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_GIMPPATH") + ":") ); - setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - gimpDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - setExpandAlignProperties(gimpDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 1, 1); - externaleditorGrid->attach_next_to(*gimpDir, *edGimp, Gtk::POS_RIGHT, 1, 1); + edGimp = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_GIMPPATH") + ":") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + gimpDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (gimpDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 1, 1); + externaleditorGrid->attach_next_to (*gimpDir, *edGimp, Gtk::POS_RIGHT, 1, 1); edGimp->set_group (ge); - edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":") ); - setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); + edPS = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_PSPATH") + ":") ); + setExpandAlignProperties (edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + psDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); edPS->set_group (ge); - externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); + externaleditorGrid->attach_next_to (*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #else - edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); - setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1); + edGimp = Gtk::manage ( new Gtk::RadioButton ("GIMP") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 2, 1); edGimp->set_group (ge); - externaleditorGrid->attach_next_to(*edOther, *edGimp, Gtk::POS_BOTTOM, 1, 1); - externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); + externaleditorGrid->attach_next_to (*edOther, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #endif fdg->add (*externaleditorGrid); - mvbsd->attach_next_to(*fdg, *fclip, Gtk::POS_BOTTOM, 2, 1); + mvbsd->attach_next_to (*fdg, *fclip, Gtk::POS_BOTTOM, 2, 1); - langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled)); - tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) ); - fconn = fontButton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::fontChanged) ); - cpfconn = colorPickerFontButton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::cpFontChanged) ); + langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::langAutoDetectToggled)); + tconn = theme->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::themeChanged) ); + fconn = fontButton->signal_font_set().connect ( sigc::mem_fun (*this, &Preferences::fontChanged) ); + cpfconn = colorPickerFontButton->signal_font_set().connect ( sigc::mem_fun (*this, &Preferences::cpFontChanged) ); return mvbsd; } @@ -1219,29 +1225,29 @@ Gtk::Widget* Preferences::getGeneralPanel () Gtk::Widget* Preferences::getFileBrowserPanel () { - Gtk::VBox* mvbfb = Gtk::manage( new Gtk::VBox () ); + Gtk::VBox* mvbfb = Gtk::manage ( new Gtk::VBox () ); - Gtk::Frame* fsd = Gtk::manage( new Gtk::Frame (M("PREFERENCES_STARTUPIMDIR")) ); + Gtk::Frame* fsd = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_STARTUPIMDIR")) ); - sdcurrent = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRSOFTWARE")) ); - sdlast = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRLAST")) ); - sdhome = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRHOME")) ); - sdother = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIROTHER") + ": ") ); - startupdir = Gtk::manage( new Gtk::Entry () ); + sdcurrent = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRSOFTWARE")) ); + sdlast = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRLAST")) ); + sdhome = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRHOME")) ); + sdother = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIROTHER") + ": ") ); + startupdir = Gtk::manage ( new Gtk::Entry () ); - Gtk::Button* sdselect = Gtk::manage( new Gtk::Button () ); - sdselect->set_image (*Gtk::manage(new RTImage ("gtk-open.png"))); + Gtk::Button* sdselect = Gtk::manage ( new Gtk::Button () ); + sdselect->set_image (*Gtk::manage (new RTImage ("gtk-open.png"))); Gtk::RadioButton::Group opts = sdcurrent->get_group(); sdlast->set_group (opts); sdhome->set_group (opts); sdother->set_group (opts); - Gtk::VBox* vbsd = Gtk::manage( new Gtk::VBox () ); + Gtk::VBox* vbsd = Gtk::manage ( new Gtk::VBox () ); vbsd->pack_start (*sdcurrent, Gtk::PACK_SHRINK, 0); vbsd->pack_start (*sdlast, Gtk::PACK_SHRINK, 0); vbsd->pack_start (*sdhome, Gtk::PACK_SHRINK, 0); - Gtk::HBox* otherbox = Gtk::manage( new Gtk::HBox () ); + Gtk::HBox* otherbox = Gtk::manage ( new Gtk::HBox () ); otherbox->pack_start (*sdother, Gtk::PACK_SHRINK); otherbox->pack_start (*startupdir); otherbox->pack_end (*sdselect, Gtk::PACK_SHRINK, 4); @@ -1250,29 +1256,29 @@ Gtk::Widget* Preferences::getFileBrowserPanel () fsd->add (*vbsd); mvbfb->pack_start (*fsd, Gtk::PACK_SHRINK, 4); - sdselect->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::selectStartupDir) ); + sdselect->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::selectStartupDir) ); //--- - Gtk::Frame* fro = Gtk::manage( new Gtk::Frame (M("PREFERENCES_FBROWSEROPTS")) ); - showDateTime = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWDATETIME")) ); - showBasicExif = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWBASICEXIF")) ); - showExpComp = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWEXPOSURECOMPENSATION")) ); - Gtk::VBox* vbro = Gtk::manage( new Gtk::VBox () ); - Gtk::HBox* hbro1 = Gtk::manage( new Gtk::HBox () ); - Gtk::HBox* hbro0 = Gtk::manage( new Gtk::HBox () ); - overlayedFileNames = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERLAY_FILENAMES")) ); - filmStripOverlayedFileNames = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP")) ); - sameThumbSize = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT")) ); - sameThumbSize->set_tooltip_text(M("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT")); - ckbInternalThumbIfUntouched = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_INTERNALTHUMBIFUNTOUCHED"))); + Gtk::Frame* fro = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_FBROWSEROPTS")) ); + showDateTime = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWDATETIME")) ); + showBasicExif = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWBASICEXIF")) ); + showExpComp = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWEXPOSURECOMPENSATION")) ); + Gtk::VBox* vbro = Gtk::manage ( new Gtk::VBox () ); + Gtk::HBox* hbro1 = Gtk::manage ( new Gtk::HBox () ); + Gtk::HBox* hbro0 = Gtk::manage ( new Gtk::HBox () ); + overlayedFileNames = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERLAY_FILENAMES")) ); + filmStripOverlayedFileNames = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP")) ); + sameThumbSize = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT")) ); + sameThumbSize->set_tooltip_text (M ("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT")); + ckbInternalThumbIfUntouched = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_INTERNALTHUMBIFUNTOUCHED"))); vbro->pack_start (*showDateTime, Gtk::PACK_SHRINK, 0); - Gtk::Label* dflab = Gtk::manage( new Gtk::Label (M("PREFERENCES_DATEFORMAT") + ":", Gtk::ALIGN_START)); - dateformat = Gtk::manage( new Gtk::Entry () ); - dateformat->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); - dflab->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); + Gtk::Label* dflab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_DATEFORMAT") + ":", Gtk::ALIGN_START)); + dateformat = Gtk::manage ( new Gtk::Entry () ); + dateformat->set_tooltip_markup (M ("PREFERENCES_DATEFORMATHINT")); + dflab->set_tooltip_markup (M ("PREFERENCES_DATEFORMATHINT")); hbro0->pack_start (*dflab, Gtk::PACK_SHRINK, 4); hbro0->pack_start (*dateformat, Gtk::PACK_SHRINK, 0); @@ -1285,9 +1291,9 @@ Gtk::Widget* Preferences::getFileBrowserPanel () vbro->pack_start (*sameThumbSize, Gtk::PACK_SHRINK, 0); vbro->pack_start (*ckbInternalThumbIfUntouched, Gtk::PACK_SHRINK, 0); - Gtk::HBox* hbrecent = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* labrecent = Gtk::manage( new Gtk::Label (M("PREFERENCES_MAXRECENTFOLDERS") + ":") ); - maxRecentFolders = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hbrecent = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* labrecent = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_MAXRECENTFOLDERS") + ":") ); + maxRecentFolders = Gtk::manage ( new Gtk::SpinButton () ); hbrecent->pack_start (*labrecent, Gtk::PACK_SHRINK, 4); hbrecent->pack_start (*maxRecentFolders, Gtk::PACK_SHRINK, 4); maxRecentFolders->set_digits (0); @@ -1298,13 +1304,13 @@ Gtk::Widget* Preferences::getFileBrowserPanel () fro->add (*vbro); - Gtk::Frame* frmnu = Gtk::manage( new Gtk::Frame (M("PREFERENCES_MENUOPTIONS")) ); - ckbmenuGroupRank = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPRANK")) ); - ckbmenuGroupLabel = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPLABEL")) ); - ckbmenuGroupFileOperations = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPFILEOPERATIONS")) ); - ckbmenuGroupProfileOperations = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPPROFILEOPERATIONS")) ); - ckbmenuGroupExtProg = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPEXTPROGS")) ); - Gtk::VBox* vbmnu = Gtk::manage( new Gtk::VBox () ); + Gtk::Frame* frmnu = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_MENUOPTIONS")) ); + ckbmenuGroupRank = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPRANK")) ); + ckbmenuGroupLabel = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPLABEL")) ); + ckbmenuGroupFileOperations = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPFILEOPERATIONS")) ); + ckbmenuGroupProfileOperations = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPPROFILEOPERATIONS")) ); + ckbmenuGroupExtProg = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPEXTPROGS")) ); + Gtk::VBox* vbmnu = Gtk::manage ( new Gtk::VBox () ); vbmnu->pack_start (*ckbmenuGroupRank, Gtk::PACK_SHRINK, 0); vbmnu->pack_start (*ckbmenuGroupLabel, Gtk::PACK_SHRINK, 0); @@ -1315,27 +1321,27 @@ Gtk::Widget* Preferences::getFileBrowserPanel () frmnu->add (*vbmnu); - Gtk::Frame* fre = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PARSEDEXT")) ); - Gtk::VBox* vbre = Gtk::manage( new Gtk::VBox () ); - Gtk::HBox* hb0 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* elab = Gtk::manage( new Gtk::Label (M("PREFERENCES_PARSEDEXTADD") + ":") ); + Gtk::Frame* fre = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_PARSEDEXT")) ); + Gtk::VBox* vbre = Gtk::manage ( new Gtk::VBox () ); + Gtk::HBox* hb0 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* elab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_PARSEDEXTADD") + ":") ); hb0->pack_start (*elab, Gtk::PACK_SHRINK, 4); - extension = Gtk::manage( new Gtk::Entry () ); - extension->set_width_chars(5); - extension->set_max_width_chars(5); + extension = Gtk::manage ( new Gtk::Entry () ); + extension->set_width_chars (5); + extension->set_max_width_chars (5); hb0->pack_start (*extension); - addExt = Gtk::manage( new Gtk::Button () ); - delExt = Gtk::manage( new Gtk::Button () ); - moveExtUp = Gtk::manage( new Gtk::Button () ); - moveExtDown = Gtk::manage( new Gtk::Button () ); - addExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTADDHINT")); - delExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTDELHINT")); - moveExtUp->set_tooltip_text (M("PREFERENCES_PARSEDEXTUPHINT")); - moveExtDown->set_tooltip_text (M("PREFERENCES_PARSEDEXTDOWNHINT")); - Gtk::Image* addExtImg = Gtk::manage( new RTImage ("list-add-small.png") ); - Gtk::Image* delExtImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); - Gtk::Image* moveExtUpImg = Gtk::manage( new RTImage ("arrow-up-small.png") ); - Gtk::Image* moveExtDownImg = Gtk::manage( new RTImage ("arrow-down-small.png") ); + addExt = Gtk::manage ( new Gtk::Button () ); + delExt = Gtk::manage ( new Gtk::Button () ); + moveExtUp = Gtk::manage ( new Gtk::Button () ); + moveExtDown = Gtk::manage ( new Gtk::Button () ); + addExt->set_tooltip_text (M ("PREFERENCES_PARSEDEXTADDHINT")); + delExt->set_tooltip_text (M ("PREFERENCES_PARSEDEXTDELHINT")); + moveExtUp->set_tooltip_text (M ("PREFERENCES_PARSEDEXTUPHINT")); + moveExtDown->set_tooltip_text (M ("PREFERENCES_PARSEDEXTDOWNHINT")); + Gtk::Image* addExtImg = Gtk::manage ( new RTImage ("list-add-small.png") ); + Gtk::Image* delExtImg = Gtk::manage ( new RTImage ("list-remove-red-small.png") ); + Gtk::Image* moveExtUpImg = Gtk::manage ( new RTImage ("arrow-up-small.png") ); + Gtk::Image* moveExtDownImg = Gtk::manage ( new RTImage ("arrow-down-small.png") ); addExt->add (*addExtImg); delExt->add (*delExtImg); moveExtUp->set_image (*moveExtUpImg); @@ -1344,27 +1350,27 @@ Gtk::Widget* Preferences::getFileBrowserPanel () hb0->pack_end (*moveExtUp, Gtk::PACK_SHRINK, 4); hb0->pack_end (*delExt, Gtk::PACK_SHRINK, 4); hb0->pack_end (*addExt, Gtk::PACK_SHRINK, 4); - extensions = Gtk::manage( new Gtk::TreeView () ); - Gtk::ScrolledWindow* hscrollw = Gtk::manage( new Gtk::ScrolledWindow () ); + extensions = Gtk::manage ( new Gtk::TreeView () ); + Gtk::ScrolledWindow* hscrollw = Gtk::manage ( new Gtk::ScrolledWindow () ); hscrollw->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); hscrollw->add (*extensions); extensionModel = Gtk::ListStore::create (extensionColumns); extensions->set_model (extensionModel); - extensions->append_column_editable("Enabled", extensionColumns.enabled); - extensions->append_column("Extension", extensionColumns.ext); + extensions->append_column_editable ("Enabled", extensionColumns.enabled); + extensions->append_column ("Extension", extensionColumns.ext); extensions->set_headers_visible (false); vbre->pack_start (*hscrollw); vbre->pack_start (*hb0, Gtk::PACK_SHRINK, 4); fre->add (*vbre); - Gtk::Frame* frc = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CACHEOPTS")) ); - Gtk::VBox* vbc = Gtk::manage( new Gtk::VBox () ); + Gtk::Frame* frc = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CACHEOPTS")) ); + Gtk::VBox* vbc = Gtk::manage ( new Gtk::VBox () ); frc->add (*vbc); - Gtk::HBox* hb3 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* chlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CACHETHUMBHEIGHT") + ":") ); - maxThumbSize = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hb3 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* chlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHETHUMBHEIGHT") + ":") ); + maxThumbSize = Gtk::manage ( new Gtk::SpinButton () ); hb3->pack_start (*chlab, Gtk::PACK_SHRINK, 4); hb3->pack_start (*maxThumbSize, Gtk::PACK_SHRINK, 4); @@ -1373,9 +1379,9 @@ Gtk::Widget* Preferences::getFileBrowserPanel () maxThumbSize->set_range (40, 800); vbc->pack_start (*hb3, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb4 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* celab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CACHEMAXENTRIES") + ":") ); - maxCacheEntries = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hb4 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* celab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHEMAXENTRIES") + ":") ); + maxCacheEntries = Gtk::manage ( new Gtk::SpinButton () ); hb4->pack_start (*celab, Gtk::PACK_SHRINK, 4); hb4->pack_start (*maxCacheEntries, Gtk::PACK_SHRINK, 4); @@ -1384,24 +1390,24 @@ Gtk::Widget* Preferences::getFileBrowserPanel () maxCacheEntries->set_range (10, 100000); vbc->pack_start (*hb4, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb5 = Gtk::manage( new Gtk::HBox () ); - clearThumbnails = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARTHUMBS")) ); - clearProfiles = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARPROFILES")) ); - clearAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARALL")) ); + Gtk::HBox* hb5 = Gtk::manage ( new Gtk::HBox () ); + clearThumbnails = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARTHUMBS")) ); + clearProfiles = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARPROFILES")) ); + clearAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARALL")) ); hb5->pack_start (*clearThumbnails, Gtk::PACK_SHRINK, 4); hb5->pack_start (*clearProfiles, Gtk::PACK_SHRINK, 4); hb5->pack_start (*clearAll, Gtk::PACK_SHRINK, 4); vbc->pack_start (*hb5, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb6 = Gtk::manage( new Gtk::HBox () ); - Gtk::VBox* vb6 = Gtk::manage( new Gtk::VBox () ); + Gtk::HBox* hb6 = Gtk::manage ( new Gtk::HBox () ); + Gtk::VBox* vb6 = Gtk::manage ( new Gtk::VBox () ); vb6->pack_start (*fro); vb6->pack_start (*frmnu); vb6->pack_end (*frc); hb6->pack_start (*vb6); hb6->pack_start (*fre); - hb6->set_spacing(4); + hb6->set_spacing (4); mvbfb->pack_start (*hb6, Gtk::PACK_SHRINK, 4); @@ -1409,14 +1415,14 @@ Gtk::Widget* Preferences::getFileBrowserPanel () // mvbfb->pack_start (*fre); // mvbfb->pack_start (*frc, Gtk::PACK_SHRINK, 4); - addExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); - delExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::delExtPressed) ); - moveExtUp->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtUpPressed) ); - moveExtDown->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtDownPressed) ); - extension->signal_activate().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); - clearThumbnails->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearThumbImagesPressed) ); - clearProfiles->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearProfilesPressed) ); - clearAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearAllPressed) ); + addExt->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::addExtPressed) ); + delExt->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::delExtPressed) ); + moveExtUp->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtUpPressed) ); + moveExtDown->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtDownPressed) ); + extension->signal_activate().connect ( sigc::mem_fun (*this, &Preferences::addExtPressed) ); + clearThumbnails->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearThumbImagesPressed) ); + clearProfiles->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearProfilesPressed) ); + clearAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearAllPressed) ); return mvbfb; } @@ -1425,20 +1431,20 @@ Gtk::Widget* Preferences::getSoundPanel () { Gtk::VBox* pSnd = new Gtk::VBox (); - ckbSndEnable = Gtk::manage( new Gtk::CheckButton (M("GENERAL_ENABLE"))); - sndEnableConn = ckbSndEnable->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::sndEnableToggled)); + ckbSndEnable = Gtk::manage ( new Gtk::CheckButton (M ("GENERAL_ENABLE"))); + sndEnableConn = ckbSndEnable->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::sndEnableToggled)); pSnd->pack_start (*ckbSndEnable, Gtk::PACK_SHRINK, 4); Gtk::HBox* hblSndHelp = Gtk::manage (new Gtk::HBox ()); - Gtk::Label* lSndHelp = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_HELP"))); + Gtk::Label* lSndHelp = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_HELP"))); hblSndHelp->pack_start (*lSndHelp, Gtk::PACK_SHRINK, 4); pSnd->pack_start (*hblSndHelp, Gtk::PACK_SHRINK, 4); // BatchQueueDone - Gtk::HBox* pBatchQueueDone = Gtk::manage( new Gtk::HBox() ); + Gtk::HBox* pBatchQueueDone = Gtk::manage ( new Gtk::HBox() ); - Gtk::Label* lSndBatchQueueDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_BATCHQUEUEDONE") + Glib::ustring(":"))); + Gtk::Label* lSndBatchQueueDone = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_BATCHQUEUEDONE") + Glib::ustring (":"))); pBatchQueueDone->pack_start (*lSndBatchQueueDone, Gtk::PACK_SHRINK, 4); txtSndBatchQueueDone = Gtk::manage (new Gtk::Entry()); @@ -1447,18 +1453,18 @@ Gtk::Widget* Preferences::getSoundPanel () pSnd->pack_start (*pBatchQueueDone, Gtk::PACK_SHRINK, 4); // LngEditProcDone - Gtk::HBox* pSndLngEditProcDone = Gtk::manage( new Gtk::HBox() ); + Gtk::HBox* pSndLngEditProcDone = Gtk::manage ( new Gtk::HBox() ); - Gtk::Label* lSndLngEditProcDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_LNGEDITPROCDONE") + Glib::ustring(":"))); + Gtk::Label* lSndLngEditProcDone = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_LNGEDITPROCDONE") + Glib::ustring (":"))); pSndLngEditProcDone->pack_start (*lSndLngEditProcDone, Gtk::PACK_SHRINK, 4); txtSndLngEditProcDone = Gtk::manage (new Gtk::Entry()); pSndLngEditProcDone->pack_start (*txtSndLngEditProcDone, Gtk::PACK_EXPAND_WIDGET, 4); - Gtk::Label* lSndLngEditProcDoneSecs = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_TRESHOLDSECS") + Glib::ustring(":"))); + Gtk::Label* lSndLngEditProcDoneSecs = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_TRESHOLDSECS") + Glib::ustring (":"))); pSndLngEditProcDone->pack_start (*lSndLngEditProcDoneSecs, Gtk::PACK_SHRINK, 12); - spbSndLngEditProcDoneSecs = Gtk::manage( new Gtk::SpinButton () ); + spbSndLngEditProcDoneSecs = Gtk::manage ( new Gtk::SpinButton () ); spbSndLngEditProcDoneSecs->set_digits (1); spbSndLngEditProcDoneSecs->set_increments (0.5, 1); spbSndLngEditProcDoneSecs->set_range (0, 10); @@ -1488,16 +1494,16 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector& i } for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { - Glib::ustring fname = Glib::build_filename(dirname, *i); + Glib::ustring fname = Glib::build_filename (dirname, *i); Glib::ustring sname = *i; // ignore directories if (!Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= ext.size() && sname.substr (sname.size() - ext.size(), ext.size()).casefold() == ext) { - items.push_back (sname.substr(0, sname.size() - ext.size())); + items.push_back (sname.substr (0, sname.size() - ext.size())); } } - std::sort(items.begin(), items.end()); + std::sort (items.begin(), items.end()); delete dir; } @@ -1518,37 +1524,41 @@ void Preferences::parseThemeDir (Glib::ustring dirname) } for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { - Glib::ustring fname = Glib::build_filename(dirname, *i); + Glib::ustring fname = Glib::build_filename (dirname, *i); Glib::ustring sname = *i; // ignore directories and filter out unsupported theme - if (regex->match(sname, matchInfo) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= 4) { + if (regex->match (sname, matchInfo) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= 4) { bool keepIt = false; - Glib::ustring fname2 = matchInfo.fetch(1); - Glib::ustring minMinor = matchInfo.fetch(2); - Glib::ustring maxMinor = matchInfo.fetch(3); + Glib::ustring fname2 = matchInfo.fetch (1); + Glib::ustring minMinor = matchInfo.fetch (2); + Glib::ustring maxMinor = matchInfo.fetch (3); if (!minMinor.empty()) { - guint64 minMinorVal = g_ascii_strtoll(minMinor.c_str(), 0, 0); + guint64 minMinorVal = g_ascii_strtoll (minMinor.c_str(), 0, 0); + if ((guint64)GTK_MINOR_VERSION >= minMinorVal) { keepIt = true; } } + if (!maxMinor.empty()) { - guint64 maxMinorVal = g_ascii_strtoll(maxMinor.c_str(), 0, 0); + guint64 maxMinorVal = g_ascii_strtoll (maxMinor.c_str(), 0, 0); + if ((guint64)GTK_MINOR_VERSION <= maxMinorVal) { keepIt = true; } } + if (keepIt) { - themeFNames.push_back(ThemeFilename(matchInfo.fetch(1), sname.substr(0, sname.size() - 4))); + themeFNames.push_back (ThemeFilename (matchInfo.fetch (1), sname.substr (0, sname.size() - 4))); } } } - std::sort(themeFNames.begin(), themeFNames.end(), [] (const ThemeFilename& firstDir, const ThemeFilename& secondDir) - { - return firstDir.longFName < secondDir.longFName; - }); + + std::sort (themeFNames.begin(), themeFNames.end(), [] (const ThemeFilename & firstDir, const ThemeFilename & secondDir) { + return firstDir.longFName < secondDir.longFName; + }); delete dir; } @@ -1585,7 +1595,7 @@ void Preferences::storePreferences () moptions.shadowThreshold = (int)shThresh->get_value (); moptions.language = languages->get_active_text (); moptions.languageAutoDetect = ckbLangAutoDetect->get_active (); - moptions.theme = themeFNames.at(theme->get_active_row_number ()).longFName; + moptions.theme = themeFNames.at (theme->get_active_row_number ()).longFName; Gdk::RGBA cropCol = butCropCol->get_rgba(); moptions.cutOverlayBrush[0] = cropCol.get_red(); @@ -1599,13 +1609,15 @@ void Preferences::storePreferences () moptions.navGuideBrush[2] = NavGuideCol.get_blue(); moptions.navGuideBrush[3] = butNavGuideCol->get_alpha() / 65535.0; - Pango::FontDescription fd(fontButton->get_font_name()); + Pango::FontDescription fd (fontButton->get_font_name()); + if (newFont) { moptions.fontFamily = fd.get_family(); moptions.fontSize = fd.get_size() / Pango::SCALE; } - Pango::FontDescription cpfd(colorPickerFontButton->get_font_name()); + Pango::FontDescription cpfd (colorPickerFontButton->get_font_name()); + if (newCPFont) { moptions.CPFontFamily = cpfd.get_family(); moptions.CPFontSize = cpfd.get_size() / Pango::SCALE; @@ -1639,45 +1651,54 @@ void Preferences::storePreferences () } moptions.CPBPath = txtCustProfBuilderPath->get_text(); - moptions.CPBKeys = CPBKeyType(custProfBuilderLabelType->get_active_row_number()); + moptions.CPBKeys = CPBKeyType (custProfBuilderLabelType->get_active_row_number()); if (!prtProfile->get_active_row_number()) { moptions.rtSettings.printerProfile = ""; } else { moptions.rtSettings.printerProfile = prtProfile->get_active_text (); } + switch (prtIntent->get_active_row_number ()) { - default: - case 0: - moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL; - break; - case 1: - moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE; - break; - case 2: - moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE; - break; + default: + case 0: + moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL; + break; + + case 1: + moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE; + break; + + case 2: + moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE; + break; } + moptions.rtSettings.printerBPC = prtBPC->get_active (); #if !defined(__APPLE__) // monitor profile not supported on apple + if (!monProfile->get_active_row_number()) { moptions.rtSettings.monitorProfile = ""; } else { moptions.rtSettings.monitorProfile = monProfile->get_active_text (); } + switch (monIntent->get_active_row_number ()) { - default: - case 0: - moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; - break; - case 1: - moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; - break; - case 2: - moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; - break; + default: + case 0: + moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; + break; + + case 1: + moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; + break; + + case 2: + moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; + break; } + moptions.rtSettings.monitorBPC = monBPC->get_active (); //#if defined(WIN32) moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active (); @@ -1785,9 +1806,9 @@ void Preferences::fillPreferences () sconn.block (true); dfconn.block (true); ffconn.block (true); - rpconn.block(true); - ipconn.block(true); - bpconn.block(true); + rpconn.block (true); + ipconn.block (true); + bpconn.block (true); rprofiles->setActiveRowFromFullPath (moptions.defProfRaw); forRAWComboChanged(); // update the tooltip @@ -1796,40 +1817,48 @@ void Preferences::fillPreferences () dateformat->set_text (moptions.dateFormat); panFactor->set_value (moptions.panAccelFactor); rememberZoomPanCheckbutton->set_active (moptions.rememberZoomAndPan); - ctiffserialize->set_active(moptions.serializeTiffRead); + ctiffserialize->set_active (moptions.serializeTiffRead); setActiveTextOrIndex (*prtProfile, moptions.rtSettings.printerProfile, 0); + switch (moptions.rtSettings.printerIntent) { - default: - case rtengine::RI_PERCEPTUAL: - prtIntent->set_active (0); - break; - case rtengine::RI_RELATIVE: - prtIntent->set_active (1); - break; - case rtengine::RI_ABSOLUTE: - prtIntent->set_active (2); - break; + default: + case rtengine::RI_PERCEPTUAL: + prtIntent->set_active (0); + break; + + case rtengine::RI_RELATIVE: + prtIntent->set_active (1); + break; + + case rtengine::RI_ABSOLUTE: + prtIntent->set_active (2); + break; } + prtBPC->set_active (moptions.rtSettings.printerBPC); #if !defined(__APPLE__) // monitor profile not supported on apple setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); + switch (moptions.rtSettings.monitorIntent) { - default: - case rtengine::RI_PERCEPTUAL: - monIntent->set_active (0); - break; - case rtengine::RI_RELATIVE: - monIntent->set_active (1); - break; - case rtengine::RI_ABSOLUTE: - monIntent->set_active (2); - break; + default: + case rtengine::RI_PERCEPTUAL: + monIntent->set_active (0); + break; + + case rtengine::RI_RELATIVE: + monIntent->set_active (1); + break; + + case rtengine::RI_ABSOLUTE: + monIntent->set_active (2); + break; } + monBPC->set_active (moptions.rtSettings.monitorBPC); //#if defined(WIN32) - cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile); + cbAutoMonProfile->set_active (moptions.rtSettings.autoMonitorProfile); //#endif #endif @@ -1854,39 +1883,39 @@ void Preferences::fillPreferences () ckbHistogramWorking->set_active (moptions.rtSettings.HistogramWorking); languages->set_active_text (moptions.language); ckbLangAutoDetect->set_active (moptions.languageAutoDetect); - int themeNbr = getThemeRowNumber(moptions.theme); - theme->set_active (themeNbr==-1 ? 0 : themeNbr); + int themeNbr = getThemeRowNumber (moptions.theme); + theme->set_active (themeNbr == -1 ? 0 : themeNbr); Gdk::RGBA cropCol; - cropCol.set_rgba(moptions.cutOverlayBrush[0], moptions.cutOverlayBrush[1], moptions.cutOverlayBrush[2]); - butCropCol->set_rgba(cropCol); - butCropCol->set_alpha ( (unsigned short)(moptions.cutOverlayBrush[3] * 65535.0)); + cropCol.set_rgba (moptions.cutOverlayBrush[0], moptions.cutOverlayBrush[1], moptions.cutOverlayBrush[2]); + butCropCol->set_rgba (cropCol); + butCropCol->set_alpha ( (unsigned short) (moptions.cutOverlayBrush[3] * 65535.0)); Gdk::RGBA NavGuideCol; - NavGuideCol.set_rgba(moptions.navGuideBrush[0], moptions.navGuideBrush[1], moptions.navGuideBrush[2]); - butNavGuideCol->set_rgba(NavGuideCol); - butNavGuideCol->set_alpha ( (unsigned short)(moptions.navGuideBrush[3] * 65535.0)); + NavGuideCol.set_rgba (moptions.navGuideBrush[0], moptions.navGuideBrush[1], moptions.navGuideBrush[2]); + butNavGuideCol->set_rgba (NavGuideCol); + butNavGuideCol->set_alpha ( (unsigned short) (moptions.navGuideBrush[3] * 65535.0)); if (options.fontFamily == "default") { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - fontButton->set_font_name (Glib::ustring::compose("%1 %2", options.fontFamily, options.fontSize)); + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.fontFamily, options.fontSize)); } if (options.CPFontFamily == "default") { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", initialFontFamily, initialFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); } else { - colorPickerFontButton->set_font_name (Glib::ustring::compose("%1 %2", options.CPFontFamily, options.CPFontSize)); + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize)); } showDateTime->set_active (moptions.fbShowDateTime); showBasicExif->set_active (moptions.fbShowBasicExif); showExpComp->set_active (moptions.fbShowExpComp); - ckbmenuGroupRank->set_active(moptions.menuGroupRank); - ckbmenuGroupLabel->set_active(moptions.menuGroupLabel); - ckbmenuGroupFileOperations->set_active(moptions.menuGroupFileOperations); - ckbmenuGroupProfileOperations->set_active(moptions.menuGroupProfileOperations); - ckbmenuGroupExtProg->set_active(moptions.menuGroupExtProg); + ckbmenuGroupRank->set_active (moptions.menuGroupRank); + ckbmenuGroupLabel->set_active (moptions.menuGroupLabel); + ckbmenuGroupFileOperations->set_active (moptions.menuGroupFileOperations); + ckbmenuGroupProfileOperations->set_active (moptions.menuGroupProfileOperations); + ckbmenuGroupExtProg->set_active (moptions.menuGroupExtProg); hlThresh->set_value (moptions.highlightThreshold); shThresh->set_value (moptions.shadowThreshold); @@ -1920,8 +1949,8 @@ void Preferences::fillPreferences () #endif editorToSendTo->set_text (moptions.customEditorProg); - txtCustProfBuilderPath->set_text(moptions.CPBPath); - custProfBuilderLabelType->set_active(moptions.CPBKeys); + txtCustProfBuilderPath->set_text (moptions.CPBPath); + custProfBuilderLabelType->set_active (moptions.CPBKeys); if (moptions.startupDir == STARTUPDIR_CURRENT) { @@ -1938,20 +1967,20 @@ void Preferences::fillPreferences () extensionModel->clear (); for (size_t i = 0; i < moptions.parseExtensions.size(); i++) { - Gtk::TreeRow row = *(extensionModel->append()); + Gtk::TreeRow row = * (extensionModel->append()); row[extensionColumns.enabled] = moptions.parseExtensionsEnabled[i]; row[extensionColumns.ext] = moptions.parseExtensions[i]; } maxThumbSize->set_value (moptions.maxThumbnailHeight); - maxRecentFolders->set_value(moptions.maxRecentFolders); + maxRecentFolders->set_value (moptions.maxRecentFolders); maxCacheEntries->set_value (moptions.maxCacheEntries); overlayedFileNames->set_active (moptions.overlayedFileNames); - filmStripOverlayedFileNames->set_active(moptions.filmStripOverlayedFileNames); - sameThumbSize->set_active(moptions.sameThumbSize); - ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched); + filmStripOverlayedFileNames->set_active (moptions.filmStripOverlayedFileNames); + sameThumbSize->set_active (moptions.sameThumbSize); + ckbInternalThumbIfUntouched->set_active (moptions.internalThumbIfUntouched); - saveParamsPreference->set_active(moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1); + saveParamsPreference->set_active (moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1); loadParamsPreference->set_active (moptions.paramsLoadLocation); useBundledProfiles->set_active (moptions.useBundledProfiles); @@ -1959,30 +1988,30 @@ void Preferences::fillPreferences () ckbTunnelMetaData->set_active (moptions.tunnelMetaData); if (!moptions.tabbedUI) { - editorLayout->set_active(moptions.mainNBVertical ? 1 : 0); + editorLayout->set_active (moptions.mainNBVertical ? 1 : 0); } else { - editorLayout->set_active(moptions.multiDisplayMode ? 3 : 2); + editorLayout->set_active (moptions.multiDisplayMode ? 3 : 2); } - curveBBoxPosC->set_active(moptions.curvebboxpos); - ckbHistogramPositionLeft->set_active(moptions.histogramPosition == 1); + curveBBoxPosC->set_active (moptions.curvebboxpos); + ckbHistogramPositionLeft->set_active (moptions.histogramPosition == 1); // ckbHistogramWorking->set_active(moptions.histogramWorking==1); - ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow); - ckbShowFilmStripToolBar->set_active(moptions.showFilmStripToolBar); - ckbHideTPVScrollbar->set_active(moptions.hideTPVScrollbar); - ckbUseIconNoText->set_active(moptions.UseIconNoText); + ckbFileBrowserToolbarSingleRow->set_active (moptions.FileBrowserToolbarSingleRow); + ckbShowFilmStripToolBar->set_active (moptions.showFilmStripToolBar); + ckbHideTPVScrollbar->set_active (moptions.hideTPVScrollbar); + ckbUseIconNoText->set_active (moptions.UseIconNoText); - rgbDenoiseTreadLimitSB->set_value(moptions.rgbDenoiseThreadLimit); - clutCacheSizeSB->set_value(moptions.clutCacheSize); - maxInspectorBuffersSB->set_value(moptions.maxInspectorBuffers); + rgbDenoiseTreadLimitSB->set_value (moptions.rgbDenoiseThreadLimit); + clutCacheSizeSB->set_value (moptions.clutCacheSize); + maxInspectorBuffersSB->set_value (moptions.maxInspectorBuffers); - darkFrameDir->set_current_folder( moptions.rtSettings.darkFramesPath ); + darkFrameDir->set_current_folder ( moptions.rtSettings.darkFramesPath ); darkFrameChanged (); - flatFieldDir->set_current_folder( moptions.rtSettings.flatFieldsPath ); + flatFieldDir->set_current_folder ( moptions.rtSettings.flatFieldsPath ); flatFieldChanged (); - clutsDir->set_current_folder( moptions.clutsDir ); + clutsDir->set_current_folder ( moptions.clutsDir ); addc.block (true); setc.block (true); @@ -2006,9 +2035,9 @@ void Preferences::fillPreferences () sconn.block (false); dfconn.block (false); ffconn.block (false); - rpconn.block(true); - ipconn.block(true); - bpconn.block(false); + rpconn.block (true); + ipconn.block (true); + bpconn.block (false); chOverwriteOutputFile->set_active (moptions.overwriteOutputFile); @@ -2039,7 +2068,7 @@ void Preferences::savePressed () { //#if defined(WIN32) void Preferences::autoMonProfileToggled () { - monProfile->set_sensitive(!cbAutoMonProfile->get_active()); + monProfile->set_sensitive (!cbAutoMonProfile->get_active()); } //#endif /* @@ -2049,14 +2078,14 @@ void Preferences::autocielabToggled () { */ void Preferences::sndEnableToggled () { - txtSndBatchQueueDone->set_sensitive(ckbSndEnable->get_active()); - txtSndLngEditProcDone->set_sensitive(ckbSndEnable->get_active()); - spbSndLngEditProcDoneSecs->set_sensitive(ckbSndEnable->get_active()); + txtSndBatchQueueDone->set_sensitive (ckbSndEnable->get_active()); + txtSndLngEditProcDone->set_sensitive (ckbSndEnable->get_active()); + spbSndLngEditProcDoneSecs->set_sensitive (ckbSndEnable->get_active()); } void Preferences::langAutoDetectToggled () { - languages->set_sensitive(!ckbLangAutoDetect->get_active()); + languages->set_sensitive (!ckbLangAutoDetect->get_active()); } void Preferences::okPressed () @@ -2066,12 +2095,14 @@ void Preferences::okPressed () workflowUpdate(); options.copyFrom (&moptions); options.filterOutParsedExtensions(); + try { Options::save (); } catch (Options::Error &e) { - Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); msgd.run(); } + dynProfilePanel->save(); hide (); } @@ -2079,29 +2110,30 @@ void Preferences::okPressed () void Preferences::cancelPressed () { // set the initial theme back - if (themeFNames.at(theme->get_active_row_number ()).longFName != options.theme) { - rtengine::setPaths(options); + if (themeFNames.at (theme->get_active_row_number ()).longFName != options.theme) { + rtengine::setPaths (options); RTImage::updateImages(); - switchThemeTo(options.theme); + switchThemeTo (options.theme); } // set the initial font back - Pango::FontDescription fd(fontButton->get_font_name()); + Pango::FontDescription fd (fontButton->get_font_name()); + if (fd.get_family() != options.fontFamily && (fd.get_size() / Pango::SCALE) != options.fontSize) { if (options.fontFamily == "default") { - switchFontTo(initialFontFamily, initialFontSize); + switchFontTo (initialFontFamily, initialFontSize); } else { - switchFontTo(options.fontFamily, options.fontSize); + switchFontTo (options.fontFamily, options.fontSize); } } // update the profileStore if (useBundledProfiles->get_active () != options.useBundledProfiles) { // we have to rescan with the old value; - bpconn.block(true); + bpconn.block (true); useBundledProfiles->set_active (false); bundledProfilesChanged(); - bpconn.block(false); + bpconn.block (false); } hide (); @@ -2110,12 +2142,12 @@ void Preferences::cancelPressed () void Preferences::selectStartupDir () { - Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); + Gtk::FileChooserDialog dialog (getToplevelWindow (this), M ("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); // dialog.set_transient_for(*this); //Add response buttons the the dialog: - dialog.add_button(M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); - dialog.add_button(M("GENERAL_OPEN"), Gtk::RESPONSE_OK); + dialog.add_button (M ("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button (M ("GENERAL_OPEN"), Gtk::RESPONSE_OK); int result = dialog.run(); @@ -2129,17 +2161,17 @@ void Preferences::aboutPressed () splash = new Splash (*this); splash->set_transient_for (*this); - splash->signal_delete_event().connect( sigc::mem_fun(*this, &Preferences::splashClosed) ); + splash->signal_delete_event().connect ( sigc::mem_fun (*this, &Preferences::splashClosed) ); splash->show (); } void Preferences::themeChanged () { - moptions.theme = themeFNames.at(theme->get_active_row_number ()).longFName; - rtengine::setPaths(moptions); + moptions.theme = themeFNames.at (theme->get_active_row_number ()).longFName; + rtengine::setPaths (moptions); RTImage::updateImages(); - switchThemeTo(moptions.theme); + switchThemeTo (moptions.theme); } void Preferences::forRAWComboChanged () @@ -2155,14 +2187,14 @@ void Preferences::forRAWComboChanged () } if (selectedEntry->type == PSET_FOLDER) { - rpconn.block(true); - rprofiles->set_active(currRawRow); - rpconn.block(false); + rpconn.block (true); + rprofiles->set_active (currRawRow); + rpconn.block (false); } else { currRawRow = rprofiles->get_active(); } - rprofiles->set_tooltip_text(selectedEntry->label); + rprofiles->set_tooltip_text (selectedEntry->label); } void Preferences::forImageComboChanged () @@ -2178,19 +2210,19 @@ void Preferences::forImageComboChanged () } if (selectedEntry->type == PSET_FOLDER) { - ipconn.block(true); - iprofiles->set_active(currImgRow); - ipconn.block(false); + ipconn.block (true); + iprofiles->set_active (currImgRow); + ipconn.block (false); } else { currImgRow = rprofiles->get_active(); } - iprofiles->set_tooltip_text(iprofiles->getSelectedEntry()->label); + iprofiles->set_tooltip_text (iprofiles->getSelectedEntry()->label); } void Preferences::layoutComboChanged () { - editorLayout->set_tooltip_text(editorLayout->get_active_text()); + editorLayout->set_tooltip_text (editorLayout->get_active_text()); } void Preferences::bundledProfilesChanged () @@ -2219,12 +2251,13 @@ void Preferences::iccDirChanged () monProfile->remove_all(); - monProfile->append (M("PREFERENCES_PROFILE_NONE")); + monProfile->append (M ("PREFERENCES_PROFILE_NONE")); - for (const auto& profile : profiles) + for (const auto& profile : profiles) { monProfile->append (profile); + } - setActiveTextOrIndex(*monProfile, currentSelection, 0); + setActiveTextOrIndex (*monProfile, currentSelection, 0); } void Preferences::storeCurrentValue() @@ -2239,26 +2272,26 @@ void Preferences::updateProfileList() rprofiles->updateProfileList(); iprofiles->updateProfileList(); const ProfileStoreEntry* dynpse = ProfileStore::getInstance()->getInternalDynamicPSE(); - rprofiles->addRow(dynpse); - iprofiles->addRow(dynpse); + rprofiles->addRow (dynpse); + iprofiles->addRow (dynpse); } void Preferences::restoreValue() { - if (!rprofiles->setActiveRowFromFullPath(storedValueRaw)) { + if (!rprofiles->setActiveRowFromFullPath (storedValueRaw)) { moptions.defProfRaw = DEFPROFILE_INTERNAL; - rpconn.block(true); + rpconn.block (true); rprofiles->setInternalEntry(); - rpconn.block(false); + rpconn.block (false); } currRawRow = rprofiles->get_active(); - if (!iprofiles->setActiveRowFromFullPath(storedValueImg)) { + if (!iprofiles->setActiveRowFromFullPath (storedValueImg)) { moptions.defProfImg = DEFPROFILE_INTERNAL; - ipconn.block(true); + ipconn.block (true); iprofiles->setInternalEntry(); - ipconn.block(false); + ipconn.block (false); } currImgRow = iprofiles->get_active(); @@ -2267,23 +2300,23 @@ void Preferences::restoreValue() storedValueImg = ""; } -void Preferences::switchThemeTo(Glib::ustring newTheme) +void Preferences::switchThemeTo (Glib::ustring newTheme) { - Glib::ustring filename(Glib::build_filename(argv0, "themes", newTheme + ".css")); + Glib::ustring filename (Glib::build_filename (argv0, "themes", newTheme + ".css")); if (!themecss) { themecss = Gtk::CssProvider::create(); Glib::RefPtr screen = Gdk::Screen::get_default(); - Gtk::StyleContext::add_provider_for_screen(screen, themecss, GTK_STYLE_PROVIDER_PRIORITY_USER); + Gtk::StyleContext::add_provider_for_screen (screen, themecss, GTK_STYLE_PROVIDER_PRIORITY_USER); } try { themecss->load_from_path (filename); } catch (Glib::Error &err) { - printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); + printf ("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); } catch (...) { - printf("Error: Can't load css file \"%s\"\n", filename.c_str()); + printf ("Error: Can't load css file \"%s\"\n", filename.c_str()); } } @@ -2291,8 +2324,8 @@ void Preferences::fontChanged () { newFont = true; - Pango::FontDescription fd(fontButton->get_font_name()); - switchFontTo(fd.get_family(), fd.get_size() / Pango::SCALE); + Pango::FontDescription fd (fontButton->get_font_name()); + switchFontTo (fd.get_family(), fd.get_size() / Pango::SCALE); } void Preferences::cpFontChanged () @@ -2301,35 +2334,34 @@ void Preferences::cpFontChanged () newCPFont = true; } -void Preferences::switchFontTo(const Glib::ustring &newFontFamily, const int newFontSize) +void Preferences::switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize) { if (newFontFamily != "default") { if (!fontcss) { fontcss = Gtk::CssProvider::create(); Glib::RefPtr screen = Gdk::Screen::get_default(); - Gtk::StyleContext::add_provider_for_screen(screen, fontcss, GTK_STYLE_PROVIDER_PRIORITY_USER); + Gtk::StyleContext::add_provider_for_screen (screen, fontcss, GTK_STYLE_PROVIDER_PRIORITY_USER); } try { //GTK318 - #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - fontcss->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2px }", newFontFamily, newFontSize)); - #else - fontcss->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2pt }", newFontFamily, newFontSize)); - #endif +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + fontcss->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2px }", newFontFamily, newFontSize)); +#else + fontcss->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2pt }", newFontFamily, newFontSize)); +#endif //GTK318 } catch (Glib::Error &err) { - printf("Error: \"%s\"\n", err.what().c_str()); + printf ("Error: \"%s\"\n", err.what().c_str()); } catch (...) { - printf("Error: Can't find the font named \"%s\"\n", newFontFamily.c_str()); + printf ("Error: Can't find the font named \"%s\"\n", newFontFamily.c_str()); } - } - else { + } else { if (fontcss) { fontcss = Gtk::CssProvider::create(); Glib::RefPtr screen = Gdk::Screen::get_default(); - Gtk::StyleContext::remove_provider_for_screen(screen, fontcss); + Gtk::StyleContext::remove_provider_for_screen (screen, fontcss); } } } @@ -2337,41 +2369,40 @@ void Preferences::switchFontTo(const Glib::ustring &newFontFamily, const int new void Preferences::workflowUpdate () { - if(moptions.tabbedUI != options.tabbedUI) { - parent->setEditorMode(moptions.tabbedUI); + if (moptions.tabbedUI != options.tabbedUI) { + parent->setEditorMode (moptions.tabbedUI); } - if(moptions.hideTPVScrollbar != options.hideTPVScrollbar) { + if (moptions.hideTPVScrollbar != options.hideTPVScrollbar) { // Update the tool panels parent->updateTPVScrollbar (moptions.hideTPVScrollbar); } - if(moptions.UseIconNoText != options.UseIconNoText) { + if (moptions.UseIconNoText != options.UseIconNoText) { // Update the tool's tab titles - parent->updateTabsUsesIcons(moptions.UseIconNoText); + parent->updateTabsUsesIcons (moptions.UseIconNoText); } - if(moptions.FileBrowserToolbarSingleRow != options.FileBrowserToolbarSingleRow) { + if (moptions.FileBrowserToolbarSingleRow != options.FileBrowserToolbarSingleRow) { // Update the position of the Query toolbar - parent->updateFBQueryTB(moptions.FileBrowserToolbarSingleRow); + parent->updateFBQueryTB (moptions.FileBrowserToolbarSingleRow); } - if(moptions.showFilmStripToolBar != options.showFilmStripToolBar) { + if (moptions.showFilmStripToolBar != options.showFilmStripToolBar) { // Update the visibility of FB toolbar - parent->updateFBToolBarVisibility(moptions.showFilmStripToolBar); + parent->updateFBToolBarVisibility (moptions.showFilmStripToolBar); } - if(moptions.histogramPosition != options.histogramPosition) { + if (moptions.histogramPosition != options.histogramPosition) { // Update the position of the Histogram - parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); + parent->updateHistogramPosition (options.histogramPosition, moptions.histogramPosition); } - if( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile - ||moptions.rtSettings.printerBPC != options.rtSettings.printerBPC - ||moptions.rtSettings.printerIntent != options.rtSettings.printerIntent) - { + if ( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile + || moptions.rtSettings.printerBPC != options.rtSettings.printerBPC + || moptions.rtSettings.printerIntent != options.rtSettings.printerIntent) { // Update the position of the Histogram - parent->updateProfiles(moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC); + parent->updateProfiles (moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC); } } @@ -2386,7 +2417,7 @@ void Preferences::addExtPressed () return; } - Gtk::TreeRow row = *(extensionModel->append()); + Gtk::TreeRow row = * (extensionModel->append()); row[extensionColumns.enabled] = true; row[extensionColumns.ext] = extension->get_text (); @@ -2401,12 +2432,16 @@ void Preferences::delExtPressed () void Preferences::moveExtUpPressed () { const Glib::RefPtr selection = extensions->get_selection (); - if (!selection) + + if (!selection) { return; + } const Gtk::TreeModel::iterator selected = selection->get_selected (); - if (!selected || selected == extensionModel->children ().begin ()) + + if (!selected || selected == extensionModel->children ().begin ()) { return; + } Gtk::TreeModel::iterator previous = selected; --previous; @@ -2416,16 +2451,22 @@ void Preferences::moveExtUpPressed () void Preferences::moveExtDownPressed () { const Glib::RefPtr selection = extensions->get_selection (); - if (!selection) + + if (!selection) { return; + } const Gtk::TreeModel::iterator selected = selection->get_selected (); - if (!selected) + + if (!selected) { return; + } Gtk::TreeModel::iterator next = selected; - if (++next) + + if (++next) { extensionModel->iter_swap (selected, next); + } } void Preferences::clearProfilesPressed () @@ -2449,9 +2490,9 @@ void Preferences::clearAllPressed () void Preferences::darkFrameChanged () { //Glib::ustring s(darkFrameDir->get_filename()); - Glib::ustring s(darkFrameDir->get_current_folder()); + Glib::ustring s (darkFrameDir->get_current_folder()); //if( s.compare( rtengine::dfm.getPathname()) !=0 ){ - rtengine::dfm.init( s ); + rtengine::dfm.init ( s ); updateDFinfos(); //} } @@ -2459,9 +2500,9 @@ void Preferences::darkFrameChanged () void Preferences::flatFieldChanged () { //Glib::ustring s(flatFieldDir->get_filename()); - Glib::ustring s(flatFieldDir->get_current_folder()); + Glib::ustring s (flatFieldDir->get_current_folder()); //if( s.compare( rtengine::ffm.getPathname()) !=0 ){ - rtengine::ffm.init( s ); + rtengine::ffm.init ( s ); updateFFinfos(); //} } @@ -2469,20 +2510,20 @@ void Preferences::flatFieldChanged () void Preferences::updateDFinfos() { int t1, t2; - rtengine::dfm.getStat(t1, t2); - Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_DARKFRAMEFOUND"), t1, M("PREFERENCES_DARKFRAMESHOTS"), t2, M("PREFERENCES_DARKFRAMETEMPLATES")); - dfLabel->set_text(s); + rtengine::dfm.getStat (t1, t2); + Glib::ustring s = Glib::ustring::compose ("%1: %2 %3, %4 %5", M ("PREFERENCES_DARKFRAMEFOUND"), t1, M ("PREFERENCES_DARKFRAMESHOTS"), t2, M ("PREFERENCES_DARKFRAMETEMPLATES")); + dfLabel->set_text (s); } void Preferences::updateFFinfos() { int t1, t2; - rtengine::ffm.getStat(t1, t2); - Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_FLATFIELDFOUND"), t1, M("PREFERENCES_FLATFIELDSHOTS"), t2, M("PREFERENCES_FLATFIELDTEMPLATES")); - ffLabel->set_text(s); + rtengine::ffm.getStat (t1, t2); + Glib::ustring s = Glib::ustring::compose ("%1: %2 %3, %4 %5", M ("PREFERENCES_FLATFIELDFOUND"), t1, M ("PREFERENCES_FLATFIELDSHOTS"), t2, M ("PREFERENCES_FLATFIELDTEMPLATES")); + ffLabel->set_text (s); } -bool Preferences::splashClosed(GdkEventAny* event) +bool Preferences::splashClosed (GdkEventAny* event) { delete splash; splash = nullptr; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index c08781331..6f6388dd1 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -32,27 +32,27 @@ static gboolean osx_should_quit_cb (GtkosxApplication *app, gpointer data) { RTWindow *rtWin = (RTWindow *)data; - return rtWin->on_delete_event(0); + return rtWin->on_delete_event (0); } static void osx_will_quit_cb (GtkosxApplication *app, gpointer data) { RTWindow *rtWin = (RTWindow *)data; - rtWin->on_delete_event(0); + rtWin->on_delete_event (0); gtk_main_quit (); } -bool RTWindow::osxFileOpenEvent(Glib::ustring path) +bool RTWindow::osxFileOpenEvent (Glib::ustring path) { CacheManager* cm = CacheManager::getInstance(); - Thumbnail* thm = cm->getEntry( path ); + Thumbnail* thm = cm->getEntry ( path ); - if(thm && fpanel) { + if (thm && fpanel) { std::vector entries; - entries.push_back(thm); - fpanel->fileCatalog->openRequested(entries); + entries.push_back (thm); + fpanel->fileCatalog->openRequested (entries); return true; } @@ -69,25 +69,25 @@ osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data) return false; } - Glib::ustring path = Glib::ustring(path_); - Glib::ustring suffix = path.length() > 4 ? path.substr(path.length() - 3) : ""; + Glib::ustring path = Glib::ustring (path_); + Glib::ustring suffix = path.length() > 4 ? path.substr (path.length() - 3) : ""; suffix = suffix.lowercase(); if (suffix == "pp3") { - path = path.substr(0, path.length() - 4); + path = path.substr (0, path.length() - 4); } - return rtWin->osxFileOpenEvent(path); + return rtWin->osxFileOpenEvent (path); } #endif // __APPLE__ RTWindow::RTWindow () - : mainNB(nullptr) - , bpanel(nullptr) - , splash(nullptr) - , btn_fullscreen(nullptr) - , epanel(nullptr) - , fpanel(nullptr) + : mainNB (nullptr) + , bpanel (nullptr) + , splash (nullptr) + , btn_fullscreen (nullptr) + , epanel (nullptr) + , fpanel (nullptr) { cacheMgr->init (); @@ -95,11 +95,11 @@ RTWindow::RTWindow () ProfilePanel::init (this); Glib::ustring fName = "rt-logo-small.png"; - Glib::ustring fullPath = rtengine::findIconAbsolutePath(fName); + Glib::ustring fullPath = rtengine::findIconAbsolutePath (fName); try { set_default_icon_from_file (fullPath); - } catch(Glib::Exception& ex) { + } catch (Glib::Exception& ex) { printf ("%s\n", ex.what().c_str()); } @@ -122,55 +122,57 @@ RTWindow::RTWindow () #endif versionStr = "RawTherapee " + versionString; - set_title_decorated(""); - set_resizable(true); - set_decorated(true); - set_default_size(options.windowWidth, options.windowHeight); - set_modal(false); + set_title_decorated (""); + set_resizable (true); + set_decorated (true); + set_default_size (options.windowWidth, options.windowHeight); + set_modal (false); Gdk::Rectangle lMonitorRect; - get_screen()->get_monitor_geometry(std::min(options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect); + get_screen()->get_monitor_geometry (std::min (options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect); + if (options.windowMaximized) { - move(lMonitorRect.get_x(), lMonitorRect.get_y()); + move (lMonitorRect.get_x(), lMonitorRect.get_y()); maximize(); } else { unmaximize(); - resize(options.windowWidth, options.windowHeight); - if(options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { - move(options.windowX, options.windowY); + resize (options.windowWidth, options.windowHeight); + + if (options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { + move (options.windowX, options.windowY); } else { - move(lMonitorRect.get_x(), lMonitorRect.get_y()); + move (lMonitorRect.get_x(), lMonitorRect.get_y()); } } on_delete_has_run = false; is_fullscreen = false; - property_destroy_with_parent().set_value(false); - signal_window_state_event().connect( sigc::mem_fun(*this, &RTWindow::on_window_state_event) ); - signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) ); + property_destroy_with_parent().set_value (false); + signal_window_state_event().connect ( sigc::mem_fun (*this, &RTWindow::on_window_state_event) ); + signal_key_press_event().connect ( sigc::mem_fun (*this, &RTWindow::keyPressed) ); - if(simpleEditor) { - epanel = Gtk::manage( new EditorPanel (nullptr) ); + if (simpleEditor) { + epanel = Gtk::manage ( new EditorPanel (nullptr) ); epanel->setParent (this); - epanel->setParentWindow(this); + epanel->setParentWindow (this); add (*epanel); show_all (); pldBridge = nullptr; // No progress listener CacheManager* cm = CacheManager::getInstance(); - Thumbnail* thm = cm->getEntry( argv1 ); + Thumbnail* thm = cm->getEntry ( argv1 ); - if(thm) { + if (thm) { int error; - rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, nullptr); - epanel->open( thm, ii ); + rtengine::InitialImage *ii = rtengine::InitialImage::load (argv1, thm->getType() == FT_Raw, &error, nullptr); + epanel->open ( thm, ii ); } } else { mainNB = Gtk::manage (new Gtk::Notebook ()); mainNB->set_name ("MainNotebook"); mainNB->set_scrollable (true); - mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) ); + mainNB->signal_switch_page().connect_notify ( sigc::mem_fun (*this, &RTWindow::on_mainNB_switch_page) ); // Editor panel fpanel = new FilePanel () ; @@ -178,20 +180,20 @@ RTWindow::RTWindow () // decorate tab Gtk::Grid* fpanelLabelGrid = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - Gtk::Label* fpl = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + setExpandAlignProperties (fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* fpl = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") )); if (options.mainNBVertical) { mainNB->set_tab_pos (Gtk::POS_LEFT); fpl->set_angle (90); - fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1); - fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_TOP, 1, 1); + fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1); + fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_TOP, 1, 1); } else { - fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1); - fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_RIGHT, 1, 1); + fpanelLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1); + fpanelLabelGrid->attach_next_to (*fpl, Gtk::POS_RIGHT, 1, 1); } - fpanelLabelGrid->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); + fpanelLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_FILEBROWSER_TOOLTIP")); fpanelLabelGrid->show_all (); mainNB->append_page (*fpanel, *fpanelLabelGrid); @@ -200,16 +202,16 @@ RTWindow::RTWindow () bpanel = Gtk::manage ( new BatchQueuePanel (fpanel->fileCatalog) ); // decorate tab, the label is unimportant since its updated in batchqueuepanel anyway - Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")) ); + Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M ("MAIN_FRAME_BATCHQUEUE")) ); if (options.mainNBVertical) { - lbq->set_angle(90); + lbq->set_angle (90); } mainNB->append_page (*bpanel, *lbq); - if(isSingleTabMode()) { + if (isSingleTabMode()) { createSetmEditor(); } @@ -225,46 +227,46 @@ RTWindow::RTWindow () //Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !? //Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"...")); Gtk::Button* preferences = Gtk::manage (new Gtk::Button ()); - setExpandAlignProperties(preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - preferences->set_image (*Gtk::manage(new RTImage ("gtk-preferences.png"))); - preferences->set_tooltip_markup (M("MAIN_BUTTON_PREFERENCES")); - preferences->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::showPreferences) ); + setExpandAlignProperties (preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + preferences->set_image (*Gtk::manage (new RTImage ("gtk-preferences.png"))); + preferences->set_tooltip_markup (M ("MAIN_BUTTON_PREFERENCES")); + preferences->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showPreferences) ); //btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN"))); - btn_fullscreen = Gtk::manage( new Gtk::Button()); - setExpandAlignProperties(btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - btn_fullscreen->set_tooltip_markup (M("MAIN_BUTTON_FULLSCREEN")); + btn_fullscreen = Gtk::manage ( new Gtk::Button()); + setExpandAlignProperties (btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN")); btn_fullscreen->set_image (*iFullscreen); - btn_fullscreen->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::toggle_fullscreen) ); - setExpandAlignProperties(&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - prProgBar.set_show_text(true); + btn_fullscreen->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::toggle_fullscreen) ); + setExpandAlignProperties (&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + prProgBar.set_show_text (true); Gtk::Grid* actionGrid = Gtk::manage (new Gtk::Grid ()); - actionGrid->set_row_spacing(2); - actionGrid->set_column_spacing(2); + actionGrid->set_row_spacing (2); + actionGrid->set_column_spacing (2); - setExpandAlignProperties(actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties (actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); if (options.mainNBVertical) { - prProgBar.set_orientation(Gtk::ORIENTATION_VERTICAL); - prProgBar.set_inverted(true); - actionGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); - actionGrid->attach_next_to(prProgBar, Gtk::POS_BOTTOM, 1, 1); - actionGrid->attach_next_to(*preferences, Gtk::POS_BOTTOM, 1, 1); - actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); - mainNB->set_action_widget(actionGrid, Gtk::PACK_END); + prProgBar.set_orientation (Gtk::ORIENTATION_VERTICAL); + prProgBar.set_inverted (true); + actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL); + actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); + mainNB->set_action_widget (actionGrid, Gtk::PACK_END); } else { - prProgBar.set_orientation(Gtk::ORIENTATION_HORIZONTAL); - actionGrid->set_orientation(Gtk::ORIENTATION_HORIZONTAL); - actionGrid->attach_next_to(prProgBar, Gtk::POS_RIGHT, 1, 1); - actionGrid->attach_next_to(*preferences, Gtk::POS_RIGHT, 1, 1); - actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); - mainNB->set_action_widget(actionGrid, Gtk::PACK_END); + prProgBar.set_orientation (Gtk::ORIENTATION_HORIZONTAL); + actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL); + actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); + mainNB->set_action_widget (actionGrid, Gtk::PACK_END); } actionGrid->show_all(); - pldBridge = new PLDBridge(static_cast(this)); + pldBridge = new PLDBridge (static_cast (this)); add (*mainNB); show_all (); @@ -272,9 +274,10 @@ RTWindow::RTWindow () bpanel->init (this); if (!argv1.empty() && !remote) { - Thumbnail* thm = cacheMgr->getEntry(argv1); + Thumbnail* thm = cacheMgr->getEntry (argv1); + if (thm) { - fpanel->fileCatalog->openRequested({thm}); + fpanel->fileCatalog->openRequested ({thm}); } } } @@ -282,7 +285,7 @@ RTWindow::RTWindow () RTWindow::~RTWindow() { - if(!simpleEditor) { + if (!simpleEditor) { delete pldBridge; } @@ -300,7 +303,7 @@ void RTWindow::on_realize () { Gtk::Window::on_realize (); - if( fpanel ) { + if ( fpanel ) { fpanel->setAspect(); } @@ -308,19 +311,20 @@ void RTWindow::on_realize () epanel->setAspect(); } - mainWindowCursorManager.init(get_window()); + mainWindowCursorManager.init (get_window()); // Display release notes only if new major version. // Pattern matches "5.1" from "5.1-23-g12345678" std::string vs[] = {versionString, options.version}; - std::regex pat("(^[0-9.]+).*"); + std::regex pat ("(^[0-9.]+).*"); std::smatch sm; std::vector vMajor; + for (const auto &v : vs) { - if (std::regex_match(v, sm, pat)) { + if (std::regex_match (v, sm, pat)) { if (sm.size() == 2) { std::ssub_match smsub = sm[1]; - vMajor.push_back(smsub.str()); + vMajor.push_back (smsub.str()); } } } @@ -333,7 +337,7 @@ void RTWindow::on_realize () splash = new Splash (*this); splash->set_transient_for (*this); - splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) ); + splash->signal_delete_event().connect ( sigc::mem_fun (*this, &RTWindow::splashClosed) ); if (splash->hasReleaseNotes()) { splash->showReleaseNotes(); @@ -346,38 +350,39 @@ void RTWindow::on_realize () } } -bool RTWindow::on_configure_event(GdkEventConfigure* event) +bool RTWindow::on_configure_event (GdkEventConfigure* event) { if (!is_maximized() && is_visible()) { - get_size(options.windowWidth, options.windowHeight); + get_size (options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } - return Gtk::Widget::on_configure_event(event); + return Gtk::Widget::on_configure_event (event); } -bool RTWindow::on_window_state_event(GdkEventWindowState* event) +bool RTWindow::on_window_state_event (GdkEventWindowState* event) { if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED; } - return Gtk::Widget::on_window_state_event(event); + + return Gtk::Widget::on_window_state_event (event); } -void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) +void RTWindow::on_mainNB_switch_page (Gtk::Widget* widget, guint page_num) { - if(!on_delete_has_run) { - if(isEditorPanel(page_num)) { + if (!on_delete_has_run) { + if (isEditorPanel (page_num)) { if (isSingleTabMode() && epanel) { MoveFileBrowserToEditor(); } - EditorPanel *ep = static_cast(mainNB->get_nth_page(page_num)); + EditorPanel *ep = static_cast (mainNB->get_nth_page (page_num)); ep->setAspect(); if (!isSingleTabMode()) { if (filesEdited.size() > 0) { - set_title_decorated(ep->getFileName()); + set_title_decorated (ep->getFileName()); } } } else { @@ -387,7 +392,7 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) epanel->saveProfile(); // Moving the FileBrowser only if the user has switched to the FileBrowser tab - if (mainNB->get_nth_page(page_num) == fpanel) { + if (mainNB->get_nth_page (page_num) == fpanel) { MoveFileBrowserToMain(); } } @@ -398,32 +403,32 @@ void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) { if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); + EditWindow * wndEdit = EditWindow::getInstance (this); wndEdit->show(); - wndEdit->addEditorPanel(ep, name); + wndEdit->addEditorPanel (ep, name); wndEdit->toFront(); } else { ep->setParent (this); - ep->setParentWindow(this); + ep->setParentWindow (this); // construct closeable tab for the image Gtk::Grid* titleGrid = Gtk::manage (new Gtk::Grid ()); titleGrid->set_tooltip_markup (name); - RTImage *closebimg = Gtk::manage(new RTImage ("gtk-close.png")); + RTImage *closebimg = Gtk::manage (new RTImage ("gtk-close.png")); Gtk::Button* closeb = Gtk::manage (new Gtk::Button ()); closeb->set_name ("CloseButton"); closeb->add (*closebimg); closeb->set_relief (Gtk::RELIEF_NONE); closeb->set_focus_on_click (false); - closeb->signal_clicked().connect( sigc::bind (sigc::mem_fun(*this, &RTWindow::remEditorPanel) , ep)); + closeb->signal_clicked().connect ( sigc::bind (sigc::mem_fun (*this, &RTWindow::remEditorPanel), ep)); - titleGrid->attach_next_to(*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1); - titleGrid->attach_next_to(*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1); - titleGrid->attach_next_to(*closeb, Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to (*closeb, Gtk::POS_RIGHT, 1, 1); titleGrid->show_all (); //GTK318 #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 - titleGrid->set_column_spacing(2); + titleGrid->set_column_spacing (2); #endif //GTK318 @@ -432,11 +437,11 @@ void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) mainNB->set_current_page (mainNB->page_num (*ep)); mainNB->set_tab_reorderable (*ep, true); - set_title_decorated(name); + set_title_decorated (name); epanels[ name ] = ep; filesEdited.insert ( name ); fpanel->refreshEditedState (filesEdited); - ep->tbTopPanel_1_visible(false); //hide the toggle Top Panel button + ep->tbTopPanel_1_visible (false); //hide the toggle Top Panel button } } @@ -447,8 +452,8 @@ void RTWindow::remEditorPanel (EditorPanel* ep) } if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); - wndEdit->remEditorPanel(ep); + EditWindow * wndEdit = EditWindow::getInstance (this); + wndEdit->remEditorPanel (ep); } else { bool queueHadFocus = (mainNB->get_current_page() == mainNB->page_num (*bpanel)); epanels.erase (ep->getFileName()); @@ -457,37 +462,37 @@ void RTWindow::remEditorPanel (EditorPanel* ep) mainNB->remove_page (*ep); - if (!isEditorPanel(mainNB->get_current_page())) { - if(!queueHadFocus) { + if (!isEditorPanel (mainNB->get_current_page())) { + if (!queueHadFocus) { mainNB->set_current_page (mainNB->page_num (*fpanel)); } - set_title_decorated(""); + set_title_decorated (""); } else { - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); - set_title_decorated(ep->getFileName()); + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); + set_title_decorated (ep->getFileName()); } // TODO: ask what to do: close & apply, close & apply selection, close & revert, cancel } } -bool RTWindow::selectEditorPanel(const std::string &name) +bool RTWindow::selectEditorPanel (const std::string &name) { if (options.multiDisplayMode > 0) { - EditWindow * wndEdit = EditWindow::getInstance(this); + EditWindow * wndEdit = EditWindow::getInstance (this); - if (wndEdit->selectEditorPanel(name)) { - set_title_decorated(name); + if (wndEdit->selectEditorPanel (name)) { + set_title_decorated (name); wndEdit->toFront(); return true; } } else { - std::map::iterator iep = epanels.find(name); + std::map::iterator iep = epanels.find (name); if (iep != epanels.end()) { mainNB->set_current_page (mainNB->page_num (*iep->second)); - set_title_decorated(name); + set_title_decorated (name); return true; } else { //set_title_decorated(name); @@ -521,12 +526,12 @@ bool RTWindow::keyPressed (GdkEventKey* event) #endif if (try_quit) { - if (!on_delete_event(nullptr)) { + if (!on_delete_event (nullptr)) { gtk_main_quit(); } } - if(event->keyval == GDK_KEY_F11) { + if (event->keyval == GDK_KEY_F11) { toggle_fullscreen(); } @@ -537,40 +542,40 @@ bool RTWindow::keyPressed (GdkEventKey* event) }; if (ctrl) { - switch(event->keyval) { - case GDK_KEY_F2: // file browser panel - mainNB->set_current_page (mainNB->page_num (*fpanel)); - return true; - - case GDK_KEY_F3: // batch queue panel - mainNB->set_current_page (mainNB->page_num (*bpanel)); - return true; - - case GDK_KEY_F4: //single tab mode, editor panel - if (isSingleTabMode() && epanel) { - mainNB->set_current_page (mainNB->page_num (*epanel)); - } - - return true; - - case GDK_KEY_w: //multi-tab mode, close editor panel - if (!isSingleTabMode() && - mainNB->get_current_page() != mainNB->page_num(*fpanel) && - mainNB->get_current_page() != mainNB->page_num(*bpanel)) { - - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); - remEditorPanel (ep); + switch (event->keyval) { + case GDK_KEY_F2: // file browser panel + mainNB->set_current_page (mainNB->page_num (*fpanel)); return true; - } + + case GDK_KEY_F3: // batch queue panel + mainNB->set_current_page (mainNB->page_num (*bpanel)); + return true; + + case GDK_KEY_F4: //single tab mode, editor panel + if (isSingleTabMode() && epanel) { + mainNB->set_current_page (mainNB->page_num (*epanel)); + } + + return true; + + case GDK_KEY_w: //multi-tab mode, close editor panel + if (!isSingleTabMode() && + mainNB->get_current_page() != mainNB->page_num (*fpanel) && + mainNB->get_current_page() != mainNB->page_num (*bpanel)) { + + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); + remEditorPanel (ep); + return true; + } } } - if (mainNB->get_current_page() == mainNB->page_num(*fpanel)) { + if (mainNB->get_current_page() == mainNB->page_num (*fpanel)) { return fpanel->handleShortcutKey (event); - } else if (mainNB->get_current_page() == mainNB->page_num(*bpanel)) { + } else if (mainNB->get_current_page() == mainNB->page_num (*bpanel)) { return bpanel->handleShortcutKey (event); } else { - EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); + EditorPanel* ep = static_cast (mainNB->get_nth_page (mainNB->get_current_page())); return ep->handleShortcutKey (event); } @@ -581,7 +586,7 @@ void RTWindow::addBatchQueueJob (BatchQueueEntry* bqe, bool head) { std::vector entries; - entries.push_back(bqe); + entries.push_back (bqe); bpanel->addBatchQueueJobs (entries, head); fpanel->queue_draw (); } @@ -593,7 +598,7 @@ void RTWindow::addBatchQueueJobs (std::vector &entries) fpanel->queue_draw (); } -bool RTWindow::on_delete_event(GdkEventAny* event) +bool RTWindow::on_delete_event (GdkEventAny* event) { if (on_delete_has_run) { @@ -608,14 +613,14 @@ bool RTWindow::on_delete_event(GdkEventAny* event) if (isSingleTabMode() || simpleEditor) { isProcessing = epanel->getIsProcessing(); } else if (options.multiDisplayMode > 0) { - editWindow = EditWindow::getInstance(this, false); + editWindow = EditWindow::getInstance (this, false); isProcessing = editWindow->isProcessing(); } else { int pageCount = mainNB->get_n_pages(); for (int i = 0; i < pageCount && !isProcessing; i++) { - if(isEditorPanel(i)) { - isProcessing |= (static_cast(mainNB->get_nth_page(i)))->getIsProcessing(); + if (isEditorPanel (i)) { + isProcessing |= (static_cast (mainNB->get_nth_page (i)))->getIsProcessing(); } } } @@ -624,11 +629,11 @@ bool RTWindow::on_delete_event(GdkEventAny* event) return true; } - if( fpanel ) { + if ( fpanel ) { fpanel->saveOptions (); } - if( bpanel ) { + if ( bpanel ) { bpanel->saveOptions (); } @@ -644,7 +649,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) // Look at the active panel first, if any, otherwise look at the first one (sorted on the filename) int page = mainNB->get_current_page(); - Gtk::Widget *w = mainNB->get_nth_page(page); + Gtk::Widget *w = mainNB->get_nth_page (page); bool optionsWritten = false; for (std::map::iterator i = epanels.begin(); i != epanels.end(); ++i) { @@ -667,18 +672,19 @@ bool RTWindow::on_delete_event(GdkEventAny* event) ProfilePanel::cleanup(); if (!options.windowMaximized) { - get_size(options.windowWidth, options.windowHeight); + get_size (options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } - options.windowMonitor = get_screen()->get_monitor_at_window(get_window()); + options.windowMonitor = get_screen()->get_monitor_at_window (get_window()); try { Options::save (); } catch (Options::Error &e) { - Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + Gtk::MessageDialog msgd (getToplevelWindow (this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); msgd.run(); } + hide(); on_delete_has_run = true; @@ -692,11 +698,13 @@ void RTWindow::showPreferences () delete pref; fpanel->optionsChanged (); + if (epanel) { - epanel->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + epanel->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); } + for (const auto &p : epanels) { - p.second->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + p.second->defaultMonitorProfileChanged (options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); } } @@ -729,7 +737,7 @@ void RTWindow::toggle_fullscreen () if (btn_fullscreen) { //btn_fullscreen->set_label(M("MAIN_BUTTON_FULLSCREEN")); - btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_FULLSCREEN")); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_FULLSCREEN")); btn_fullscreen->set_image (*iFullscreen); } } else { @@ -738,7 +746,7 @@ void RTWindow::toggle_fullscreen () if (btn_fullscreen) { //btn_fullscreen->set_label(M("MAIN_BUTTON_UNFULLSCREEN")); - btn_fullscreen->set_tooltip_markup(M("MAIN_BUTTON_UNFULLSCREEN")); + btn_fullscreen->set_tooltip_markup (M ("MAIN_BUTTON_UNFULLSCREEN")); btn_fullscreen->set_image (*iFullscreen_exit); } } @@ -761,50 +769,51 @@ void RTWindow::SetMainCurrent() void RTWindow::MoveFileBrowserToMain() { - if( fpanel->ribbonPane->get_children().empty()) { + if ( fpanel->ribbonPane->get_children().empty()) { FileCatalog *fCatalog = fpanel->fileCatalog; - epanel->catalogPane->remove(*fCatalog); - fpanel->ribbonPane->add(*fCatalog); - fCatalog->enableTabMode(false); - fCatalog->tbLeftPanel_1_visible(true); - fCatalog->tbRightPanel_1_visible(true); + epanel->catalogPane->remove (*fCatalog); + fpanel->ribbonPane->add (*fCatalog); + fCatalog->enableTabMode (false); + fCatalog->tbLeftPanel_1_visible (true); + fCatalog->tbRightPanel_1_visible (true); } } void RTWindow::MoveFileBrowserToEditor() { - if(epanel->catalogPane->get_children().empty() ) { + if (epanel->catalogPane->get_children().empty() ) { FileCatalog *fCatalog = fpanel->fileCatalog; - fpanel->ribbonPane->remove(*fCatalog); + fpanel->ribbonPane->remove (*fCatalog); fCatalog->disableInspector(); - epanel->catalogPane->add(*fCatalog); - epanel->showTopPanel(options.editorFilmStripOpened); - fCatalog->enableTabMode(true); + epanel->catalogPane->add (*fCatalog); + epanel->showTopPanel (options.editorFilmStripOpened); + fCatalog->enableTabMode (true); fCatalog->refreshHeight(); - fCatalog->tbLeftPanel_1_visible(false); - fCatalog->tbRightPanel_1_visible(false); + fCatalog->tbLeftPanel_1_visible (false); + fCatalog->tbRightPanel_1_visible (false); } } -void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +void RTWindow::updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) { - if(epanel) { - epanel->updateProfiles(printerProfile, printerIntent, printerBPC); + if (epanel) { + epanel->updateProfiles (printerProfile, printerIntent, printerBPC); } - for(auto panel : epanels) { - panel.second->updateProfiles(printerProfile, printerIntent, printerBPC); + for (auto panel : epanels) { + panel.second->updateProfiles (printerProfile, printerIntent, printerBPC); } } void RTWindow::updateTPVScrollbar (bool hide) { fpanel->updateTPVScrollbar (hide); - if(epanel) { + + if (epanel) { epanel->updateTPVScrollbar (hide); } - for(auto panel : epanels) { + for (auto panel : epanels) { panel.second->updateTPVScrollbar (hide); } } @@ -812,11 +821,12 @@ void RTWindow::updateTPVScrollbar (bool hide) void RTWindow::updateTabsUsesIcons (bool useIcons) { fpanel->updateTabsUsesIcons (useIcons); - if(epanel) { + + if (epanel) { epanel->updateTabsUsesIcons (useIcons); } - for(auto panel : epanels) { + for (auto panel : epanels) { panel.second->updateTabsUsesIcons (useIcons); } } @@ -833,22 +843,23 @@ void RTWindow::updateFBToolBarVisibility (bool showFilmStripToolBar) void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) { - if(epanel) { + if (epanel) { epanel->updateHistogramPosition (oldPosition, newPosition); } - for(auto panel : epanels) { + + for (auto panel : epanels) { panel.second->updateHistogramPosition (oldPosition, newPosition); } } -bool RTWindow::splashClosed(GdkEventAny* event) +bool RTWindow::splashClosed (GdkEventAny* event) { delete splash; splash = nullptr; return true; } -void RTWindow::set_title_decorated(Glib::ustring fname) +void RTWindow::set_title_decorated (Glib::ustring fname) { Glib::ustring subtitle; @@ -856,7 +867,7 @@ void RTWindow::set_title_decorated(Glib::ustring fname) subtitle = " - " + fname; } - set_title(versionStr + subtitle); + set_title (versionStr + subtitle); } void RTWindow::closeOpenEditors() @@ -864,36 +875,36 @@ void RTWindow::closeOpenEditors() std::map::const_iterator itr; itr = epanels.begin(); - while(itr != epanels.end()) { - remEditorPanel((*itr).second); + while (itr != epanels.end()) { + remEditorPanel ((*itr).second); itr = epanels.begin(); } } -bool RTWindow::isEditorPanel(Widget* panel) +bool RTWindow::isEditorPanel (Widget* panel) { return (panel != bpanel) && (panel != fpanel); } -bool RTWindow::isEditorPanel(guint pageNum) +bool RTWindow::isEditorPanel (guint pageNum) { - return isEditorPanel(mainNB->get_nth_page(pageNum)); + return isEditorPanel (mainNB->get_nth_page (pageNum)); } -void RTWindow::setEditorMode(bool tabbedUI) +void RTWindow::setEditorMode (bool tabbedUI) { MoveFileBrowserToMain(); closeOpenEditors(); SetMainCurrent(); - if(tabbedUI) { - mainNB->remove_page(*epanel); + if (tabbedUI) { + mainNB->remove_page (*epanel); epanel = nullptr; - set_title_decorated(""); + set_title_decorated (""); } else { createSetmEditor(); epanel->show_all(); - set_title_decorated(""); + set_title_decorated (""); } } @@ -902,25 +913,25 @@ void RTWindow::createSetmEditor() // Editor panel, single-tab mode only epanel = Gtk::manage ( new EditorPanel (fpanel) ); epanel->setParent (this); - epanel->setParentWindow(this); + epanel->setParentWindow (this); // decorate tab Gtk::Grid* const editorLabelGrid = Gtk::manage (new Gtk::Grid ()); - setExpandAlignProperties(editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - Gtk::Label* const el = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + setExpandAlignProperties (editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* const el = Gtk::manage (new Gtk::Label ( Glib::ustring (" ") + M ("MAIN_FRAME_EDITOR") )); const auto pos = options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT; if (options.mainNBVertical) { - el->set_angle(90); + el->set_angle (90); } - editorLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1); - editorLabelGrid->attach_next_to(*el, pos, 1, 1); + editorLabelGrid->attach_next_to (*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1); + editorLabelGrid->attach_next_to (*el, pos, 1, 1); - editorLabelGrid->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP")); + editorLabelGrid->set_tooltip_markup (M ("MAIN_FRAME_EDITOR_TOOLTIP")); editorLabelGrid->show_all (); - epanel->tbTopPanel_1_visible(true); //show the toggle Top Panel button + epanel->tbTopPanel_1_visible (true); //show the toggle Top Panel button mainNB->append_page (*epanel, *editorLabelGrid); } From ed354a592649bed150ae14e7e6b1d368e09a4878 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 25 Aug 2017 21:39:00 +0200 Subject: [PATCH 039/126] Moved green equilibration pass one from to green_equil_RT.cc, removed timing code. Fixes #4034 --- rtengine/green_equil_RT.cc | 240 ++++++++++++++++++++++--------------- rtengine/rawimagesource.cc | 45 ++----- rtengine/rawimagesource.h | 1 + 3 files changed, 153 insertions(+), 133 deletions(-) diff --git a/rtengine/green_equil_RT.cc b/rtengine/green_equil_RT.cc index 53943e9a8..91093550d 100644 --- a/rtengine/green_equil_RT.cc +++ b/rtengine/green_equil_RT.cc @@ -3,9 +3,10 @@ // Green Equilibration via directional average // // copyright (c) 2008-2010 Emil Martinec +// optimized for speed 2017 Ingo Weyrich // // -// code dated: February 12, 2011 +// code dated: August 25, 2017 // // green_equil_RT.cc is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -21,13 +22,11 @@ // along with this program. If not, see . // //////////////////////////////////////////////////////////////// -#define TS 256 // Tile size #include #include #include - #include "rt_math.h" #include "rawimagesource.h" #include "opthelper.h" @@ -35,6 +34,50 @@ namespace rtengine { +void RawImageSource::green_equilibrate_global(array2D &rawData) +{ + // global correction + int ng1 = 0, ng2 = 0; + double avgg1 = 0., avgg2 = 0.; + +#ifdef _OPENMP + #pragma omp parallel for reduction(+: ng1, ng2, avgg1, avgg2) schedule(dynamic,16) +#endif + + for (int i = border; i < H - border; i++) { + double avgg = 0.; + + for (int j = border + ((FC(i, border) & 1) ^ 1); j < W - border; j += 2) { + avgg += rawData[i][j]; + } + + int ng = (W - 2 * border + (FC(i, border) & 1)) / 2; + + if (i & 1) { + avgg2 += avgg; + ng2 += ng; + } else { + avgg1 += avgg; + ng1 += ng; + } + } + + double corrg1 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg1 / ng1); + double corrg2 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg2 / ng2); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for (int i = border; i < H - border; i++) { + double corrg = (i & 1) ? corrg2 : corrg1; + + for (int j = border + ((FC(i, border) & 1) ^ 1); j < W - border; j += 2) { + rawData[i][j] *= corrg; + } + } +} + //void green_equilibrate()//for dcraw implementation void RawImageSource::green_equilibrate(float thresh, array2D &rawData) { @@ -49,15 +92,19 @@ void RawImageSource::green_equilibrate(float thresh, array2D &rawData) #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif - for(int i = 0; i < height; ++i) { - int j = (FC(i,0) & 1) ^ 1; + + for (int i = 0; i < height; ++i) { + int j = (FC(i, 0) & 1) ^ 1; #ifdef __SSE2__ - for(; j < width - 7; j += 8) { - STVFU(cfa[i][j>>1], LC2VFU(rawData[i][j])); + + for (; j < width - 7; j += 8) { + STVFU(cfa[i][j >> 1], LC2VFU(rawData[i][j])); } + #endif - for(; j < width; j += 2) { - cfa[i][j>>1] = rawData[i][j]; + + for (; j < width; j += 2) { + cfa[i][j >> 1] = rawData[i][j]; } } @@ -75,113 +122,114 @@ void RawImageSource::green_equilibrate(float thresh, array2D &rawData) #ifdef _OPENMP #pragma omp parallel #endif -{ + { #ifdef __SSE2__ - vfloat zd5v = F2V(0.5f); - vfloat onev = F2V(1.f); - vfloat threshv = F2V(thresh); - vfloat thresh6v = F2V(thresh6); - vfloat epsv = F2V(eps); + vfloat zd5v = F2V(0.5f); + vfloat onev = F2V(1.f); + vfloat threshv = F2V(thresh); + vfloat thresh6v = F2V(thresh6); + vfloat epsv = F2V(eps); #endif #ifdef _OPENMP - #pragma omp for schedule(dynamic,16) + #pragma omp for schedule(dynamic,16) #endif - for (int rr = 4; rr < height - 4; rr++) { - int cc = 5 - (FC(rr, 2) & 1); + for (int rr = 4; rr < height - 4; rr++) { + int cc = 5 - (FC(rr, 2) & 1); #ifdef __SSE2__ - for (; cc < width - 12; cc += 8) { - //neighbour checking code from Manuel Llorens Garcia - vfloat o1_1 = LVFU(cfa[rr - 1][(cc - 1)>>1]); - vfloat o1_2 = LVFU(cfa[rr - 1][(cc + 1)>>1]); - vfloat o1_3 = LVFU(cfa[rr + 1][(cc - 1)>>1]); - vfloat o1_4 = LVFU(cfa[rr + 1][(cc + 1)>>1]); - vfloat o2_1 = LVFU(cfa[rr - 2][cc>>1]); - vfloat o2_2 = LVFU(cfa[rr + 2][cc>>1]); - vfloat o2_3 = LVFU(cfa[rr][(cc - 2)>>1]); - vfloat o2_4 = LVFU(cfa[rr][(cc + 2)>>1]); - vfloat d1 = (o1_1 + o1_2 + o1_3 + o1_4); - vfloat d2 = (o2_1 + o2_2 + o2_3 + o2_4); + for (; cc < width - 12; cc += 8) { + //neighbour checking code from Manuel Llorens Garcia + vfloat o1_1 = LVFU(cfa[rr - 1][(cc - 1) >> 1]); + vfloat o1_2 = LVFU(cfa[rr - 1][(cc + 1) >> 1]); + vfloat o1_3 = LVFU(cfa[rr + 1][(cc - 1) >> 1]); + vfloat o1_4 = LVFU(cfa[rr + 1][(cc + 1) >> 1]); + vfloat o2_1 = LVFU(cfa[rr - 2][cc >> 1]); + vfloat o2_2 = LVFU(cfa[rr + 2][cc >> 1]); + vfloat o2_3 = LVFU(cfa[rr][(cc >> 1) - 1]); + vfloat o2_4 = LVFU(cfa[rr][(cc >> 1) + 1]); - vfloat c1 = (vabsf(o1_1 - o1_2) + vabsf(o1_1 - o1_3) + vabsf(o1_1 - o1_4) + vabsf(o1_2 - o1_3) + vabsf(o1_3 - o1_4) + vabsf(o1_2 - o1_4)); - vfloat c2 = (vabsf(o2_1 - o2_2) + vabsf(o2_1 - o2_3) + vabsf(o2_1 - o2_4) + vabsf(o2_2 - o2_3) + vabsf(o2_3 - o2_4) + vabsf(o2_2 - o2_4)); + vfloat d1 = (o1_1 + o1_2 + o1_3 + o1_4); + vfloat d2 = (o2_1 + o2_2 + o2_3 + o2_4); - vmask mask1 = vmaskf_lt(c1 + c2, thresh6v * vabsf(d1 - d2)); - if(_mm_movemask_ps((vfloat)mask1)) { // if for any of the 4 pixels the condition is true, do the maths for all 4 pixels and mask the unused out at the end - //pixel interpolation - vfloat gin = LVFU(cfa[rr][cc>>1]); + vfloat c1 = (vabsf(o1_1 - o1_2) + vabsf(o1_1 - o1_3) + vabsf(o1_1 - o1_4) + vabsf(o1_2 - o1_3) + vabsf(o1_3 - o1_4) + vabsf(o1_2 - o1_4)); + vfloat c2 = (vabsf(o2_1 - o2_2) + vabsf(o2_1 - o2_3) + vabsf(o2_1 - o2_4) + vabsf(o2_2 - o2_3) + vabsf(o2_3 - o2_4) + vabsf(o2_2 - o2_4)); - vfloat gmp2p2 = gin - LVFU(cfa[rr + 2][(cc + 2)>>1]); - vfloat gmm2m2 = gin - LVFU(cfa[rr - 2][(cc - 2)>>1]); - vfloat gmm2p2 = gin - LVFU(cfa[rr - 2][(cc + 2)>>1]); - vfloat gmp2m2 = gin - LVFU(cfa[rr + 2][(cc - 2)>>1]); + vmask mask1 = vmaskf_lt(c1 + c2, thresh6v * vabsf(d1 - d2)); - vfloat gse = o1_4 + zd5v * gmp2p2; - vfloat gnw = o1_1 + zd5v * gmm2m2; - vfloat gne = o1_2 + zd5v * gmm2p2; - vfloat gsw = o1_3 + zd5v * gmp2m2; + if (_mm_movemask_ps((vfloat)mask1)) { // if for any of the 4 pixels the condition is true, do the maths for all 4 pixels and mask the unused out at the end + //pixel interpolation + vfloat gin = LVFU(cfa[rr][cc >> 1]); - vfloat wtse = onev / (epsv + SQRV(gmp2p2) + SQRV(LVFU(cfa[rr + 3][(cc + 3)>>1]) - o1_4)); - vfloat wtnw = onev / (epsv + SQRV(gmm2m2) + SQRV(LVFU(cfa[rr - 3][(cc - 3)>>1]) - o1_1)); - vfloat wtne = onev / (epsv + SQRV(gmm2p2) + SQRV(LVFU(cfa[rr - 3][(cc + 3)>>1]) - o1_2)); - vfloat wtsw = onev / (epsv + SQRV(gmp2m2) + SQRV(LVFU(cfa[rr + 3][(cc - 3)>>1]) - o1_3)); + vfloat gmp2p2 = gin - LVFU(cfa[rr + 2][(cc >> 1) + 1]); + vfloat gmm2m2 = gin - LVFU(cfa[rr - 2][(cc >> 1) - 1]); + vfloat gmm2p2 = gin - LVFU(cfa[rr - 2][(cc >> 1) + 1]); + vfloat gmp2m2 = gin - LVFU(cfa[rr + 2][(cc >> 1) - 1]); - vfloat ginterp = (gse * wtse + gnw * wtnw + gne * wtne + gsw * wtsw) / (wtse + wtnw + wtne + wtsw); + vfloat gse = o1_4 + zd5v * gmp2p2; + vfloat gnw = o1_1 + zd5v * gmm2m2; + vfloat gne = o1_2 + zd5v * gmm2p2; + vfloat gsw = o1_3 + zd5v * gmp2m2; - vfloat val = vself(vmaskf_lt(ginterp - gin, threshv * (ginterp + gin)), zd5v * (ginterp + gin), gin); - val = vself(mask1, val, gin); - STC2VFU(rawData[rr][cc], val); - } - } -#endif - for (; cc < width - 6; cc += 2) { - //neighbour checking code from Manuel Llorens Garcia - float o1_1 = cfa[rr - 1][(cc - 1)>>1]; - float o1_2 = cfa[rr - 1][(cc + 1)>>1]; - float o1_3 = cfa[rr + 1][(cc - 1)>>1]; - float o1_4 = cfa[rr + 1][(cc + 1)>>1]; - float o2_1 = cfa[rr - 2][cc>>1]; - float o2_2 = cfa[rr + 2][cc>>1]; - float o2_3 = cfa[rr][(cc - 2)>>1]; - float o2_4 = cfa[rr][(cc + 2)>>1]; + vfloat wtse = onev / (epsv + SQRV(gmp2p2) + SQRV(LVFU(cfa[rr + 3][(cc + 3) >> 1]) - o1_4)); + vfloat wtnw = onev / (epsv + SQRV(gmm2m2) + SQRV(LVFU(cfa[rr - 3][(cc - 3) >> 1]) - o1_1)); + vfloat wtne = onev / (epsv + SQRV(gmm2p2) + SQRV(LVFU(cfa[rr - 3][(cc + 3) >> 1]) - o1_2)); + vfloat wtsw = onev / (epsv + SQRV(gmp2m2) + SQRV(LVFU(cfa[rr + 3][(cc - 3) >> 1]) - o1_3)); - float d1 = (o1_1 + o1_2) + (o1_3 + o1_4); - float d2 = (o2_1 + o2_2) + (o2_3 + o2_4); + vfloat ginterp = (gse * wtse + gnw * wtnw + gne * wtne + gsw * wtsw) / (wtse + wtnw + wtne + wtsw); - float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)); - float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)); - - if (c1 + c2 < thresh6 * fabs(d1 - d2)) { - //pixel interpolation - float gin = cfa[rr][cc>>1]; - - float gmp2p2 = gin - cfa[rr + 2][(cc + 2)>>1]; - float gmm2m2 = gin - cfa[rr - 2][(cc - 2)>>1]; - float gmm2p2 = gin - cfa[rr - 2][(cc + 2)>>1]; - float gmp2m2 = gin - cfa[rr + 2][(cc - 2)>>1]; - - float gse = o1_4 + 0.5f * gmp2p2; - float gnw = o1_1 + 0.5f * gmm2m2; - float gne = o1_2 + 0.5f * gmm2p2; - float gsw = o1_3 + 0.5f * gmp2m2; - - float wtse = 1.f / (eps + SQR(gmp2p2) + SQR(cfa[rr + 3][(cc + 3)>>1] - o1_4)); - float wtnw = 1.f / (eps + SQR(gmm2m2) + SQR(cfa[rr - 3][(cc - 3)>>1] - o1_1)); - float wtne = 1.f / (eps + SQR(gmm2p2) + SQR(cfa[rr - 3][(cc + 3)>>1] - o1_2)); - float wtsw = 1.f / (eps + SQR(gmp2m2) + SQR(cfa[rr + 3][(cc - 3)>>1] - o1_3)); - - float ginterp = (gse * wtse + gnw * wtnw + gne * wtne + gsw * wtsw) / (wtse + wtnw + wtne + wtsw); - - if (ginterp - gin < thresh * (ginterp + gin)) { - rawData[rr][cc] = 0.5f * (ginterp + gin); + vfloat val = vself(vmaskf_lt(ginterp - gin, threshv * (ginterp + gin)), zd5v * (ginterp + gin), gin); + val = vself(mask1, val, gin); + STC2VFU(rawData[rr][cc], val); } + } +#endif + + for (; cc < width - 6; cc += 2) { + //neighbour checking code from Manuel Llorens Garcia + float o1_1 = cfa[rr - 1][(cc - 1) >> 1]; + float o1_2 = cfa[rr - 1][(cc + 1) >> 1]; + float o1_3 = cfa[rr + 1][(cc - 1) >> 1]; + float o1_4 = cfa[rr + 1][(cc + 1) >> 1]; + float o2_1 = cfa[rr - 2][cc >> 1]; + float o2_2 = cfa[rr + 2][cc >> 1]; + float o2_3 = cfa[rr][(cc - 2) >> 1]; + float o2_4 = cfa[rr][(cc + 2) >> 1]; + + float d1 = (o1_1 + o1_2) + (o1_3 + o1_4); + float d2 = (o2_1 + o2_2) + (o2_3 + o2_4); + + float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)); + float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)); + + if (c1 + c2 < thresh6 * fabs(d1 - d2)) { + //pixel interpolation + float gin = cfa[rr][cc >> 1]; + + float gmp2p2 = gin - cfa[rr + 2][(cc + 2) >> 1]; + float gmm2m2 = gin - cfa[rr - 2][(cc - 2) >> 1]; + float gmm2p2 = gin - cfa[rr - 2][(cc + 2) >> 1]; + float gmp2m2 = gin - cfa[rr + 2][(cc - 2) >> 1]; + + float gse = o1_4 + 0.5f * gmp2p2; + float gnw = o1_1 + 0.5f * gmm2m2; + float gne = o1_2 + 0.5f * gmm2p2; + float gsw = o1_3 + 0.5f * gmp2m2; + + float wtse = 1.f / (eps + SQR(gmp2p2) + SQR(cfa[rr + 3][(cc + 3) >> 1] - o1_4)); + float wtnw = 1.f / (eps + SQR(gmm2m2) + SQR(cfa[rr - 3][(cc - 3) >> 1] - o1_1)); + float wtne = 1.f / (eps + SQR(gmm2p2) + SQR(cfa[rr - 3][(cc + 3) >> 1] - o1_2)); + float wtsw = 1.f / (eps + SQR(gmp2m2) + SQR(cfa[rr + 3][(cc - 3) >> 1] - o1_3)); + + float ginterp = (gse * wtse + gnw * wtnw + gne * wtne + gsw * wtsw) / (wtse + wtnw + wtne + wtsw); + + if (ginterp - gin < thresh * (ginterp + gin)) { + rawData[rr][cc] = 0.5f * (ginterp + gin); + } + } } } } } } -} - -#undef TS diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 9418de0ba..77710229a 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1913,48 +1913,19 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } } - // check if it is an olympus E camera, if yes, compute G channel pre-compensation factors + // check if it is an olympus E camera or green equilibration is enabled. If yes, compute G channel pre-compensation factors if ( ri->getSensorType() == ST_BAYER && (raw.bayersensor.greenthresh || (((idata->getMake().size() >= 7 && idata->getMake().substr(0, 7) == "OLYMPUS" && idata->getModel()[0] == 'E') || (idata->getMake().size() >= 9 && idata->getMake().substr(0, 9) == "Panasonic")) && raw.bayersensor.method != RAWParams::BayerSensor::methodstring[ RAWParams::BayerSensor::vng4])) ) { - StopWatch stop1("gel part one"); // global correction - int ng1 = 0, ng2 = 0; - double avgg1 = 0., avgg2 = 0.; - -#ifdef _OPENMP - #pragma omp parallel for reduction(+: ng1, ng2, avgg1, avgg2) schedule(dynamic,16) -#endif - - for (int i = border; i < H - border; i++) { - double avgg = 0.; - for (int j = border + ((FC(i, border) & 1) ^ 1); j < W - border; j += 2) { - avgg += rawData[i][j]; - } - int ng = (W - 2 * border + (FC(i, border) & 1)) / 2; - if (i & 1) { - avgg2 += avgg; - ng2 += ng; - } else { - avgg1 += avgg; - ng1 += ng; - } - } - double corrg1 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg1 / ng1); - double corrg2 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg2 / ng2); - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) -#endif - - for (int i = border; i < H - border; i++) { - double corrg = (i & 1) ? corrg2 : corrg1; - for (int j = border + ((FC(i, border) & 1) ^ 1); j < W - border; j += 2) { - rawData[i][j] *= corrg; + if(numFrames == 4) { + for(int i = 0; i < 4; ++i) { + green_equilibrate_global(*rawDataFrames[i]); } + } else { + green_equilibrate_global(rawData); } } if ( ri->getSensorType() == ST_BAYER && raw.bayersensor.greenthresh > 0) { - StopWatch Stop1("gel part two"); if (plistener) { plistener->setProgressStr ("Green equilibrate..."); plistener->setProgress (0.0); @@ -1962,10 +1933,10 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le if(numFrames == 4) { for(int i = 0; i < 4; ++i) { - green_equilibrate(0.01 * (raw.bayersensor.greenthresh), *rawDataFrames[i]); + green_equilibrate(0.01 * raw.bayersensor.greenthresh, *rawDataFrames[i]); } } else { - green_equilibrate(0.01 * (raw.bayersensor.greenthresh), rawData); + green_equilibrate(0.01 * raw.bayersensor.greenthresh, rawData); } } diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index bc2589408..8ce27f289 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -233,6 +233,7 @@ protected: void cfa_linedn (float linenoiselevel);//Emil's line denoise + void green_equilibrate_global (array2D &rawData); void green_equilibrate (float greenthresh, array2D &rawData);//Emil's green equilibration void nodemosaic(bool bw); From 9579203a99a98068dee82c3e1d511dfaf720c040 Mon Sep 17 00:00:00 2001 From: johenning Date: Sat, 26 Aug 2017 15:55:00 +0200 Subject: [PATCH 040/126] Fixed double backslash case If the first two symbols in the path are backslashes, we should not treat them like a single backslash, as one refers to root and the other to a network path. --- rtgui/batchqueue.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index da042347d..03cc9535c 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -743,8 +743,15 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam da.push_back (tok); } - if (origFileName[0] == '/' || origFileName[0] == '\\') { + if (origFileName[0] == '/') { pa.push_back ("/" + da[0]); + } else if (origFileName[0] == '\\') { + if (origFileName[1] == '\\') { + pa.push_back ("\\\\" + da[0]); + } + else { + pa.push_back ("/" + da[0]); + } } else { pa.push_back (da[0]); } From 9e6888070ddb127c2b9534fbc847f87ca832daf2 Mon Sep 17 00:00:00 2001 From: johenning Date: Sat, 26 Aug 2017 16:02:36 +0200 Subject: [PATCH 041/126] Added check to avoid out of bounds access --- rtgui/batchqueue.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 03cc9535c..3a5576987 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -746,7 +746,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam if (origFileName[0] == '/') { pa.push_back ("/" + da[0]); } else if (origFileName[0] == '\\') { - if (origFileName[1] == '\\') { + if (origFileName.size() > 1 && origFileName[1] == '\\') { pa.push_back ("\\\\" + da[0]); } else { From 54b71df3d662b3de47f44c23d05adffd381ba4a4 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 26 Aug 2017 17:47:51 +0200 Subject: [PATCH 042/126] More visible previewmodeF-*.png button icons, closes #4032 --- .../images/Dark/actions/previewmodeF-off.png | Bin 3659 -> 805 bytes rtdata/images/Dark/actions/previewmodeF-on.png | Bin 3059 -> 719 bytes .../images/Light/actions/previewmodeF-off.png | Bin 3080 -> 710 bytes .../images/Light/actions/previewmodeF-on.png | Bin 3059 -> 719 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/rtdata/images/Dark/actions/previewmodeF-off.png b/rtdata/images/Dark/actions/previewmodeF-off.png index 1236da5a10d439811ea70e97f5e1b93d32b3de78..75a285de2017aa00450c9e313c43eeddbf71034d 100644 GIT binary patch delta 781 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 bzSZ$B*h->)CIpnO00000NkvXXu0mjf(P9({ diff --git a/rtdata/images/Dark/actions/previewmodeF-on.png b/rtdata/images/Dark/actions/previewmodeF-on.png index 3910e6a20ebb95070041ed801f3932b29b5deb20..3d46dedc7f9e22b0c997bb20e40379777486d535 100644 GIT binary patch delta 696 zcmV;p0!RJx7taNdBYyw{b3#c}2nYxWd=GXMYp z8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10!&FnK~y-6wUysa6HySx zznQa@wvcEkifCK@WDAjoSc#gDc;kckU_6Hpz=bBp7?F^)0)MTbZ551d(ZrM@Ju_a2 z+x=5$HDRuHzw^y+XC`OQ0j?-$n8B^MV?8I8Lfpgw0A1T1pX;VtEK zRgveST7UD)*2IqfK6_x6@egF!`i%nFR>(S_djvfr=oz4Us+PMcW=8q}XX>H>;6~0icoHsu&ymRYwVB`r?NI7aW_p+M{J_?EENDYhwFHw_m@% z{MhtG?$b)jn%ELR0}pyqG@S{%`!TikeNg_;t1+oiDqQ$60 delta 3054 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 diff --git a/rtdata/images/Light/actions/previewmodeF-off.png b/rtdata/images/Light/actions/previewmodeF-off.png index 519de02bcc7405bfe5ac9cd0124bdd63a44c36e7..0aa81a7051602e00101014fe2c1a1935e0e2797d 100644 GIT binary patch delta 687 zcmV;g0#N;k7{&#VBYyw{b3#c}2nYxWd=GXMYp z8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10z*keK~y-6wUy6q(?Af$ zzi(|4Cs9f^MJ-gNfSaZgK7c@QMsNY~Lc9oPUV;bU#FYa|p?~cLN`y+0N*5KB|K8!y z#w3o@2BgkuHJ24xa6!iN0&2BdemETJAP52g=yto^QmJ&*Xf*o&1&*Sq+Uxb| zBo{N{L_~h{`~B@!t7Yc}bA5e1QcB%CyO!jJ&&HT705b0PGNAXAQrG8!0su*^wJuw0 zzs&@PVOaM(Z+|YODR{Y3sfe}qXbQZ#x?0HR^Y@Wz56Kk(4@o{C83DNJoa>VOJ)zL^ zs)a(~>+$jN5CHtqhad<-5m6~Iw?*VG0Ei?lT=so`DURbWB;SslBBFvIxCLMf01}Yr zdCMv26{XajtkRuxDvbH(u>5r3&W=ccBHfLk12`NE2HSgkdq1=C&;2z;Q7Dvax7%7o3IIT|Q!EzkdB3I$vp@A( V-w_pb=^+3B002ovPDHLkV1o9KH*x>~ delta 3075 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 delta 3054 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 From 0487fb8ec1aa8ceea65622d0b41e181513af721d Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 26 Aug 2017 18:31:15 +0200 Subject: [PATCH 043/126] Added previewmodeF-*.file and previewmodeF-*.svg --- .../scalable/previewmodeF-off.file | 1 + .../scalable/previewmodeF-off.svg | 630 ++++++++++++++++++ .../scalable/previewmodeF-on.file | 1 + .../source_icons/scalable/previewmodeF-on.svg | 604 +++++++++++++++++ 4 files changed, 1236 insertions(+) create mode 100644 tools/source_icons/scalable/previewmodeF-off.file create mode 100644 tools/source_icons/scalable/previewmodeF-off.svg create mode 100644 tools/source_icons/scalable/previewmodeF-on.file create mode 100644 tools/source_icons/scalable/previewmodeF-on.svg diff --git a/tools/source_icons/scalable/previewmodeF-off.file b/tools/source_icons/scalable/previewmodeF-off.file new file mode 100644 index 000000000..647bebfdb --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-off.file @@ -0,0 +1 @@ +previewmodeF-off.png,w22,actions diff --git a/tools/source_icons/scalable/previewmodeF-off.svg b/tools/source_icons/scalable/previewmodeF-off.svg new file mode 100644 index 000000000..814bc9e93 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-off.svg @@ -0,0 +1,630 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeF-on.file b/tools/source_icons/scalable/previewmodeF-on.file new file mode 100644 index 000000000..cadcea0b5 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-on.file @@ -0,0 +1 @@ +previewmodeF-on.png,w22,actions diff --git a/tools/source_icons/scalable/previewmodeF-on.svg b/tools/source_icons/scalable/previewmodeF-on.svg new file mode 100644 index 000000000..63b0e4ec8 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-on.svg @@ -0,0 +1,604 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + From 20a3ad9134cd59bea41ad0d6409ae20ed5cba7db Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 26 Aug 2017 19:34:25 +0200 Subject: [PATCH 044/126] Added and updated previewmode* icons, #4027 --- .../images/Dark/actions/previewmodeB-off.png | Bin 2760 -> 175 bytes .../images/Dark/actions/previewmodeB-on.png | Bin 2760 -> 178 bytes .../Dark/actions/previewmodeBC0-off.png | Bin 2829 -> 216 bytes .../images/Dark/actions/previewmodeBC0-on.png | Bin 2832 -> 217 bytes .../Dark/actions/previewmodeBC1-off.png | Bin 2819 -> 175 bytes .../images/Dark/actions/previewmodeBC1-on.png | Bin 2820 -> 178 bytes .../Dark/actions/previewmodeBC2-off.png | Bin 2820 -> 175 bytes .../images/Dark/actions/previewmodeBC2-on.png | Bin 2821 -> 178 bytes .../Dark/actions/previewmodeBC3-off.png | Bin 2824 -> 175 bytes .../images/Dark/actions/previewmodeBC3-on.png | Bin 2826 -> 178 bytes .../images/Dark/actions/previewmodeF-off.png | Bin 3080 -> 234 bytes .../images/Dark/actions/previewmodeF-on.png | Bin 3059 -> 235 bytes .../images/Dark/actions/previewmodeG-off.png | Bin 2753 -> 176 bytes .../images/Dark/actions/previewmodeG-on.png | Bin 2750 -> 178 bytes .../images/Dark/actions/previewmodeL-off.png | Bin 2758 -> 225 bytes .../images/Dark/actions/previewmodeL-on.png | Bin 2757 -> 225 bytes .../images/Dark/actions/previewmodeR-off.png | Bin 2756 -> 175 bytes .../images/Dark/actions/previewmodeR-on.png | Bin 2757 -> 178 bytes .../images/Light/actions/previewmodeB-off.png | Bin 2760 -> 175 bytes .../images/Light/actions/previewmodeB-on.png | Bin 2760 -> 178 bytes .../Light/actions/previewmodeBC0-off.png | Bin 2746 -> 216 bytes .../Light/actions/previewmodeBC0-on.png | Bin 2776 -> 217 bytes .../Light/actions/previewmodeBC1-off.png | Bin 2789 -> 175 bytes .../Light/actions/previewmodeBC1-on.png | Bin 2789 -> 178 bytes .../Light/actions/previewmodeBC2-off.png | Bin 2756 -> 175 bytes .../Light/actions/previewmodeBC2-on.png | Bin 2757 -> 178 bytes .../Light/actions/previewmodeBC3-off.png | Bin 0 -> 175 bytes .../Light/actions/previewmodeBC3-on.png | Bin 0 -> 178 bytes .../images/Light/actions/previewmodeF-off.png | Bin 3080 -> 234 bytes .../images/Light/actions/previewmodeF-on.png | Bin 3059 -> 235 bytes .../images/Light/actions/previewmodeG-off.png | Bin 2753 -> 176 bytes .../images/Light/actions/previewmodeG-on.png | Bin 2750 -> 178 bytes .../images/Light/actions/previewmodeL-off.png | Bin 2758 -> 225 bytes .../images/Light/actions/previewmodeL-on.png | Bin 2757 -> 225 bytes .../images/Light/actions/previewmodeR-off.png | Bin 2756 -> 175 bytes .../images/Light/actions/previewmodeR-on.png | Bin 2757 -> 178 bytes .../scalable/previewmodeB-off.file | 1 + .../scalable/previewmodeB-off.svg | 81 +++++++++++++++ .../scalable/previewmodeB-on.file | 1 + .../source_icons/scalable/previewmodeB-on.svg | 81 +++++++++++++++ .../scalable/previewmodeBC0-off.file | 1 + .../scalable/previewmodeBC0-off.svg | 92 ++++++++++++++++++ .../scalable/previewmodeBC0-on.file | 1 + .../scalable/previewmodeBC0-on.svg | 92 ++++++++++++++++++ .../scalable/previewmodeBC1-off.file | 1 + .../scalable/previewmodeBC1-off.svg | 81 +++++++++++++++ .../scalable/previewmodeBC1-on.file | 1 + .../scalable/previewmodeBC1-on.svg | 81 +++++++++++++++ .../scalable/previewmodeBC2-off.file | 1 + .../scalable/previewmodeBC2-off.svg | 81 +++++++++++++++ .../scalable/previewmodeBC2-on.file | 1 + .../scalable/previewmodeBC2-on.svg | 81 +++++++++++++++ .../scalable/previewmodeBC3-off.file | 1 + .../scalable/previewmodeBC3-off.svg | 81 +++++++++++++++ .../scalable/previewmodeBC3-on.file | 1 + .../scalable/previewmodeBC3-on.svg | 81 +++++++++++++++ .../scalable/previewmodeF-off.file | 1 + .../scalable/previewmodeF-off.svg | 92 ++++++++++++++++++ .../scalable/previewmodeF-on.file | 1 + .../source_icons/scalable/previewmodeF-on.svg | 92 ++++++++++++++++++ .../scalable/previewmodeG-off.file | 1 + .../scalable/previewmodeG-off.svg | 81 +++++++++++++++ .../scalable/previewmodeG-on.file | 1 + .../source_icons/scalable/previewmodeG-on.svg | 81 +++++++++++++++ .../scalable/previewmodeL-off.file | 1 + .../scalable/previewmodeL-off.svg | 92 ++++++++++++++++++ .../scalable/previewmodeL-on.file | 1 + .../source_icons/scalable/previewmodeL-on.svg | 92 ++++++++++++++++++ .../scalable/previewmodeR-off.file | 1 + .../scalable/previewmodeR-off.svg | 81 +++++++++++++++ .../scalable/previewmodeR-on.file | 1 + .../source_icons/scalable/previewmodeR-on.svg | 81 +++++++++++++++ 72 files changed, 1542 insertions(+) create mode 100644 rtdata/images/Light/actions/previewmodeBC3-off.png create mode 100644 rtdata/images/Light/actions/previewmodeBC3-on.png create mode 100644 tools/source_icons/scalable/previewmodeB-off.file create mode 100644 tools/source_icons/scalable/previewmodeB-off.svg create mode 100644 tools/source_icons/scalable/previewmodeB-on.file create mode 100644 tools/source_icons/scalable/previewmodeB-on.svg create mode 100644 tools/source_icons/scalable/previewmodeBC0-off.file create mode 100644 tools/source_icons/scalable/previewmodeBC0-off.svg create mode 100644 tools/source_icons/scalable/previewmodeBC0-on.file create mode 100644 tools/source_icons/scalable/previewmodeBC0-on.svg create mode 100644 tools/source_icons/scalable/previewmodeBC1-off.file create mode 100644 tools/source_icons/scalable/previewmodeBC1-off.svg create mode 100644 tools/source_icons/scalable/previewmodeBC1-on.file create mode 100644 tools/source_icons/scalable/previewmodeBC1-on.svg create mode 100644 tools/source_icons/scalable/previewmodeBC2-off.file create mode 100644 tools/source_icons/scalable/previewmodeBC2-off.svg create mode 100644 tools/source_icons/scalable/previewmodeBC2-on.file create mode 100644 tools/source_icons/scalable/previewmodeBC2-on.svg create mode 100644 tools/source_icons/scalable/previewmodeBC3-off.file create mode 100644 tools/source_icons/scalable/previewmodeBC3-off.svg create mode 100644 tools/source_icons/scalable/previewmodeBC3-on.file create mode 100644 tools/source_icons/scalable/previewmodeBC3-on.svg create mode 100644 tools/source_icons/scalable/previewmodeF-off.file create mode 100644 tools/source_icons/scalable/previewmodeF-off.svg create mode 100644 tools/source_icons/scalable/previewmodeF-on.file create mode 100644 tools/source_icons/scalable/previewmodeF-on.svg create mode 100644 tools/source_icons/scalable/previewmodeG-off.file create mode 100644 tools/source_icons/scalable/previewmodeG-off.svg create mode 100644 tools/source_icons/scalable/previewmodeG-on.file create mode 100644 tools/source_icons/scalable/previewmodeG-on.svg create mode 100644 tools/source_icons/scalable/previewmodeL-off.file create mode 100644 tools/source_icons/scalable/previewmodeL-off.svg create mode 100644 tools/source_icons/scalable/previewmodeL-on.file create mode 100644 tools/source_icons/scalable/previewmodeL-on.svg create mode 100644 tools/source_icons/scalable/previewmodeR-off.file create mode 100644 tools/source_icons/scalable/previewmodeR-off.svg create mode 100644 tools/source_icons/scalable/previewmodeR-on.file create mode 100644 tools/source_icons/scalable/previewmodeR-on.svg diff --git a/rtdata/images/Dark/actions/previewmodeB-off.png b/rtdata/images/Dark/actions/previewmodeB-off.png index 1ff087b4db61a293daabc0f49186db21ae0efd82..0c9890437d1da0db3949f22d4b231df19dc6abf0 100644 GIT binary patch delta 148 zcmX>hx}I@@ay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TaJY5_^G$tk|NU$DeH!w0V_;Y-DLu+GW uNG5K)1OA|gu>q$ps)Y8g@|qBtmsdl#e# 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 Hu0mjf&Kpr2 diff --git a/rtdata/images/Dark/actions/previewmodeB-on.png b/rtdata/images/Dark/actions/previewmodeB-on.png index 6403fc722efbfd05dbe5b12ac900588c66aa748b..466192b3a91632a7b88c4ecf31d110eaa0608131 100644 GIT binary patch delta 151 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 Hu0mjf@N`hf diff --git a/rtdata/images/Dark/actions/previewmodeBC0-off.png b/rtdata/images/Dark/actions/previewmodeBC0-off.png index c106c8170d215f02f91dff199639002c62b90b3c..28c02455540bd78b540ab052c0ab4d7b76a42d29 100644 GIT binary patch delta 187 zcmeAbyTLd?wZ7QNGlT;OYB*9l7#J8h3p^r=85sDEfH31!Z9ZwBpk#?_L`iUdT1k0g zQ7S`udAVL@UUqSEVnM22eo^}DcQ#T$MWLQ9jv*Qo-=4STYA_IRy|{SCT!(4X&Y9lW zX_6==!rd9w@$zW&+2@~TJbZ4=vm*Zx%hEIbr%O#@`52YV1f@MRy*1-Gb2+wN+uXLX kJSBX_yR){tF4h*a=WXHNkkQvH1GIs`)78&qol`;+0Qbs7djJ3c delta 2820 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 W4-6+p^inkd0000 diff --git a/rtdata/images/Dark/actions/previewmodeBC0-on.png b/rtdata/images/Dark/actions/previewmodeBC0-on.png index f885bb4f82874981057d50b7a3d71b8f43c2e15f..f5e0b80002cba9d12bdc670a22a9f5f3e6b1644f 100644 GIT binary patch delta 188 zcmbOrc9U^}YJIVjX9x!n)NrJ9FfcH17I;J!GcfQS0b$0e+I-SLLCF%=h?3y^w370~ zqEv?R@^Zb*yzJuS#DY}4{G#;P?`))iio!fy978lFzCCZq)nFjta&h?+t40~!x#=4| zXE^bRaCb&|Y!RzB-EDnl1M@0A#-e$7{iluIvzcn7hMwX|@=5YZcZzme`}Kmsw_ov+ lhe~(2nX~cd|EuZb-KWLB!R+UxsX!|jJYD@<);T3K0RU9|LN@>a delta 2824 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 diff --git a/rtdata/images/Dark/actions/previewmodeBC1-off.png b/rtdata/images/Dark/actions/previewmodeBC1-off.png index 114bbf2399dbcd9bc47ede16582e20b920d289bf..4ac160b059b2fee482e4c2f484cc51ea27f4f2bb 100644 GIT binary patch delta 146 zcmZn`ThBN_wZ7QNGlT;OYB*9l7#J8h3p^r=85sDEfH31!Z9ZwBpk#?_L`iUdT1k0g zQ7S`udAVL@UUqSEVnM22eo^}DcQ#T$MLM1?jv*QolM^IZ53?H>85sOIzPzEev9Zz7 s%ZqFElg;VpC1!9$8cK)=d{JZQmuKa-D@r}azzx*t>FVdQ&MBb@04bF$hyVZp delta 2810 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 delta 2811 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 N002ovPDHLkV1ieQY^eYM diff --git a/rtdata/images/Dark/actions/previewmodeBC2-off.png b/rtdata/images/Dark/actions/previewmodeBC2-off.png index 548fce401ced0abd4a7386684cc3751a2c1be964..bf3d97b2dc6a5ab774c28f8ca6f1582ee37d830b 100644 GIT binary patch delta 146 zcmZn>ThBN_wZ7QNGlT;OYB*9l7#J8h3p^r=85sDEfH31!Z9ZwBpk#?_L`iUdT1k0g zQ7S`udAVL@UUqSEVnM22eo^}DcQ#T$MLM1?jv*QolM^IZ53?H>85sOIzPzEev9a;t s&CTf%s!NwFk(j{|X(%Bg@I{T`L_I5ilN$RZ25z8EPgg&ebxsLQ098#bZvX%Q delta 2811 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 N002ovPDHLkV1h@bZSDX7 diff --git a/rtdata/images/Dark/actions/previewmodeBC2-on.png b/rtdata/images/Dark/actions/previewmodeBC2-on.png index 820f04c2018fc1a563ff0da64c5f25002bdd496d..457453166fb38e12cea17fa9efb2bd3d07cf0a89 100644 GIT binary patch delta 149 zcmZn_+r&6QwZ7QNGlT;OYB*9l7#J8h3p^r=85sDEfH31!Z9ZwBpk#?_L`iUdT1k0g zQ7S`udAVL@UUqSEVnM22eo^}DcQ#T$Mf#pDjv*QolT#8Bew=S$-(Ua)Hr3yFRxg<{ uMTA+{?k*1xPqP!FGBaa-U(-Vth8JF}{0@Kl7VZP;W$<+Mb6Mw<&;$Uv4K2C= delta 2812 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 O00004 diff --git a/rtdata/images/Dark/actions/previewmodeBC3-off.png b/rtdata/images/Dark/actions/previewmodeBC3-off.png index f77c171532b58ff7d693f4496a3b7ec309ef2855..487ec777ed1bf5d7ab1d55c1e4cc32f1b483f135 100644 GIT binary patch delta 146 zcmeAWThBN_wZ7QNGlT;OYB*9l7#J8h3p^r=85sDEfH31!Z9ZwBpk#?_L`iUdT1k0g zQ7S`udAVL@UUqSEVnM22eo^}DcQ#T$MLM1?jv*QolM^IZ53?H>85sOIzPzEev9WRC so;@FVdQ&MBb@03{?V{{R30 delta 2815 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 R(7*ry002ovPDHLkV1jXZaJm2h diff --git a/rtdata/images/Dark/actions/previewmodeBC3-on.png b/rtdata/images/Dark/actions/previewmodeBC3-on.png index 69209dc4f391134bb680414c846306df8ae6a773..670b5b8b48d21d6bd3adae37af6351598e0ae9e0 100644 GIT binary patch delta 149 zcmeAY+r&6QwZ7QNGlT;OYB*9l7#J8h3p^r=85sDEfH31!Z9ZwBpk#?_L`iUdT1k0g zQ7S`udAVL@UUqSEVnM22eo^}DcQ#T$Mf#pDjv*QolT#8Bew=S$-(Ua)Q>IT(p8Dp^ uo0Nn@%V#$>CI)CEq$oT%8)z_xf#IYOEC0FUeC3=#y$qhNelF{r5}E*OQ!&N> delta 2817 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 TcD?Nh00000NkvXXu0mjf*K}=) diff --git a/rtdata/images/Dark/actions/previewmodeF-off.png b/rtdata/images/Dark/actions/previewmodeF-off.png index 519de02bcc7405bfe5ac9cd0124bdd63a44c36e7..5d52af569aec51a19c559f31047bf93110cc58c6 100644 GIT binary patch literal 234 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 WFb4f4zK^y50000BuWq7(c zhGkj=p4|yIe{Vc01yk5y8gsg#)z=vlV5`GK}FV(qp Ue*d_~544lP)78&qol`;+0Gql*-T(jq literal 3059 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 B)ky#V diff --git a/rtdata/images/Dark/actions/previewmodeG-off.png b/rtdata/images/Dark/actions/previewmodeG-off.png index e259113248e1c549d286e961c0b6fb68e74f8304..5c076c989001dc8407851f306ef956be4b258643 100644 GIT binary patch delta 149 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 AqyPW_ diff --git a/rtdata/images/Dark/actions/previewmodeG-on.png b/rtdata/images/Dark/actions/previewmodeG-on.png index db31667ed22d7bda38c326bcc8aa8d0fd138c6bc..ecc75c8e73e5582342785d25652aa9a089e4e570 100644 GIT binary patch delta 151 zcmdldx`}auay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U_JzX3_G$tmeBqaPe-@v}X00<;v3XW-2 w9!$_@7Ph;~!^6|;#Hh^7nBUj*kcHvsBUXL^OV delta 2743 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 diff --git a/rtdata/images/Dark/actions/previewmodeL-off.png b/rtdata/images/Dark/actions/previewmodeL-off.png index d24dea76f748fc299cc1a80803efc0fa1760677c..939dec6424e8209d870dfef135f768d635809ecb 100644 GIT binary patch delta 198 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 FV1fXfPgei{ diff --git a/rtdata/images/Dark/actions/previewmodeL-on.png b/rtdata/images/Dark/actions/previewmodeL-on.png index 11b745e090dac0b1693e50e5b0f573fa2278d7a2..92fe937e801dc1d399bf60b6bc29ba7528cd7cee 100644 GIT binary patch delta 198 zcmX>q`jBygay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1UzJY5_^G$tmeBqaPe-@v}X00=}xrX)|D zW3X^?Bj>ToFE1Dme|+3-C~{Er&+qU35AW}C&d%cQhkt*U^Jr;h@kmMC rTEPX>C;`LNG5K)1OA|gu>q$ps)Y8g@|qBtmsdl#e# zD79F{g-R2Bp6b)z>aX8F&iy>+J?Fje832%c1G&6RSO$O$o_|mf=HpI}iH)OUhX4%l z00S%mV6w9KLE+vJKrBBm4|V@dZNhH6dcQW^=Mw zVlEVOdXA7U@z08xnwTbG7$sqW_<>?plyLHAHu)6unO!B!&fu}dEO|4ZoxzrHznHgV zi#TFN0>xaE&41=1^`D& z{)!X7Vj(A2C@IP#lbRbxEz+5q@jQ6e+K*wef2*x z$#s9WhwjNqVv5p*bV=V>ndzA#0X>V)WO3-Ge_i5#ocNW#dWT6ECy68A@WdHW;w|Iy zlEvfZv46QjZYGb;<^882{=>At=<{BSMQQp7s4L8X%rF%ozYYQvg$R)Nz2Xz-&$$KS zqdG=Ub-4vv6sa2%Wg=fP!g z1>6Alz$lmiPr)pB1?C|L!a`(-0x3ZnkS=5lSwRfQ8S;Vxp)e>GN`R6f9wdVDp^Z=p zR1VcZ4Nwd8J#-8@16_nhpgYhQG!6X@y@L^$1XE!(SPwRb8L%5107t;f;AD6uyb3Oa zw|~J^a3g#O?t;(2m*E@mDEt(jLjXcVXox0aiZBolBp8W9k`Mv17AZz5kw&B)=|u*R zYse@vgS6k0$e4o6?YPM6*q~S$IIY# z@ecT4JR6^fFT*$Cd-22g3H&@kmY`2?B18~U2^$Digm%I?!hOOEB9W*?v?qoVxqrm< z#46%p;sxRu@hwS?WJK~H#gjy&ZKMOF)1*737i2P7kL*g0BMZsf$SvfvxW!B2n${drqB{L^W zk+qZ!md%hYm2H*1C_5#GmD7{+l7C~%70T_GJ1aL%K`7c34+@L2k1-jc7>}7 zuN74kT@^Ws#flw@Hx%C~(UrWE(v)^6bt^qkMkyO9hbreN?^QmhJflKYaeq`{sT8Xm zQMs!Ms~V|>sjgPtuR5qYr>3svqsCXORy(UUqfS$IRZmr~P(P_YtwGUn*5GPXXq?h` zLYJqz(bMTw^nUuRrmCi|rbx3vb4YVuOJ6Het3azm>wz{wo1vYgU7_8lJ*%Uk6Qq-` z)24G*7q83EP0`)0JD~eoPk&!8T5q#nx89V#qQ0O0D*ZP7`vznK7lV}sjRw~ZF@_Ao zG{ZfHSBzjI8>1AXTBBiO*x1&XYrMyJ!~|_(Z^AQaG`VF;GIcY}Hf=K{nvF^@CfVLo8~(Za?e-J;3jo~4|nzh!}CujTJnMpi7VTC3~UWPfXK>vh&W*3TCi zFXAlPyXdwJ#U{vRvrV7P2U|N^fo;3(w4IJ!f?b{6Ee4el!YE~2ut(dw+pn`fZvWQ7 z)!Hu`inV>n--5dX*n^S8k|O*>COqx`e#pv@A44&rA)&RQkHaj(^1}wgDd8)^TYtk}MYu zySQ9=dHV7bE2LL2R~$`1CqyT-CcI|`GaH$6iGGQ7iL)#Z)^65Qwkx}WJ*64TKG8 z8-6OVC@3#@xiNZUZ=qV@`oi%|KAYN#q>2PZw>CR&uHS;%!rd~o)p~37){n*P;!7nK zC6y)bOIf9tzOnqK>YIgaN!y0XY|Hj;$86_qzq!L@$H8*h@>S*IJA-z1RnRMnD_-te zvFl>xqJPTz-Gtqu-J?~3RXx=@)!VDz*QC_ksCBRHs8g-mTK9Snd(YLqu6x_-)#^*? z-|ge>yWQZ^(AB8dSh*jwKYRb|lS3T}w-=YHL{= z+$L(9J`{iG%6FdM^|YI|H+0ZCN)Cg=qQg(VPk;FS=8=FSeMcEb+kepgp{|qCS=)6}*quGxKj%yyTJt2Rh>?Gl2;mL(lt4__G=AWK9lYC~p zZ$;m|voU9{_lNcmoeMa3;k@_xvjc7er!F{MIDXOL;;~DNOWl`kFLw>v40irx^Hb-L z?SD|$u-$Oa75gi_Ba25)UUj*8=9=fV^Vj{ZU%s*A#>maco40Sp-x|HmzCCp({m%2d z*>~sft-p`HU;IGkLFGf$hmAiQ{@gKYJ9=Wwb8PTY_@jH{tnsJ6Wc~7fqVO^Kapk1O zWXqJ*)bVNW=_^l`KACvRe>y)?^sDTzb$`zcp8fEf>u-azF|!lT1~<{rMvcs2jJ_>Iz=gKrsc2i`@$o1D*ik9}YD!SF-x$AFLb7cv$W{s04*^ZZu% zc0d3C010qNS#tmYEnWZsEnWd;CW00K000McNliru-2(v>Bou9RhLZpQ047O9K{r$= zQ)5t3QTdM#Gk^#nID-ujEd_YJ2?9XXSTP)oDi|6H09tLU40}EGVgLXD07*qoM6N<$ Eg11~qF8}}l diff --git a/rtdata/images/Dark/actions/previewmodeR-off.png b/rtdata/images/Dark/actions/previewmodeR-off.png index 9aef7730174c2fa15043e810834997ae64309180..b96e22c31cf7025b6e61481836b79540f9bd21f0 100644 GIT binary patch delta 148 zcmX>ix}I@@ay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TaJY5_^G$tk|NU$DeH!w0V_;Y-DLu+GW uNG5K)1OA|gu>q$ps)Y8g@|qBtmsdl#e# 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 D^EFHE diff --git a/rtdata/images/Dark/actions/previewmodeR-on.png b/rtdata/images/Dark/actions/previewmodeR-on.png index 5fb0f996e16a6681d1ea4380190e486d3d065cfd..fb1e46e98c4078e30f33887975dadeb14122ac4d 100644 GIT binary patch delta 151 zcmX>qx`}auay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U_JzX3_G$tmeBqaPe-@v}X00?3X3=U{z w7CdBP7Ph;~!^6|;#Hh^7nBUj*kcHuh6f3{L@8v5l1NAa^y85}Sb4q9e0K2R$NB{r; delta 2750 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 Ef>fkS)Bpeg diff --git a/rtdata/images/Light/actions/previewmodeB-off.png b/rtdata/images/Light/actions/previewmodeB-off.png index 1ff087b4db61a293daabc0f49186db21ae0efd82..0c9890437d1da0db3949f22d4b231df19dc6abf0 100644 GIT binary patch delta 148 zcmX>hx}I@@ay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TaJY5_^G$tk|NU$DeH!w0V_;Y-DLu+GW uNG5K)1OA|gu>q$ps)Y8g@|qBtmsdl#e# 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 Hu0mjf&Kpr2 diff --git a/rtdata/images/Light/actions/previewmodeB-on.png b/rtdata/images/Light/actions/previewmodeB-on.png index 6403fc722efbfd05dbe5b12ac900588c66aa748b..466192b3a91632a7b88c4ecf31d110eaa0608131 100644 GIT binary patch delta 151 zcmX>hx`}auay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U_JzX3_G$tmeBqaPe-@v}X00<-`Vh(6k vK5SxS7Ph;~!^6|;#Hh^7nBUj*kcHuh6f3{L3`uEgpk4+~S3j3^P6NG5K)1OA|gu>q$ps)Y8g@|qBtmsdl#e# zD79F{g-R2Bp6b)z>aX8F&iy>+J?Fje832%c1G&6RSO$O$o_|mf=HpI}iH)OUhX4%l z00S%mV6w9KLE+vJKrBBm4|V@dZNhH6dcQW^=Mw zVlEVOdXA7U@z08xnwTbG7$sqW_<>?plyLHAHu)6unO!B!&fu}dEO|4ZoxzrHznHgV zi#TFN0>xaE&41=1^`D& z{)!X7Vj(A2C@IP#lbRbxEz+5q@jQ6e+K*wef2*x z$#s9WhwjNqVv5p*bV=V>ndzA#0X>V)WO3-Ge_i5#ocNW#dWT6ECy68A@WdHW;w|Iy zlEvfZv46QjZYGb;<^882{=>At=<{BSMQQp7s4L8X%rF%ozYYQvg$R)Nz2Xz-&$$KS zqdG=Ub-4vv6sa2%Wg=fP!g z1>6Alz$lmiPr)pB1?C|L!a`(-0x3ZnkS=5lSwRfQ8S;Vxp)e>GN`R6f9wdVDp^Z=p zR1VcZ4Nwd8J#-8@16_nhpgYhQG!6X@y@L^$1XE!(SPwRb8L%5107t;f;AD6uyb3Oa zw|~J^a3g#O?t;(2m*E@mDEt(jLjXcVXox0aiZBolBp8W9k`Mv17AZz5kw&B)=|u*R zYse@vgS6k0$e4o6?YPM6*q~S$IIY# z@ecT4JR6^fFT*$Cd-22g3H&@kmY`2?B18~U2^$Digm%I?!hOOEB9W*?v?qoVxqrm< z#46%p;sxRu@hwS?WJK~H#gjy&ZKMOF)1*737i2P7kL*g0BMZsf$SvfvxW!B2n${drqB{L^W zk+qZ!md%hYm2H*1C_5#GmD7{+l7C~%70T_GJ1aL%K`7c34+@L2k1-jc7>}7 zuN74kT@^Ws#flw@Hx%C~(UrWE(v)^6bt^qkMkyO9hbreN?^QmhJflKYaeq`{sT8Xm zQMs!Ms~V|>sjgPtuR5qYr>3svqsCXORy(UUqfS$IRZmr~P(P_YtwGUn*5GPXXq?h` zLYJqz(bMTw^nUuRrmCi|rbx3vb4YVuOJ6Het3azm>wz{wo1vYgU7_8lJ*%Uk6Qq-` z)24G*7q83EP0`)0JD~eoPk&!8T5q#nx89V#qQ0O0D*ZP7`vznK7lV}sjRw~ZF@_Ao zG{ZfHSBzjI8>1AXTBBiO*x1&XYrMyJ!~|_(Z^AQaG`VF;GIcY}Hf=K{nvF^@CfVLo8~(Za?e-J;3jo~4|nzh!}CujTJnMpi7VTC3~UWPfXK>vh&W*3TCi zFXAlPyXdwJ#U{vRvrV7P2U|N^fo;3(w4IJ!f?b{6Ee4el!YE~2ut(dw+pn`fZvWQ7 z)!Hu`inV>n--5dX*n^S8k|O*>COqx`e#pv@A44&rA)&RQkHaj(^1}wgDd8)^TYtk}MYu zySQ9=dHV7bE2LL2R~$`1CqyT-CcI|`GaH$6iGGQ7iL)#Z)^65Qwkx}WJ*64TKG8 z8-6OVC@3#@xiNZUZ=qV@`oi%|KAYN#q>2PZw>CR&uHS;%!rd~o)p~37){n*P;!7nK zC6y)bOIf9tzOnqK>YIgaN!y0XY|Hj;$86_qzq!L@$H8*h@>S*IJA-z1RnRMnD_-te zvFl>xqJPTz-Gtqu-J?~3RXx=@)!VDz*QC_ksCBRHs8g-mTK9Snd(YLqu6x_-)#^*? z-|ge>yWQZ^(AB8dSh*jwKYRb|lS3T}w-=YHL{= z+$L(9J`{iG%6FdM^|YI|H+0ZCN)Cg=qQg(VPk;FS=8=FSeMcEb+kepgp{|qCS=)6}*quGxKj%yyTJt2Rh>?Gl2;mL(lt4__G=AWK9lYC~p zZ$;m|voU9{_lNcmoeMa3;k@_xvjc7er!F{MIDXOL;;~DNOWl`kFLw>v40irx^Hb-L z?SD|$u-$Oa75gi_Ba25)UUj*8=9=fV^Vj{ZU%s*A#>maco40Sp-x|HmzCCp({m%2d z*>~sft-p`HU;IGkLFGf$hmAiQ{@gKYJ9=Wwb8PTY_@jH{tnsJ6Wc~7fqVO^Kapk1O zWXqJ*)bVNW=_^l`KACvRe>y)?^sDTzb$`zcp8fEf>u-azF|!lT1~<{rMvcs2jJ_>Iz=gKrsc2i`@$o1D*ik9}YD!SF-x$AFLb7cv$W{s04*^ZZu% zc0d3C010qNS#tmYEnWZsEnWd;CW00K000McNliru-2(v>DH1WbUF!e<04YgCK{`|@ zQ)6JL|NkE^hBD6Jz(Y#`UT@;Z^iTi<|NsBTis4{X0bvCITEu%W{ca@!00000NkvXX Hu0mjf@N`hf diff --git a/rtdata/images/Light/actions/previewmodeBC0-off.png b/rtdata/images/Light/actions/previewmodeBC0-off.png index 05a75ee25d1103cfcf938057694d858980dc60c0..28c02455540bd78b540ab052c0ab4d7b76a42d29 100644 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^96&6_!3HG%UcQ?Eq*#ibJVQ8upoSx*1IXtr@Q5sC zVBk9f!i-b3`J{n@k|nMYCBgY=CFO}lsSM@i<$9TU*~Q6;1*v-ZMd`EO*+>Bug?hR; zhG!9c+E;^G~19i~k?XL@6&NurntcV|?`%cId}pMRS1@VPb5iu^+?OV9M5 zE{)}5R5BBk_R#d!jOWbd*m`Yq+s5*g@EPyU+U~koTg;xfg?~dvU$YF*0tQc4KbLh* G2~7Zj*+;Pe literal 2746 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 A&;S4c diff --git a/rtdata/images/Light/actions/previewmodeBC0-on.png b/rtdata/images/Light/actions/previewmodeBC0-on.png index a1f462cb2021fbd58171c3af4627f202575c9397..f5e0b80002cba9d12bdc670a22a9f5f3e6b1644f 100644 GIT binary patch literal 217 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 eV_;;1sg42f@+I;zBu>3F(0 zhGpUXO@geCx1RWKR= literal 2789 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 diff --git a/rtdata/images/Light/actions/previewmodeBC1-on.png b/rtdata/images/Light/actions/previewmodeBC1-on.png index f71b2796572bc9c23f7193d4e1a9d187a60efd7d..3e9b6874cfb8a578b4edd251532a1813071aebb1 100644 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^96&6_!3HG%UcQ?Eq*#ibJVQ8upoSx*1IXtr@Q5sC zVBk9f!i-b3`J{n@k|nMYCBgY=CFO}lsSM@i<$9TU*~Q6;1*v-ZMd`EO*+>Bu>3h03 zhGkDczPyIt@-vwl3Cd9E)Ne+vlF8-Gh=>V(?b@9b+1_YD-{m) Q1GO@Ey85}Sb4q9e0O)Bj`v3p{ literal 2789 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 diff --git a/rtdata/images/Light/actions/previewmodeBC2-off.png b/rtdata/images/Light/actions/previewmodeBC2-off.png index 5c9b2d0e872788744de4d32dad5a282f99f2e4b3..bf3d97b2dc6a5ab774c28f8ca6f1582ee37d830b 100644 GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^96&6_!3HG%UcQ?Eq*#ibJVQ8upoSx*1IXtr@Q5sC zVBk9f!i-b3`J{n@k|nMYCBgY=CFO}lsSM@i<$9TU*~Q6;1*v-ZMd`EO*+>Bu>3F(0 zhGR&?H>XFaE?u%jVg^T~p@fLQ7d3_x^{o6&YV4DM P`WQT2{an^LB{Ts5fR!-- literal 2756 zcmV;#3On_QP)U^ddzBK~!QA zAe0b7LK7PzD!8JkNK*t^6>-7U6_B+eiiHKiUKeB$P}ap&M8)!Zkv+=UbAD&{?DvoR zK5ypEy>n*<0E%CbK$r$A0FWw_h{Jt7nTw-inD`z510uiy8vr=m3{mhxp9p};-KMUoXC>x|m zQw1o$mBps=IT-+8C^EZ*&rL+x8fA(&BAku#JOBukgju{|7EAcqXr2JD(?mI9K|-R0 zX~H#S+Bi9}n11}M6uv}a5z65vbHqF*J1tej5#|6e^X4y7lGT=p7TLkZ$-%+G*3#xL z$3Hs%rDVOGp;uvFdImANzuCU&n=P#l0M;a0n{D50D=GkJ-2i~<{ckpdeE`U#eQW8R z^&W<7UJ@k|k+YRmR#uj!fX}s*74)nAal^mRtotlw$9*ji(~BR^k)}wPvbu58QqrVi zW`>Bv;)^{YL4G%*_24$tL4(f=gseh9H3{ z`(uYkFu783=8O*`Td;rxO7%GJ-p<1W``Vl$_orkVKeb7B<5E_I2 zgxmg&oGe!QpTW zoH5Q3=ZA~NCE-@$w&3>QnsMiFeYhdqBp#1f!<*w>@gaB)UV<;gSKyD}&*J;>!}zxZ zGC_x6OYkAY5QKz$LK)#O;S8alFhZCnDi95c&cqNRkC;O&A=VSyiM_;O;xtK-WK41; zMUaw6>qzCKCelUHL((fUnXE^4B8QO$ILd!>RUOQoTZ$<98YeIT$NmlT)*54d7`|byodZU`CR!j z`Q!4v^5Y6b1tSHv0!LxBLY2Zvg*yt9iZn$V#Sq0*#Vv}56|X3cD&dukl)ROAN(D;$ zl`bd^(GZ$GjZNdy*3;@~7iq(E9Nn1iPfwy3(|@4%&?l6Yl;(xlR_GNr1a>aNOHEmCb(y`}nIjj86XmaMj2tyS%j zI!4`0Jxo1IeXsgO^>GclhKmMQqe$bJ#(hm#(@Zm5bEW2f&2G&}Ep07dEs<7*)&;F` zZHBhHc9Ql^?K9eAIy9a6Is%=YI%jpBF_oDf%oJuhvy(ZYtEua!E7h&l?a`gqGuB(A zm#^2X_eh_l&(e?A->KiBKVhI_5NwcV&}eYqkZ8yw4=4HcB=DHu*N~ zHhY{GY;W38?R@Ok*tOZcoNGRpKX>okyY@8uVEc{s9rhm`938|CO%7v@299x# z)sA;qbXF*93+u8I*2&XpjngTocg_yZ66a&if4Equ=k4T;@m=|){E>Lq_|o{%1lNQe31f+FiDil70=A%1@G{9SsU~SE zIVAaD^5>MOl;%`IYFz3`p^`9J*qNrCmYvooG8Yw!2GX6=cco8=1H}h2pp2y%Z4$af zB-ACV+Y7V`))owH@ZHc@C|4*hytC0| zW6dVaCc&nj&32nBHh(JO6UTEZm4EknYy8%p5{Ht#+i=^2+iq`n z+kU82u{5`IXh-mlmYvLbTE6Q_+1#?4-K5>p-2>%8sv&)omCKC-^+d)D_22hcHskWKXTznK9l^%WeW89Co zj|CpXb?)z)hc*IK&myHEUL|I3LUhn|*R$KJN4J9;nW-pl)$_opAMeTaQn^hn`R*<;Peb-$Ya+C1PeaC*>du=~lv zCl7|WL(hN9`0c}R!BgtfvJst;hEdzmQ)513*PktUHvC-le0sd_cg5eUUzoi3=@0im zx+fM-48Ih={QT#ZS8A^gzMlKKV={E|@tf2)(^Exn)!rU@$9mWGKI;9*bk+y_hw_i6 zAKO0#etP&h_4DWd0Rx!x{HSwcl>h($32;bRa{vG>UH||sUIAt%f))S(00(qQO+^RY z0|68^7#ugcYXATM8c9S!R2Wxd*u8uAe_CJ$5CH_1)WmRuX@LO%0n*uF#V$?&0000< KMNUMnLSTZQ(oo6( diff --git a/rtdata/images/Light/actions/previewmodeBC2-on.png b/rtdata/images/Light/actions/previewmodeBC2-on.png index 8f5b9207e76ce6e1fb01e135145a7dff91c241f3..457453166fb38e12cea17fa9efb2bd3d07cf0a89 100644 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^96&6_!3HG%UcQ?Eq*#ibJVQ8upoSx*1IXtr@Q5sC zVBk9f!i-b3`J{n@k|nMYCBgY=CFO}lsSM@i<$9TU*~Q6;1*v-ZMd`EO*+>Bu>3h03 zhGlORDa`Hy=2N15oTe#yF5HR%}$KU%#8VcO%GWZUU;$cJN#X^ Q52%&F)78&qol`;+0PUzTL;wH) literal 2757 zcmV;$3OeU^ddzBK~!QA zAe0b7LK7PzD!8JkNK*t^6>-7U6_B+eiiHKiUKeB$P}ap&M8)!Zkv+=UbAD&{?DvoR zK5ypEy>n*<0E%CbK$r$A0FWw_h{Jt7nTw-inD`z510uiy8vr=m3{mhxp9p};-KMUoXC>x|m zQw1o$mBps=IT-+8C^EZ*&rL+x8fA(&BAku#JOBukgju{|7EAcqXr2JD(?mI9K|-R0 zX~H#S+Bi9}n11}M6uv}a5z65vbHqF*J1tej5#|6e^X4y7lGT=p7TLkZ$-%+G*3#xL z$3Hs%rDVOGp;uvFdImANzuCU&n=P#l0M;a0n{D50D=GkJ-2i~<{ckpdeE`U#eQW8R z^&W<7UJ@k|k+YRmR#uj!fX}s*74)nAal^mRtotlw$9*ji(~BR^k)}wPvbu58QqrVi zW`>Bv;)^{YL4G%*_24$tL4(f=gseh9H3{ z`(uYkFu783=8O*`Td;rxO7%GJ-p<1W``Vl$_orkVKeb7B<5E_I2 zgxmg&oGe!QpTW zoH5Q3=ZA~NCE-@$w&3>QnsMiFeYhdqBp#1f!<*w>@gaB)UV<;gSKyD}&*J;>!}zxZ zGC_x6OYkAY5QKz$LK)#O;S8alFhZCnDi95c&cqNRkC;O&A=VSyiM_;O;xtK-WK41; zMUaw6>qzCKCelUHL((fUnXE^4B8QO$ILd!>RUOQoTZ$<98YeIT$NmlT)*54d7`|byodZU`CR!j z`Q!4v^5Y6b1tSHv0!LxBLY2Zvg*yt9iZn$V#Sq0*#Vv}56|X3cD&dukl)ROAN(D;$ zl`bd^(GZ$GjZNdy*3;@~7iq(E9Nn1iPfwy3(|@4%&?l6Yl;(xlR_GNr1a>aNOHEmCb(y`}nIjj86XmaMj2tyS%j zI!4`0Jxo1IeXsgO^>GclhKmMQqe$bJ#(hm#(@Zm5bEW2f&2G&}Ep07dEs<7*)&;F` zZHBhHc9Ql^?K9eAIy9a6Is%=YI%jpBF_oDf%oJuhvy(ZYtEua!E7h&l?a`gqGuB(A zm#^2X_eh_l&(e?A->KiBKVhI_5NwcV&}eYqkZ8yw4=4HcB=DHu*N~ zHhY{GY;W38?R@Ok*tOZcoNGRpKX>okyY@8uVEc{s9rhm`938|CO%7v@299x# z)sA;qbXF*93+u8I*2&XpjngTocg_yZ66a&if4Equ=k4T;@m=|){E>Lq_|o{%1lNQe31f+FiDil70=A%1@G{9SsU~SE zIVAaD^5>MOl;%`IYFz3`p^`9J*qNrCmYvooG8Yw!2GX6=cco8=1H}h2pp2y%Z4$af zB-ACV+Y7V`))owH@ZHc@C|4*hytC0| zW6dVaCc&nj&32nBHh(JO6UTEZm4EknYy8%p5{Ht#+i=^2+iq`n z+kU82u{5`IXh-mlmYvLbTE6Q_+1#?4-K5>p-2>%8sv&)omCKC-^+d)D_22hcHskWKXTznK9l^%WeW89Co zj|CpXb?)z)hc*IK&myHEUL|I3LUhn|*R$KJN4J9;nW-pl)$_opAMeTaQn^hn`R*<;Peb-$Ya+C1PeaC*>du=~lv zCl7|WL(hN9`0c}R!BgtfvJst;hEdzmQ)513*PktUHvC-le0sd_cg5eUUzoi3=@0im zx+fM-48Ih={QT#ZS8A^gzMlKKV={E|@tf2)(^Exn)!rU@$9mWGKI;9*bk+y_hw_i6 zAKO0#etP&h_4DWd0Rx!x{HSwcl>h($32;bRa{vG>UH||sUIAt%f))S(00(qQO+^RY z0|68^6=H_Q)&Kwi8%ab#R2Wxd*u8uAe_CJ$5CH^dsEOeQ(*gqk>^$C8+7UF600000 LNkvXXu0mjf9}-d9 diff --git a/rtdata/images/Light/actions/previewmodeBC3-off.png b/rtdata/images/Light/actions/previewmodeBC3-off.png new file mode 100644 index 0000000000000000000000000000000000000000..487ec777ed1bf5d7ab1d55c1e4cc32f1b483f135 GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^96&6_!3HG%UcQ?Eq*#ibJVQ8upoSx*1IXtr@Q5sC zVBk9f!i-b3`J{n@k|nMYCBgY=CFO}lsSM@i<$9TU*~Q6;1*v-ZMd`EO*+>Bu>3F(0 zhGRzv_QpUXO@geCw_m@kX~ literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/previewmodeBC3-on.png b/rtdata/images/Light/actions/previewmodeBC3-on.png new file mode 100644 index 0000000000000000000000000000000000000000..670b5b8b48d21d6bd3adae37af6351598e0ae9e0 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^96&6_!3HG%UcQ?Eq*#ibJVQ8upoSx*1IXtr@Q5sC zVBk9f!i-b3`J{n@k|nMYCBgY=CFO}lsSM@i<$9TU*~Q6;1*v-ZMd`EO*+>Bu>3h03 zhGjsnLa&v>YF!jQW6d=pWWD)7@(1mqVV8spurplhLb|9{O69B Ra{{$8c)I$ztaD0e0sxpFHA?^h literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/previewmodeF-off.png b/rtdata/images/Light/actions/previewmodeF-off.png index 519de02bcc7405bfe5ac9cd0124bdd63a44c36e7..5d52af569aec51a19c559f31047bf93110cc58c6 100644 GIT binary patch literal 234 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 WFb4f4zK^y50000BuWq7(c zhGkj=p4|yIe{Vc01yk5y8gsg#)z=vlV5`GK}FV(qp Ue*d_~544lP)78&qol`;+0Gql*-T(jq literal 3059 zcmVv$P)|D^_ww@lRz|vCuzLs)$;-`! zo*{AqUjza0dRV*yaMRE;fKCVhpQKsoe1Yhg01=zBIT!& zC1$=TK@rP|Ibo3vKKm@PqnO#LJhq6%Ij6Hz*<$V$@wQAMN5qJ)hzm2hoGcOF60t^# zFqJFfH{#e-4l@G)6iI9sa9D{VHW4w29}?su;^hF~NC{tY+*d5%WDCTXa!E_i;d2ub z1#}&jF5T4HnnCyEWTkKf0>c0%E1Ah>(_PY1)0w;+02c53Su*0<(nUqKG_|(0G&D0Z z{i;y^b@OjZ+}lNZ8Th$p5Uu}MTtq^NHl z*T1?CO*}7&0ztZsv2j*bmJyf3G7=Z`5B*PvzoDiKdLpOAxi2$L0#SX*@cY_n(^h55xYX z#km%V()bZjV~l{*bt*u9?FT3d5g^g~#a;iSZ@&02Abxq_DwB(I|L-^bXThc7C4-yr zInE_0gw7K3GZ**7&k~>k0Z0NWkO#^@9q0fwx1%qjZ=)yBuQ3=5 z4Wo^*!gyjLF-e%Um=erBOdIALW)L%unZshS@>qSW9o8Sq#0s#5*edK%>{;v(b^`kb zN5rY%%y90wC>#%$kE_5P!JWYk;U;klcqzOl-UjcFXXA75rT9jCH~u<)0>40zCTJ7v z2qAyk54cquI@7b&LHdZ`+zlTss6bJ7%PQ)z$cROu4wBhpu-r)01)S~6}jY?%U? zgEALn#wiFzo#H}aQ8rT=DHkadR18&{>P1bW7E`~Y4p3)hWn`DhhRJ5j*2tcg9i<^O zEt(fCg;q*CP8+7ZTcWhYX$fb^_9d-LhL+6BEtPYWVlfK zTBusSTASKKb%HuWJzl+By+?gkLq)?+BTu761jmyXF)a;mc z^>(B7bo*HQ1NNg1st!zt28YLv>W*y3CdWx9U8f|cqfXDAO`Q48?auQqHZJR2&bcD4 z9Ip>EY~kKEPV6Wm+eXFV)D)_R=tM0@&p?(!V*Qu1PXHG9o^TY0bZ?)4%0 z1p8F`JoeS|<@=<@RE7GY07EYX@lwd>4oW|Yi!o+Su@M`;WuSK8LKk71XR(_ zRKHM1xJ5XYX`fk>`6eqY>qNG6HZQwBM=xi4&Sb88?zd}EYguc1@>KIS<&CX#T35dw zS|7K*XM_5Nf(;WJJvJWRMA($P>8E^?{IdL4o5MGE7bq2MEEwP7v8AO@qL5!WvekBL z-8R%V?zVyL=G&{be=K4bT`e{#t|)$A!YaA?jp;X)-+bB;zhj`(vULAW%ue3U;av{9 z4wp%n<(7@__S@Z2PA@Mif3+uO&y|X06?J#o zSi8M;ejj_^(0<4Lt#wLu#dYrva1Y$6_o(k^&}yhSh&h;f@JVA>W8b%oZ=0JGnu?n~ z9O4}sJsfnnx7n(>`H13?(iXTy*fM=I`sj`CT)*pTHEgYKqqP+u1IL8No_-(u{qS+0 z<2@%BCt82d{Gqm;(q7a7b>wu+b|!X?c13m#p7cK1({0<`{-e>4hfb-UsyQuty7Ua; zOu?B?XLHZaol8GAb3Wnxcu!2v{R_`T4=x`(GvqLI{-*2AOSimkUAw*F_TX^n z@STz9kDQ$NC=!KfXWC z8h`dn#xL(D3Z9UkR7|Q&Hcy#Notk!^zVUSB(}`#4&lYA1f0h2V_PNgUAAWQEt$#LR zcH#y9#i!p(Udq2b^lI6wp1FXzN3T;~FU%Lck$-deE#qz9yYP3D3t8{6?<+s(e(3(_ z^YOu_)K8!O1p}D#{JO;G(*OVf32;bRa{vG>UH||sUIAt%f))S(00(qQO+^RY0|68> zBhX8y3IG5BO-V#SR5;7El`%`hKp2Lb#id}$SgCXWfP>)Z=-8&eqI6OuAm}DeLO>A( zmxAEhr9-KMf=h-vJGwcVAK>`}zQTFlT`nyS4=+jXdwK8fyGuhU)%XvbA9@eHEzwN0 z5Y0uC+Qt+OL{){(MWae%2Bm?frp8X=HB6P6e3j{Y^_Q`>QRd)p(Y|O~bnIJmGqKgw z(>14#x4egF-(|WyZ04^2Ii|}sgs$kOXwx!&U`rf@-U;Pc%lp)K zyTvPBKxxQ*9968jbNWHQCZk(&%9jeTh#yn002ovPDHLkV1j#= B)ky#V diff --git a/rtdata/images/Light/actions/previewmodeG-off.png b/rtdata/images/Light/actions/previewmodeG-off.png index e259113248e1c549d286e961c0b6fb68e74f8304..5c076c989001dc8407851f306ef956be4b258643 100644 GIT binary patch delta 149 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 AqyPW_ diff --git a/rtdata/images/Light/actions/previewmodeG-on.png b/rtdata/images/Light/actions/previewmodeG-on.png index db31667ed22d7bda38c326bcc8aa8d0fd138c6bc..ecc75c8e73e5582342785d25652aa9a089e4e570 100644 GIT binary patch delta 151 zcmdldx`}auay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U_JzX3_G$tmeBqaPe-@v}X00<;v3XW-2 w9!$_@7Ph;~!^6|;#Hh^7nBUj*kcHvsBUXL^OV delta 2743 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 diff --git a/rtdata/images/Light/actions/previewmodeL-off.png b/rtdata/images/Light/actions/previewmodeL-off.png index d24dea76f748fc299cc1a80803efc0fa1760677c..939dec6424e8209d870dfef135f768d635809ecb 100644 GIT binary patch delta 198 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 FV1fXfPgei{ diff --git a/rtdata/images/Light/actions/previewmodeL-on.png b/rtdata/images/Light/actions/previewmodeL-on.png index 11b745e090dac0b1693e50e5b0f573fa2278d7a2..92fe937e801dc1d399bf60b6bc29ba7528cd7cee 100644 GIT binary patch delta 198 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 Eg11~qF8}}l diff --git a/rtdata/images/Light/actions/previewmodeR-off.png b/rtdata/images/Light/actions/previewmodeR-off.png index 9aef7730174c2fa15043e810834997ae64309180..b96e22c31cf7025b6e61481836b79540f9bd21f0 100644 GIT binary patch delta 148 zcmX>ix}I@@ay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TaJY5_^G$tk|NU$DeH!w0V_;Y-DLu+GW uNG5K)1OA|gu>q$ps)Y8g@|qBtmsdl#e# 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 D^EFHE diff --git a/rtdata/images/Light/actions/previewmodeR-on.png b/rtdata/images/Light/actions/previewmodeR-on.png index 5fb0f996e16a6681d1ea4380190e486d3d065cfd..fb1e46e98c4078e30f33887975dadeb14122ac4d 100644 GIT binary patch delta 151 zcmX>qx`}auay4nJ@ErkR#;MwT(m+AU64!{5;QX|b z^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1U_JzX3_G$tmeBqaPe-@v}X00?3X3=U{z w7CdBP7Ph;~!^6|;#Hh^7nBUj*kcHuh6f3{L@8v5l1NAa^y85}Sb4q9e0K2R$NB{r; delta 2750 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 Ef>fkS)Bpeg diff --git a/tools/source_icons/scalable/previewmodeB-off.file b/tools/source_icons/scalable/previewmodeB-off.file new file mode 100644 index 000000000..78d96d991 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeB-off.file @@ -0,0 +1 @@ +previewmodeB-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeB-off.svg b/tools/source_icons/scalable/previewmodeB-off.svg new file mode 100644 index 000000000..2566c37cf --- /dev/null +++ b/tools/source_icons/scalable/previewmodeB-off.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeB-on.file b/tools/source_icons/scalable/previewmodeB-on.file new file mode 100644 index 000000000..045f8a31b --- /dev/null +++ b/tools/source_icons/scalable/previewmodeB-on.file @@ -0,0 +1 @@ +previewmodeB-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeB-on.svg b/tools/source_icons/scalable/previewmodeB-on.svg new file mode 100644 index 000000000..cc3faa733 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeB-on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeBC0-off.file b/tools/source_icons/scalable/previewmodeBC0-off.file new file mode 100644 index 000000000..baf7ab70a --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC0-off.file @@ -0,0 +1 @@ +previewmodeBC0-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC0-off.svg b/tools/source_icons/scalable/previewmodeBC0-off.svg new file mode 100644 index 000000000..7c29636e9 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC0-off.svg @@ -0,0 +1,92 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + T + + diff --git a/tools/source_icons/scalable/previewmodeBC0-on.file b/tools/source_icons/scalable/previewmodeBC0-on.file new file mode 100644 index 000000000..033a88501 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC0-on.file @@ -0,0 +1 @@ +previewmodeBC0-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC0-on.svg b/tools/source_icons/scalable/previewmodeBC0-on.svg new file mode 100644 index 000000000..7613279ec --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC0-on.svg @@ -0,0 +1,92 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + T + + diff --git a/tools/source_icons/scalable/previewmodeBC1-off.file b/tools/source_icons/scalable/previewmodeBC1-off.file new file mode 100644 index 000000000..db5e6f2e2 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC1-off.file @@ -0,0 +1 @@ +previewmodeBC1-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC1-off.svg b/tools/source_icons/scalable/previewmodeBC1-off.svg new file mode 100644 index 000000000..1e7d3e669 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC1-off.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeBC1-on.file b/tools/source_icons/scalable/previewmodeBC1-on.file new file mode 100644 index 000000000..1de2f604d --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC1-on.file @@ -0,0 +1 @@ +previewmodeBC1-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC1-on.svg b/tools/source_icons/scalable/previewmodeBC1-on.svg new file mode 100644 index 000000000..b4b21cd85 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC1-on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeBC2-off.file b/tools/source_icons/scalable/previewmodeBC2-off.file new file mode 100644 index 000000000..6073f7aac --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC2-off.file @@ -0,0 +1 @@ +previewmodeBC2-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC2-off.svg b/tools/source_icons/scalable/previewmodeBC2-off.svg new file mode 100644 index 000000000..e9f4e10f2 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC2-off.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeBC2-on.file b/tools/source_icons/scalable/previewmodeBC2-on.file new file mode 100644 index 000000000..18229b31d --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC2-on.file @@ -0,0 +1 @@ +previewmodeBC2-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC2-on.svg b/tools/source_icons/scalable/previewmodeBC2-on.svg new file mode 100644 index 000000000..582b69fd8 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC2-on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeBC3-off.file b/tools/source_icons/scalable/previewmodeBC3-off.file new file mode 100644 index 000000000..1538e97f1 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC3-off.file @@ -0,0 +1 @@ +previewmodeBC3-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC3-off.svg b/tools/source_icons/scalable/previewmodeBC3-off.svg new file mode 100644 index 000000000..f8adf9626 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC3-off.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeBC3-on.file b/tools/source_icons/scalable/previewmodeBC3-on.file new file mode 100644 index 000000000..6dad52343 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC3-on.file @@ -0,0 +1 @@ +previewmodeBC3-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeBC3-on.svg b/tools/source_icons/scalable/previewmodeBC3-on.svg new file mode 100644 index 000000000..8e92c0b35 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeBC3-on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeF-off.file b/tools/source_icons/scalable/previewmodeF-off.file new file mode 100644 index 000000000..420ff2d30 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-off.file @@ -0,0 +1 @@ +previewmodeF-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeF-off.svg b/tools/source_icons/scalable/previewmodeF-off.svg new file mode 100644 index 000000000..dd4f099b9 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-off.svg @@ -0,0 +1,92 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + F + + diff --git a/tools/source_icons/scalable/previewmodeF-on.file b/tools/source_icons/scalable/previewmodeF-on.file new file mode 100644 index 000000000..64d9940b3 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-on.file @@ -0,0 +1 @@ +previewmodeF-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeF-on.svg b/tools/source_icons/scalable/previewmodeF-on.svg new file mode 100644 index 000000000..0b5ca90c5 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-on.svg @@ -0,0 +1,92 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + F + + diff --git a/tools/source_icons/scalable/previewmodeG-off.file b/tools/source_icons/scalable/previewmodeG-off.file new file mode 100644 index 000000000..be2f098d4 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeG-off.file @@ -0,0 +1 @@ +previewmodeG-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeG-off.svg b/tools/source_icons/scalable/previewmodeG-off.svg new file mode 100644 index 000000000..29f08ebec --- /dev/null +++ b/tools/source_icons/scalable/previewmodeG-off.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeG-on.file b/tools/source_icons/scalable/previewmodeG-on.file new file mode 100644 index 000000000..d6c82f803 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeG-on.file @@ -0,0 +1 @@ +previewmodeG-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeG-on.svg b/tools/source_icons/scalable/previewmodeG-on.svg new file mode 100644 index 000000000..4e5e19b56 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeG-on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeL-off.file b/tools/source_icons/scalable/previewmodeL-off.file new file mode 100644 index 000000000..7a743f2a3 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeL-off.file @@ -0,0 +1 @@ +previewmodeL-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeL-off.svg b/tools/source_icons/scalable/previewmodeL-off.svg new file mode 100644 index 000000000..ea9300e7a --- /dev/null +++ b/tools/source_icons/scalable/previewmodeL-off.svg @@ -0,0 +1,92 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + L + + diff --git a/tools/source_icons/scalable/previewmodeL-on.file b/tools/source_icons/scalable/previewmodeL-on.file new file mode 100644 index 000000000..e7b99191f --- /dev/null +++ b/tools/source_icons/scalable/previewmodeL-on.file @@ -0,0 +1 @@ +previewmodeL-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeL-on.svg b/tools/source_icons/scalable/previewmodeL-on.svg new file mode 100644 index 000000000..41cd85c07 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeL-on.svg @@ -0,0 +1,92 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + L + + diff --git a/tools/source_icons/scalable/previewmodeR-off.file b/tools/source_icons/scalable/previewmodeR-off.file new file mode 100644 index 000000000..a18cb0f3d --- /dev/null +++ b/tools/source_icons/scalable/previewmodeR-off.file @@ -0,0 +1 @@ +previewmodeR-off.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeR-off.svg b/tools/source_icons/scalable/previewmodeR-off.svg new file mode 100644 index 000000000..2bb60f3b6 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeR-off.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeR-on.file b/tools/source_icons/scalable/previewmodeR-on.file new file mode 100644 index 000000000..5901958fb --- /dev/null +++ b/tools/source_icons/scalable/previewmodeR-on.file @@ -0,0 +1 @@ +previewmodeR-on.png,w8,actions diff --git a/tools/source_icons/scalable/previewmodeR-on.svg b/tools/source_icons/scalable/previewmodeR-on.svg new file mode 100644 index 000000000..0648c48b2 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeR-on.svg @@ -0,0 +1,81 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + From 06fd003858e5817798fb667f57e91aa2c9edd7ab Mon Sep 17 00:00:00 2001 From: johenning Date: Sun, 27 Aug 2017 21:27:23 +0200 Subject: [PATCH 045/126] Fixed indentation --- rtgui/batchqueue.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 3a5576987..3d773d874 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -745,13 +745,12 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam if (origFileName[0] == '/') { pa.push_back ("/" + da[0]); - } else if (origFileName[0] == '\\') { - if (origFileName.size() > 1 && origFileName[1] == '\\') { - pa.push_back ("\\\\" + da[0]); - } - else { - pa.push_back ("/" + da[0]); - } + } else if (origFileName[0] == '\\') { + if (origFileName.size() > 1 && origFileName[1] == '\\') { + pa.push_back ("\\\\" + da[0]); + } else { + pa.push_back ("/" + da[0]); + } } else { pa.push_back (da[0]); } From f3b4722e4f3ae0adf2476e2af0c9f659d960a2c4 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 28 Aug 2017 17:40:05 +0200 Subject: [PATCH 046/126] RawTherapee is crashing when trying to open .dng taken on smartphone, fixes #4047 --- rtengine/rawimage.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 62752b59c..c2cdcb6ec 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -20,6 +20,8 @@ #define __RAWIMAGE_H #include +#include +#include #include "dcraw.h" #include "imageio.h" @@ -233,7 +235,13 @@ public: } float get_pre_mul(int c )const { - return pre_mul[c]; + if(std::isfinite(pre_mul[c])) { + return pre_mul[c]; + } else { + std::cout << "Failure decoding '" << filename << "', please file a bug report including the raw file and the line below:" << std::endl; + std::cout << "rawimage.h get_pre_mul() : pre_mul[" << c << "] value " << pre_mul[c] << " automatically replaced by value 1.0" << std::endl; + return 1.f; + } } float get_rgb_cam( int r, int c) const { From 8df659d2fd9e765978672f92e2a2658ff5e6f6a6 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Tue, 29 Aug 2017 02:07:58 +0200 Subject: [PATCH 047/126] Solving issue #4014 : Batch Edit "Transform-Resize" randomly changes default values in USM Reidentation in batchtoolpanelcoord.cc for a more compact code --- rtgui/addsetids.h | 6 + rtgui/batchtoolpanelcoord.cc | 567 +++++++++-------------------------- rtgui/preferences.cc | 10 +- rtgui/prsharpening.cc | 60 ++-- rtgui/prsharpening.h | 2 +- rtgui/resize.cc | 11 + rtgui/resize.h | 3 + rtgui/sharpening.cc | 30 +- rtgui/sharpening.h | 2 +- 9 files changed, 226 insertions(+), 465 deletions(-) diff --git a/rtgui/addsetids.h b/rtgui/addsetids.h index 898ef9528..2ee2e6053 100644 --- a/rtgui/addsetids.h +++ b/rtgui/addsetids.h @@ -116,6 +116,12 @@ enum { ADDSET_RETI_GAM, ADDSET_RETI_SLO, ADDSET_WB_TEMPBIAS, + ADDSET_SHARP_RADIUS, + ADDSET_SHARP_DAMPING, + ADDSET_SHARP_ITER, + ADDSET_SHARP_EDGETOL, + ADDSET_SHARP_HALOCTRL, + ADDSET_RESIZE_SCALE, ADDSET_PARAM_NUM // THIS IS USED AS A DELIMITER!! }; diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index e85ee8523..db858bdbc 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -157,12 +157,14 @@ void BatchToolPanelCoordinator::initSession () vignetting->setAdjusterBehavior (false, false, false, false); colorappearance->setAdjusterBehavior (false, false, false, false, false, false, false, false, false, false, false, false, false); rotate->setAdjusterBehavior (false); + resize->setAdjusterBehavior (false); distortion->setAdjusterBehavior (false); perspective->setAdjusterBehavior (false); gradient->setAdjusterBehavior (false, false, false, false); pcvignette->setAdjusterBehavior (false, false, false); cacorrection->setAdjusterBehavior (false); - sharpening->setAdjusterBehavior (false); + sharpening->setAdjusterBehavior (false, false, false, false, false, false); + prsharpening->setAdjusterBehavior (false, false, false, false, false, false); sharpenEdge->setAdjusterBehavior (false, false); sharpenMicro->setAdjusterBehavior (false, false); icm->setAdjusterBehavior (false, false); @@ -196,12 +198,15 @@ void BatchToolPanelCoordinator::initSession () vignetting->setAdjusterBehavior (options.baBehav[ADDSET_VIGN_AMOUNT], options.baBehav[ADDSET_VIGN_RADIUS], options.baBehav[ADDSET_VIGN_STRENGTH], options.baBehav[ADDSET_VIGN_CENTER]); colorappearance->setAdjusterBehavior (options.baBehav[ADDSET_CAT_DEGREE], options.baBehav[ADDSET_CAT_ADAPTSCENE], options.baBehav[ADDSET_CAT_ADAPTVIEWING], options.baBehav[ADDSET_CAT_BADPIX], options.baBehav[ADDSET_CAT_LIGHT], options.baBehav[ADDSET_CAT_CHROMA], options.baBehav[ADDSET_CAT_CONTRAST], options.baBehav[ADDSET_CAT_RSTPRO], options.baBehav[ADDSET_CAT_BRIGHT], options.baBehav[ADDSET_CAT_CONTRAST_Q], options.baBehav[ADDSET_CAT_CHROMA_S], options.baBehav[ADDSET_CAT_CHROMA_M], options.baBehav[ADDSET_CAT_HUE]); rotate->setAdjusterBehavior (options.baBehav[ADDSET_ROTATE_DEGREE]); + resize->setAdjusterBehavior (options.baBehav[ADDSET_RESIZE_SCALE]); distortion->setAdjusterBehavior (options.baBehav[ADDSET_DIST_AMOUNT]); perspective->setAdjusterBehavior (options.baBehav[ADDSET_PERSPECTIVE]); gradient->setAdjusterBehavior (options.baBehav[ADDSET_GRADIENT_DEGREE], options.baBehav[ADDSET_GRADIENT_FEATHER], options.baBehav[ADDSET_GRADIENT_STRENGTH], options.baBehav[ADDSET_GRADIENT_CENTER]); pcvignette->setAdjusterBehavior (options.baBehav[ADDSET_PCVIGNETTE_STRENGTH], options.baBehav[ADDSET_PCVIGNETTE_FEATHER], options.baBehav[ADDSET_PCVIGNETTE_ROUNDNESS]); cacorrection->setAdjusterBehavior (options.baBehav[ADDSET_CA]); - sharpening->setAdjusterBehavior (options.baBehav[ADDSET_SHARP_AMOUNT]); + sharpening->setAdjusterBehavior (options.baBehav[ADDSET_SHARP_RADIUS], options.baBehav[ADDSET_SHARP_AMOUNT], options.baBehav[ADDSET_SHARP_DAMPING], options.baBehav[ADDSET_SHARP_ITER], options.baBehav[ADDSET_SHARP_EDGETOL], options.baBehav[ADDSET_SHARP_HALOCTRL]); + prsharpening->setAdjusterBehavior (options.baBehav[ADDSET_SHARP_RADIUS], options.baBehav[ADDSET_SHARP_AMOUNT], options.baBehav[ADDSET_SHARP_DAMPING], options.baBehav[ADDSET_SHARP_ITER], options.baBehav[ADDSET_SHARP_EDGETOL], options.baBehav[ADDSET_SHARP_HALOCTRL]); + sharpenEdge->setAdjusterBehavior (options.baBehav[ADDSET_SHARPENEDGE_AMOUNT], options.baBehav[ADDSET_SHARPENEDGE_PASS]); sharpenMicro->setAdjusterBehavior (options.baBehav[ADDSET_SHARPENMICRO_AMOUNT], options.baBehav[ADDSET_SHARPENMICRO_UNIFORMITY]); icm->setAdjusterBehavior (options.baBehav[ADDSET_FREE_OUPUT_GAMMA], options.baBehav[ADDSET_FREE_OUTPUT_SLOPE]); @@ -223,450 +228,146 @@ void BatchToolPanelCoordinator::initSession () bayerrawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_BLACKS]); xtransrawexposure->setAdjusterBehavior (options.baBehav[ADDSET_RAWEXPOS_BLACKS]); - if (options.baBehav[ADDSET_TC_EXPCOMP]) { - pparams.toneCurve.expcomp = 0; + // *INDENT-OFF* + if (options.baBehav[ADDSET_TC_EXPCOMP]) { pparams.toneCurve.expcomp = 0; } + if (options.baBehav[ADDSET_TC_HLCOMPAMOUNT]) { pparams.toneCurve.hlcompr = 0; } + if (options.baBehav[ADDSET_TC_HLCOMPTHRESH]) { pparams.toneCurve.hlcomprthresh = 0; } + if (options.baBehav[ADDSET_TC_BRIGHTNESS]) { pparams.toneCurve.brightness = 0; } + if (options.baBehav[ADDSET_TC_BLACKLEVEL]) {pparams.toneCurve.black = 0; } + if (options.baBehav[ADDSET_TC_SHCOMP]) { pparams.toneCurve.shcompr = 0; } + if (options.baBehav[ADDSET_TC_CONTRAST]) { pparams.toneCurve.contrast = 0; } + if (options.baBehav[ADDSET_TC_SATURATION]) { pparams.toneCurve.saturation = 0;} + if (options.baBehav[ADDSET_SH_HIGHLIGHTS]) { pparams.sh.highlights = 0; } + if (options.baBehav[ADDSET_SH_SHADOWS]) { pparams.sh.shadows = 0; } + if (options.baBehav[ADDSET_SH_LOCALCONTRAST]) { pparams.sh.localcontrast = 0; } + if (options.baBehav[ADDSET_LC_BRIGHTNESS]) { pparams.labCurve.brightness = 0; } + if (options.baBehav[ADDSET_LC_CONTRAST]) { pparams.labCurve.contrast = 0; } + if (options.baBehav[ADDSET_LC_CHROMATICITY]) { pparams.labCurve.chromaticity = 0; } + if (options.baBehav[ADDSET_SHARP_RADIUS]) { + pparams.sharpening.radius = pparams.sharpening.deconvradius = pparams.sharpening.edges_radius = 0; + pparams.prsharpening.radius = pparams.prsharpening.deconvradius = pparams.prsharpening.edges_radius = 0; } - - if (options.baBehav[ADDSET_TC_HLCOMPAMOUNT]) { - pparams.toneCurve.hlcompr = 0; - } - - if (options.baBehav[ADDSET_TC_HLCOMPTHRESH]) { - pparams.toneCurve.hlcomprthresh = 0; - } - - if (options.baBehav[ADDSET_TC_BRIGHTNESS]) { - pparams.toneCurve.brightness = 0; - } - - if (options.baBehav[ADDSET_TC_BLACKLEVEL]) { - pparams.toneCurve.black = 0; - } - - if (options.baBehav[ADDSET_TC_SHCOMP]) { - pparams.toneCurve.shcompr = 0; - } - - if (options.baBehav[ADDSET_TC_CONTRAST]) { - pparams.toneCurve.contrast = 0; - } - - if (options.baBehav[ADDSET_TC_SATURATION]) { - pparams.toneCurve.saturation = 0; - } - - if (options.baBehav[ADDSET_SH_HIGHLIGHTS]) { - pparams.sh.highlights = 0; - } - - if (options.baBehav[ADDSET_SH_SHADOWS]) { - pparams.sh.shadows = 0; - } - - if (options.baBehav[ADDSET_SH_LOCALCONTRAST]) { - pparams.sh.localcontrast = 0; - } - - if (options.baBehav[ADDSET_LC_BRIGHTNESS]) { - pparams.labCurve.brightness = 0; - } - - if (options.baBehav[ADDSET_LC_CONTRAST]) { - pparams.labCurve.contrast = 0; - } - - if (options.baBehav[ADDSET_LC_CHROMATICITY]) { - pparams.labCurve.chromaticity = 0; - } - if (options.baBehav[ADDSET_SHARP_AMOUNT]) { - pparams.sharpening.amount = 0; + pparams.sharpening.amount = pparams.sharpening.deconvamount = 0; + pparams.prsharpening.amount = pparams.prsharpening.deconvamount = 0; } - - if (options.baBehav[ADDSET_SHARPENEDGE_AMOUNT]) { - pparams.sharpenEdge.amount = 0; + if (options.baBehav[ADDSET_SHARP_DAMPING]) { pparams.sharpening.deconvdamping = 0; pparams.prsharpening.deconvdamping = 0; } + if (options.baBehav[ADDSET_SHARP_ITER]) { pparams.sharpening.deconviter = 0; pparams.prsharpening.deconviter = 0; } + if (options.baBehav[ADDSET_SHARP_EDGETOL]) { pparams.sharpening.edges_tolerance = 0; pparams.prsharpening.edges_tolerance = 0; } + if (options.baBehav[ADDSET_SHARP_HALOCTRL]) { pparams.sharpening.halocontrol_amount = 0; pparams.prsharpening.halocontrol_amount = 0; } + if (options.baBehav[ADDSET_SHARPENEDGE_AMOUNT]) { pparams.sharpenEdge.amount = 0; } + if (options.baBehav[ADDSET_SHARPENMICRO_AMOUNT]) { pparams.sharpenMicro.amount = 0; } + if (options.baBehav[ADDSET_SHARPENEDGE_PASS]) { pparams.sharpenEdge.passes = 0; } + if (options.baBehav[ADDSET_SHARPENMICRO_UNIFORMITY]) { pparams.sharpenMicro.uniformity = 0; } + if (options.baBehav[ADDSET_CHMIXER]) for (int i = 0; i < 3; i++) { pparams.chmixer.red[i] = pparams.chmixer.green[i] = pparams.chmixer.blue[i] = 0; } + if (options.baBehav[ADDSET_BLACKWHITE_HUES]) { + pparams.blackwhite.mixerRed = pparams.blackwhite.mixerOrange = pparams.blackwhite.mixerYellow = + pparams.blackwhite.mixerGreen = pparams.blackwhite.mixerCyan = pparams.blackwhite.mixerBlue = + pparams.blackwhite.mixerMagenta = pparams.blackwhite.mixerPurple = 0; } - - if (options.baBehav[ADDSET_SHARPENMICRO_AMOUNT]) { - pparams.sharpenMicro.amount = 0; - } - - if (options.baBehav[ADDSET_SHARPENEDGE_PASS]) { - pparams.sharpenEdge.passes = 0; - } - - if (options.baBehav[ADDSET_SHARPENMICRO_UNIFORMITY]) { - pparams.sharpenMicro.uniformity = 0; - } - - if (options.baBehav[ADDSET_CHMIXER]) for (int i = 0; i < 3; i++) { - pparams.chmixer.red[i] = pparams.chmixer.green[i] = pparams.chmixer.blue[i] = 0; - } - - if (options.baBehav[ADDSET_BLACKWHITE_HUES]) pparams.blackwhite.mixerRed = pparams.blackwhite.mixerOrange = pparams.blackwhite.mixerYellow = - pparams.blackwhite.mixerGreen = pparams.blackwhite.mixerCyan = pparams.blackwhite.mixerBlue = - pparams.blackwhite.mixerMagenta = pparams.blackwhite.mixerPurple = 0; - - if (options.baBehav[ADDSET_BLACKWHITE_GAMMA]) { - pparams.blackwhite.gammaRed = pparams.blackwhite.gammaGreen = pparams.blackwhite.gammaBlue = 0; - } - + if (options.baBehav[ADDSET_BLACKWHITE_GAMMA]) { pparams.blackwhite.gammaRed = pparams.blackwhite.gammaGreen = pparams.blackwhite.gammaBlue = 0; } //if (options.baBehav[ADDSET_LD_EDGETOLERANCE]) pparams.lumaDenoise.edgetolerance = 0; - - if (options.baBehav[ADDSET_WB_TEMPERATURE]) { - pparams.wb.temperature = 0; - } - - if (options.baBehav[ADDSET_WB_GREEN]) { - pparams.wb.green = 0; - } - - if (options.baBehav[ADDSET_WB_EQUAL]) { - pparams.wb.equal = 0; - } - - if (options.baBehav[ADDSET_WB_TEMPBIAS]) { - pparams.wb.tempBias = 0; - } - - if (options.baBehav[ADDSET_VIBRANCE_PASTELS]) { - pparams.vibrance.pastels = 0; - } - - if (options.baBehav[ADDSET_VIBRANCE_SATURATED]) { - pparams.vibrance.saturated = 0; - } - - if (options.baBehav[ADDSET_CAT_DEGREE]) { - pparams.colorappearance.degree = 0; - } - - if (options.baBehav[ADDSET_CAT_ADAPTSCENE]) { - pparams.colorappearance.adapscen = 0; - } - - if (options.baBehav[ADDSET_CAT_ADAPTVIEWING]) { - pparams.colorappearance.adaplum = 0; - } - - if (options.baBehav[ADDSET_CAT_BADPIX]) { - pparams.colorappearance.badpixsl = 0; - } - - if (options.baBehav[ADDSET_CAT_LIGHT]) { - pparams.colorappearance.jlight = 0; - } - - if (options.baBehav[ADDSET_CAT_BRIGHT]) { - pparams.colorappearance.qbright = 0; - } - - if (options.baBehav[ADDSET_CAT_CHROMA]) { - pparams.colorappearance.chroma = 0; - } - - if (options.baBehav[ADDSET_CAT_CHROMA_S]) { - pparams.colorappearance.schroma = 0; - } - - if (options.baBehav[ADDSET_CAT_CHROMA_M]) { - pparams.colorappearance.mchroma = 0; - } - - if (options.baBehav[ADDSET_CAT_RSTPRO]) { - pparams.colorappearance.rstprotection = 0; - } - - if (options.baBehav[ADDSET_CAT_CONTRAST]) { - pparams.colorappearance.contrast = 0; - } - - if (options.baBehav[ADDSET_CAT_CONTRAST_Q]) { - pparams.colorappearance.qcontrast = 0; - } - - if (options.baBehav[ADDSET_CAT_HUE]) { - pparams.colorappearance.colorh = 0; - } - - if (options.baBehav[ADDSET_FREE_OUPUT_GAMMA]) { - pparams.icm.gampos = 0; - } - - if (options.baBehav[ADDSET_FREE_OUTPUT_SLOPE]) { - pparams.icm.slpos = 0; - } - + if (options.baBehav[ADDSET_WB_TEMPERATURE]) { pparams.wb.temperature = 0; } + if (options.baBehav[ADDSET_WB_GREEN]) { pparams.wb.green = 0; } + if (options.baBehav[ADDSET_WB_EQUAL]) { pparams.wb.equal = 0; } + if (options.baBehav[ADDSET_WB_TEMPBIAS]) { pparams.wb.tempBias = 0; } + if (options.baBehav[ADDSET_VIBRANCE_PASTELS]) { pparams.vibrance.pastels = 0; } + if (options.baBehav[ADDSET_VIBRANCE_SATURATED]) { pparams.vibrance.saturated = 0; } + if (options.baBehav[ADDSET_CAT_DEGREE]) { pparams.colorappearance.degree = 0; } + if (options.baBehav[ADDSET_CAT_ADAPTSCENE]) { pparams.colorappearance.adapscen = 0; } + if (options.baBehav[ADDSET_CAT_ADAPTVIEWING]) { pparams.colorappearance.adaplum = 0; } + if (options.baBehav[ADDSET_CAT_BADPIX]) { pparams.colorappearance.badpixsl = 0; } + if (options.baBehav[ADDSET_CAT_LIGHT]) { pparams.colorappearance.jlight = 0; } + if (options.baBehav[ADDSET_CAT_BRIGHT]) { pparams.colorappearance.qbright = 0; } + if (options.baBehav[ADDSET_CAT_CHROMA]) { pparams.colorappearance.chroma = 0; } + if (options.baBehav[ADDSET_CAT_CHROMA_S]) { pparams.colorappearance.schroma = 0; } + if (options.baBehav[ADDSET_CAT_CHROMA_M]) { pparams.colorappearance.mchroma = 0; } + if (options.baBehav[ADDSET_CAT_RSTPRO]) { pparams.colorappearance.rstprotection = 0; } + if (options.baBehav[ADDSET_CAT_CONTRAST]) { pparams.colorappearance.contrast = 0; } + if (options.baBehav[ADDSET_CAT_CONTRAST_Q]) { pparams.colorappearance.qcontrast = 0; } + if (options.baBehav[ADDSET_CAT_HUE]) { pparams.colorappearance.colorh = 0; } + if (options.baBehav[ADDSET_FREE_OUPUT_GAMMA]) { pparams.icm.gampos = 0; } + if (options.baBehav[ADDSET_FREE_OUTPUT_SLOPE]) { pparams.icm.slpos = 0; } //if (options.baBehav[ADDSET_CBOOST_AMOUNT]) pparams.colorBoost.amount = 0; - //if (options.baBehav[ADDSET_CS_BLUEYELLOW]) pparams.colorShift.a = 0; //if (options.baBehav[ADDSET_CS_GREENMAGENTA]) pparams.colorShift.b = 0; - if (options.baBehav[ADDSET_COLORTONING_SPLIT]) pparams.colorToning.redlow = pparams.colorToning.greenlow = pparams.colorToning.bluelow = - pparams.colorToning.redmed = pparams.colorToning.greenmed = pparams.colorToning.bluemed = - pparams.colorToning.redhigh = pparams.colorToning.greenhigh = pparams.colorToning.bluehigh = - pparams.colorToning.satlow = pparams.colorToning.sathigh = 0; - - if (options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD]) { - pparams.colorToning.satProtectionThreshold = 0; + if (options.baBehav[ADDSET_COLORTONING_SPLIT]) { + pparams.colorToning.redlow = pparams.colorToning.greenlow = pparams.colorToning.bluelow = + pparams.colorToning.redmed = pparams.colorToning.greenmed = pparams.colorToning.bluemed = + pparams.colorToning.redhigh = pparams.colorToning.greenhigh = pparams.colorToning.bluehigh = + pparams.colorToning.satlow = pparams.colorToning.sathigh = 0; } - - if (options.baBehav[ADDSET_COLORTONING_SATOPACITY]) { - pparams.colorToning.saturatedOpacity = 0; - } - - if (options.baBehav[ADDSET_COLORTONING_BALANCE]) { - pparams.colorToning.balance = 0; - } - - if (options.baBehav[ADDSET_COLORTONING_STRENGTH]) { - pparams.colorToning.strength = 0; - } - - if (options.baBehav[ADDSET_FILMSIMULATION_STRENGTH]) { - pparams.filmSimulation.strength = 0; - } - - if (options.baBehav[ADDSET_ROTATE_DEGREE]) { - pparams.rotate.degree = 0; - } - - if (options.baBehav[ADDSET_DIST_AMOUNT]) { - pparams.distortion.amount = 0; - } - - if (options.baBehav[ADDSET_PERSPECTIVE]) { - pparams.perspective.horizontal = pparams.perspective.vertical = 0; - } - - if (options.baBehav[ADDSET_GRADIENT_DEGREE]) { - pparams.gradient.degree = 0; - } - - if (options.baBehav[ADDSET_GRADIENT_FEATHER]) { - pparams.gradient.feather = 0; - } - - if (options.baBehav[ADDSET_GRADIENT_STRENGTH]) { - pparams.gradient.strength = 0; - } - - if (options.baBehav[ADDSET_GRADIENT_CENTER]) { - pparams.gradient.centerX = 0; - } - - if (options.baBehav[ADDSET_GRADIENT_CENTER]) { - pparams.gradient.centerY = 0; - } - - if (options.baBehav[ADDSET_PCVIGNETTE_STRENGTH]) { - pparams.pcvignette.strength = 0; - } - - if (options.baBehav[ADDSET_PCVIGNETTE_FEATHER]) { - pparams.pcvignette.feather = 0; - } - - if (options.baBehav[ADDSET_PCVIGNETTE_ROUNDNESS]) { - pparams.pcvignette.roundness = 0; - } - - if (options.baBehav[ADDSET_CA]) { - pparams.cacorrection.red = 0; - } - - if (options.baBehav[ADDSET_CA]) { - pparams.cacorrection.blue = 0; - } - - if (options.baBehav[ADDSET_VIGN_AMOUNT]) { - pparams.vignetting.amount = 0; - } - - if (options.baBehav[ADDSET_VIGN_RADIUS]) { - pparams.vignetting.radius = 0; - } - - if (options.baBehav[ADDSET_VIGN_STRENGTH]) { - pparams.vignetting.strength = 0; - } - - if (options.baBehav[ADDSET_VIGN_CENTER]) { - pparams.vignetting.centerX = 0; - } - - if (options.baBehav[ADDSET_VIGN_CENTER]) { - pparams.vignetting.centerY = 0; - } - - if (options.baBehav[ADDSET_DIRPYREQ]) for (int i = 0; i < 6; i++) { - pparams.dirpyrequalizer.mult[i] = 0; - } - - if (options.baBehav[ADDSET_DIRPYREQ_THRESHOLD]) { - pparams.dirpyrequalizer.threshold = 0; - } - - if (options.baBehav[ADDSET_DIRPYREQ_SKINPROTECT]) { - pparams.dirpyrequalizer.skinprotect = 0; - } - - if (options.baBehav[ADDSET_WA]) for (int i = 0; i < 8; i++) { - pparams.wavelet.c[i] = 0; - } - - if (options.baBehav[ADDSET_WA_THRESHOLD]) { - pparams.wavelet.threshold = 0; - } - - if (options.baBehav[ADDSET_WA_THRESHOLD2]) { - pparams.wavelet.threshold2 = 0; - } - - if (options.baBehav[ADDSET_WA_SKINPROTECT]) { - pparams.wavelet.skinprotect = 0; - } - - if (options.baBehav[ADDSET_WA_CHRO]) { - pparams.wavelet.chro = 0; - } - - if (options.baBehav[ADDSET_WA_CHROMA]) { - pparams.wavelet.chroma = 0; - } - - if (options.baBehav[ADDSET_WA_CONTRAST]) { - pparams.wavelet.contrast = 0; - } - - if (options.baBehav[ADDSET_WA_THRES]) { - pparams.wavelet.thres = 0; - } - - if (options.baBehav[ADDSET_WA_RESCON]) { - pparams.wavelet.rescon = 0; - } - - if (options.baBehav[ADDSET_WA_RESCONH]) { - pparams.wavelet.resconH = 0; - } - - if (options.baBehav[ADDSET_WA_RESCHRO]) { - pparams.wavelet.reschro = 0; - } - - if (options.baBehav[ADDSET_WA_TMRS]) { - pparams.wavelet.tmrs = 0; - } - - if (options.baBehav[ADDSET_WA_THRR]) { - pparams.wavelet.thr = 0; - } - - if (options.baBehav[ADDSET_WA_THRRH]) { - pparams.wavelet.thrH = 0; - } - - if (options.baBehav[ADDSET_WA_SKYPROTECT]) { - pparams.wavelet.sky = 0; - } - - if (options.baBehav[ADDSET_WA_EDGRAD]) { - pparams.wavelet.edgrad = 0; - } - - if (options.baBehav[ADDSET_WA_EDGVAL]) { - pparams.wavelet.edgval = 0; - } - - if (options.baBehav[ADDSET_WA_STRENGTH]) { - pparams.wavelet.strength = 0; - } - - if (options.baBehav[ADDSET_WA_EDGEDETECT]) { - pparams.wavelet.edgedetect = 0; - } - - if (options.baBehav[ADDSET_WA_GAMMA]) { - pparams.wavelet.gamma = 0; - } - - if (options.baBehav[ADDSET_RETI_STR]) { - pparams.retinex.str = 0; - } - - if (options.baBehav[ADDSET_RETI_NEIGH]) { - pparams.retinex.neigh = 0; - } - - if (options.baBehav[ADDSET_RETI_LIMD]) { - pparams.retinex.limd = 0; - } - - if (options.baBehav[ADDSET_RETI_OFFS]) { - pparams.retinex.offs = 0; - } - - if (options.baBehav[ADDSET_RETI_VART]) { - pparams.retinex.vart = 0; - } - - if (options.baBehav[ADDSET_RETI_GAM]) { - pparams.retinex.gam = 0; - } - - if (options.baBehav[ADDSET_RETI_SLO]) { - pparams.retinex.slope = 0; - } - - if (options.baBehav[ADDSET_DIRPYRDN_LUMA]) { - pparams.dirpyrDenoise.luma = 0; - } - - if (options.baBehav[ADDSET_DIRPYRDN_CHROMA]) { - pparams.dirpyrDenoise.chroma = 0; - } - - if (options.baBehav[ADDSET_DIRPYRDN_CHROMARED]) { - pparams.dirpyrDenoise.redchro = 0; - } - - if (options.baBehav[ADDSET_DIRPYRDN_CHROMABLUE]) { - pparams.dirpyrDenoise.bluechro = 0; - } - -// pparams.dirpyrDenoise.Ldetail = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0; - if (options.baBehav[ADDSET_DIRPYRDN_GAMMA]) { - pparams.dirpyrDenoise.gamma = 0; - } - - if (options.baBehav[ADDSET_RAWCACORR]) { - pparams.raw.cablue = pparams.raw.cared = 0; - } - - if (options.baBehav[ADDSET_RAWEXPOS_LINEAR]) { - pparams.raw.expos = 0; - } - - if (options.baBehav[ADDSET_RAWEXPOS_PRESER]) { - pparams.raw.preser = 0; - } - + if (options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD]) { pparams.colorToning.satProtectionThreshold = 0; } + if (options.baBehav[ADDSET_COLORTONING_SATOPACITY]) { pparams.colorToning.saturatedOpacity = 0; } + if (options.baBehav[ADDSET_COLORTONING_BALANCE]) { pparams.colorToning.balance = 0; } + if (options.baBehav[ADDSET_COLORTONING_STRENGTH]) { pparams.colorToning.strength = 0; } + if (options.baBehav[ADDSET_FILMSIMULATION_STRENGTH]) { pparams.filmSimulation.strength = 0; } + if (options.baBehav[ADDSET_ROTATE_DEGREE]) { pparams.rotate.degree = 0; } + if (options.baBehav[ADDSET_RESIZE_SCALE]) { pparams.resize.scale = 0; } + if (options.baBehav[ADDSET_DIST_AMOUNT]) { pparams.distortion.amount = 0; } + if (options.baBehav[ADDSET_PERSPECTIVE]) { pparams.perspective.horizontal = pparams.perspective.vertical = 0; } + if (options.baBehav[ADDSET_GRADIENT_DEGREE]) { pparams.gradient.degree = 0; } + if (options.baBehav[ADDSET_GRADIENT_FEATHER]) { pparams.gradient.feather = 0; } + if (options.baBehav[ADDSET_GRADIENT_STRENGTH]) { pparams.gradient.strength = 0; } + if (options.baBehav[ADDSET_GRADIENT_CENTER]) { pparams.gradient.centerX = 0; } + if (options.baBehav[ADDSET_GRADIENT_CENTER]) { pparams.gradient.centerY = 0; } + if (options.baBehav[ADDSET_PCVIGNETTE_STRENGTH]) { pparams.pcvignette.strength = 0; } + if (options.baBehav[ADDSET_PCVIGNETTE_FEATHER]) { pparams.pcvignette.feather = 0; } + if (options.baBehav[ADDSET_PCVIGNETTE_ROUNDNESS]) { pparams.pcvignette.roundness = 0; } + if (options.baBehav[ADDSET_CA]) { pparams.cacorrection.red = 0; } + if (options.baBehav[ADDSET_CA]) { pparams.cacorrection.blue = 0; } + if (options.baBehav[ADDSET_VIGN_AMOUNT]) { pparams.vignetting.amount = 0; } + if (options.baBehav[ADDSET_VIGN_RADIUS]) { pparams.vignetting.radius = 0; } + if (options.baBehav[ADDSET_VIGN_STRENGTH]) { pparams.vignetting.strength = 0; } + if (options.baBehav[ADDSET_VIGN_CENTER]) { pparams.vignetting.centerX = 0; } + if (options.baBehav[ADDSET_VIGN_CENTER]) { pparams.vignetting.centerY = 0; } + if (options.baBehav[ADDSET_DIRPYREQ]) for (int i = 0; i < 6; i++) { pparams.dirpyrequalizer.mult[i] = 0; } + if (options.baBehav[ADDSET_DIRPYREQ_THRESHOLD]) { pparams.dirpyrequalizer.threshold = 0; } + if (options.baBehav[ADDSET_DIRPYREQ_SKINPROTECT]) { pparams.dirpyrequalizer.skinprotect = 0; } + if (options.baBehav[ADDSET_WA]) for (int i = 0; i < 8; i++) { pparams.wavelet.c[i] = 0; } + if (options.baBehav[ADDSET_WA_THRESHOLD]) { pparams.wavelet.threshold = 0; } + if (options.baBehav[ADDSET_WA_THRESHOLD2]) { pparams.wavelet.threshold2 = 0; } + if (options.baBehav[ADDSET_WA_SKINPROTECT]) { pparams.wavelet.skinprotect = 0; } + if (options.baBehav[ADDSET_WA_CHRO]) { pparams.wavelet.chro = 0; } + if (options.baBehav[ADDSET_WA_CHROMA]) { pparams.wavelet.chroma = 0; } + if (options.baBehav[ADDSET_WA_CONTRAST]) { pparams.wavelet.contrast = 0; } + if (options.baBehav[ADDSET_WA_THRES]) { pparams.wavelet.thres = 0; } + if (options.baBehav[ADDSET_WA_RESCON]) { pparams.wavelet.rescon = 0; } + if (options.baBehav[ADDSET_WA_RESCONH]) { pparams.wavelet.resconH = 0; } + if (options.baBehav[ADDSET_WA_RESCHRO]) { pparams.wavelet.reschro = 0; } + if (options.baBehav[ADDSET_WA_TMRS]) { pparams.wavelet.tmrs = 0; } + if (options.baBehav[ADDSET_WA_THRR]) { pparams.wavelet.thr = 0; } + if (options.baBehav[ADDSET_WA_THRRH]) { pparams.wavelet.thrH = 0; } + if (options.baBehav[ADDSET_WA_SKYPROTECT]) { pparams.wavelet.sky = 0; } + if (options.baBehav[ADDSET_WA_EDGRAD]) { pparams.wavelet.edgrad = 0; } + if (options.baBehav[ADDSET_WA_EDGVAL]) { pparams.wavelet.edgval = 0; } + if (options.baBehav[ADDSET_WA_STRENGTH]) { pparams.wavelet.strength = 0; } + if (options.baBehav[ADDSET_WA_EDGEDETECT]) { pparams.wavelet.edgedetect = 0; } + if (options.baBehav[ADDSET_WA_GAMMA]) { pparams.wavelet.gamma = 0; } + if (options.baBehav[ADDSET_RETI_STR]) { pparams.retinex.str = 0; } + if (options.baBehav[ADDSET_RETI_NEIGH]) { pparams.retinex.neigh = 0; } + if (options.baBehav[ADDSET_RETI_LIMD]) { pparams.retinex.limd = 0; } + if (options.baBehav[ADDSET_RETI_OFFS]) { pparams.retinex.offs = 0; } + if (options.baBehav[ADDSET_RETI_VART]) { pparams.retinex.vart = 0; } + if (options.baBehav[ADDSET_RETI_GAM]) { pparams.retinex.gam = 0; } + if (options.baBehav[ADDSET_RETI_SLO]) { pparams.retinex.slope = 0; } + if (options.baBehav[ADDSET_DIRPYRDN_LUMA]) { pparams.dirpyrDenoise.luma = 0; } + if (options.baBehav[ADDSET_DIRPYRDN_CHROMA]) { pparams.dirpyrDenoise.chroma = 0; } + if (options.baBehav[ADDSET_DIRPYRDN_CHROMARED]) { pparams.dirpyrDenoise.redchro = 0; } + if (options.baBehav[ADDSET_DIRPYRDN_CHROMABLUE]) { pparams.dirpyrDenoise.bluechro = 0; } + //pparams.dirpyrDenoise.Ldetail = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0; + if (options.baBehav[ADDSET_DIRPYRDN_GAMMA]) { pparams.dirpyrDenoise.gamma = 0; } + if (options.baBehav[ADDSET_RAWCACORR]) { pparams.raw.cablue = pparams.raw.cared = 0; } + if (options.baBehav[ADDSET_RAWEXPOS_LINEAR]) { pparams.raw.expos = 0; } + if (options.baBehav[ADDSET_RAWEXPOS_PRESER]) { pparams.raw.preser = 0; } if (options.baBehav[ADDSET_RAWEXPOS_BLACKS]) { pparams.raw.bayersensor.black0 = pparams.raw.bayersensor.black1 = pparams.raw.bayersensor.black2 = pparams.raw.bayersensor.black3 = 0; pparams.raw.xtranssensor.blackred = pparams.raw.xtranssensor.blackgreen = pparams.raw.xtranssensor.blackblue = 0; } - - if (options.baBehav[ADDSET_RAWFFCLIPCONTROL]) { - pparams.raw.ff_clipControl = 0; - } - - if (options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]) { - pparams.raw.bayersensor.greenthresh = 0; - } - - if (options.baBehav[ADDSET_PREPROCESS_LINEDENOISE]) { - pparams.raw.bayersensor.linenoise = 0; - } + if (options.baBehav[ADDSET_RAWFFCLIPCONTROL]) { pparams.raw.ff_clipControl = 0; } + if (options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]) { pparams.raw.bayersensor.greenthresh = 0; } + if (options.baBehav[ADDSET_PREPROCESS_LINEDENOISE]) { pparams.raw.bayersensor.linenoise = 0; } + // *INDENT-ON* } for (size_t i = 0; i < toolPanels.size(); i++) { diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 94b39bd53..98b01561a 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -210,9 +210,12 @@ Gtk::Widget* Preferences::getBatchProcPanel () appendBehavList (mi, M ("TP_LABCURVE_CONTRAST"), ADDSET_LC_CONTRAST, false); appendBehavList (mi, M ("TP_LABCURVE_CHROMATICITY"), ADDSET_LC_CHROMATICITY, false); - mi = behModel->append (); + mi = behModel->append (); // Used for both Resize and Post-Resize sharpening mi->set_value (behavColumns.label, M ("TP_SHARPENING_LABEL")); + appendBehavList (mi, M ("TP_SHARPENING_RADIUS"), ADDSET_SHARP_RADIUS, false); appendBehavList (mi, M ("TP_SHARPENING_AMOUNT"), ADDSET_SHARP_AMOUNT, false); + appendBehavList (mi, M ("TP_SHARPENING_RLD_DAMPING"), ADDSET_SHARP_DAMPING, false); + appendBehavList (mi, M ("TP_SHARPENING_RLD_ITERATIONS"), ADDSET_SHARP_ITER, false); mi = behModel->append (); mi->set_value (behavColumns.label, M ("TP_SHARPENEDGE_LABEL")); @@ -293,6 +296,11 @@ Gtk::Widget* Preferences::getBatchProcPanel () mi->set_value (behavColumns.label, M ("TP_ROTATE_LABEL")); appendBehavList (mi, M ("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false); + mi = behModel->append (); + mi->set_value (behavColumns.label, M ("TP_RESIZE_LABEL")); + appendBehavList (mi, M ("TP_RESIZE_SCALE"), ADDSET_RESIZE_SCALE, true); + + mi = behModel->append (); mi->set_value (behavColumns.label, M ("TP_DISTORTION_LABEL")); appendBehavList (mi, M ("TP_DISTORTION_AMOUNT"), ADDSET_DIST_AMOUNT, false); diff --git a/rtgui/prsharpening.cc b/rtgui/prsharpening.cc index 5e79d078a..10fc69c10 100644 --- a/rtgui/prsharpening.cc +++ b/rtgui/prsharpening.cc @@ -240,20 +240,20 @@ void PrSharpening::write (ProcParams* pp, ParamsEdited* pedited) } if (pedited) { - pedited->prsharpening.amount = amount->getEditedState (); - pedited->prsharpening.radius = radius->getEditedState (); - pedited->prsharpening.threshold = threshold->getEditedState (); - pedited->prsharpening.edges_radius = eradius->getEditedState (); - pedited->prsharpening.edges_tolerance = etolerance->getEditedState (); + pedited->prsharpening.amount = amount->getEditedState (); + pedited->prsharpening.radius = radius->getEditedState (); + pedited->prsharpening.threshold = threshold->getEditedState (); + pedited->prsharpening.edges_radius = eradius->getEditedState (); + pedited->prsharpening.edges_tolerance = etolerance->getEditedState (); pedited->prsharpening.halocontrol_amount = hcamount->getEditedState (); - pedited->prsharpening.deconvamount = damount->getEditedState (); - pedited->prsharpening.deconvradius = dradius->getEditedState (); - pedited->prsharpening.deconviter = diter->getEditedState (); - pedited->prsharpening.deconvdamping = ddamping->getEditedState (); - pedited->prsharpening.method = method->get_active_row_number() != 2; - pedited->prsharpening.halocontrol = !halocontrol->get_inconsistent(); - pedited->prsharpening.edgesonly = !edgesonly->get_inconsistent(); - pedited->prsharpening.enabled = !get_inconsistent(); + pedited->prsharpening.deconvamount = damount->getEditedState (); + pedited->prsharpening.deconvradius = dradius->getEditedState (); + pedited->prsharpening.deconviter = diter->getEditedState (); + pedited->prsharpening.deconvdamping = ddamping->getEditedState (); + pedited->prsharpening.method = method->get_active_row_number() != 2; + pedited->prsharpening.halocontrol = !halocontrol->get_inconsistent(); + pedited->prsharpening.edgesonly = !edgesonly->get_inconsistent(); + pedited->prsharpening.enabled = !get_inconsistent(); } } @@ -420,13 +420,15 @@ void PrSharpening::halocontrol_toggled () void PrSharpening::method_changed () { - removeIfThere (this, usm, false); - removeIfThere (this, rld, false); + if (!batchMode) { + removeIfThere (this, usm, false); + removeIfThere (this, rld, false); - if (method->get_active_row_number() == 0) { - pack_start (*usm); - } else if (method->get_active_row_number() == 1) { - pack_start (*rld); + if (method->get_active_row_number() == 0) { + pack_start (*usm); + } else if (method->get_active_row_number() == 1) { + pack_start (*rld); + } } if (listener && (multiImage || getEnabled()) ) { @@ -467,16 +469,30 @@ void PrSharpening::setBatchMode (bool batchMode) method->append (M("GENERAL_UNCHANGED")); } -void PrSharpening::setAdjusterBehavior (bool amountadd) +void PrSharpening::setAdjusterBehavior (bool radiusadd, bool amountadd, bool dampingadd, bool iteradd, bool edgetoladd, bool haloctrladd) { + radius->setAddMode(radiusadd); + dradius->setAddMode(radiusadd); amount->setAddMode(amountadd); damount->setAddMode(amountadd); + ddamping->setAddMode(dampingadd); + diter->setAddMode(iteradd); + eradius->setAddMode(radiusadd); + etolerance->setAddMode(edgetoladd); + hcamount->setAddMode(haloctrladd); } void PrSharpening::trimValues (rtengine::procparams::ProcParams* pp) { - amount->trimValue(pp->prsharpening.amount); - damount->trimValue(pp->prsharpening.deconvamount); + radius->trimValue(pp->sharpening.radius); + dradius->trimValue(pp->sharpening.deconvradius); + amount->trimValue(pp->sharpening.amount); + damount->trimValue(pp->sharpening.deconvamount); + ddamping->trimValue(pp->sharpening.deconvdamping); + diter->trimValue(pp->sharpening.deconviter); + eradius->trimValue(pp->sharpening.edges_radius); + etolerance->trimValue(pp->sharpening.edges_tolerance); + hcamount->trimValue(pp->sharpening.halocontrol_amount); } diff --git a/rtgui/prsharpening.h b/rtgui/prsharpening.h index 9bf90cc6c..50dc91258 100644 --- a/rtgui/prsharpening.h +++ b/rtgui/prsharpening.h @@ -70,7 +70,7 @@ public: void method_changed (); void adjusterChanged (ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR); - void setAdjusterBehavior (bool amountadd); + void setAdjusterBehavior (bool radiusadd, bool amountadd, bool dampingadd, bool iteradd, bool edgetoladd, bool haloctrladd); void trimValues (rtengine::procparams::ProcParams* pp); }; diff --git a/rtgui/resize.cc b/rtgui/resize.cc index 1a87bbe8c..971901b84 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -620,3 +620,14 @@ void Resize::enabledChanged () } } +void Resize::setAdjusterBehavior (bool scaleadd) +{ + + scale->setAddMode(scaleadd); +} + +void Resize::trimValues (rtengine::procparams::ProcParams* pp) +{ + + scale->trimValue(pp->resize.scale); +} diff --git a/rtgui/resize.h b/rtgui/resize.h index acba5b478..2b2c2ea26 100644 --- a/rtgui/resize.h +++ b/rtgui/resize.h @@ -57,6 +57,9 @@ public: void setDimensions (); void enabledChanged (); + void setAdjusterBehavior (bool scaleadd); + void trimValues (rtengine::procparams::ProcParams* pp); + private: void fitBoxScale (); int getComputedWidth (); diff --git a/rtgui/sharpening.cc b/rtgui/sharpening.cc index 72f4c62d8..c6d7b08c8 100644 --- a/rtgui/sharpening.cc +++ b/rtgui/sharpening.cc @@ -423,13 +423,15 @@ void Sharpening::halocontrol_toggled () void Sharpening::method_changed () { - removeIfThere (this, usm, false); - removeIfThere (this, rld, false); + if (!batchMode) { + removeIfThere (this, usm, false); + removeIfThere (this, rld, false); - if (method->get_active_row_number() == 0) { - pack_start (*usm); - } else if (method->get_active_row_number() == 1) { - pack_start (*rld); + if (method->get_active_row_number() == 0) { + pack_start (*usm); + } else if (method->get_active_row_number() == 1) { + pack_start (*rld); + } } if (listener && (multiImage || getEnabled()) ) { @@ -461,16 +463,30 @@ void Sharpening::setBatchMode (bool batchMode) method->append (M("GENERAL_UNCHANGED")); } -void Sharpening::setAdjusterBehavior (bool amountadd) +void Sharpening::setAdjusterBehavior (bool radiusadd, bool amountadd, bool dampingadd, bool iteradd, bool edgetoladd, bool haloctrladd) { + radius->setAddMode(radiusadd); + dradius->setAddMode(radiusadd); amount->setAddMode(amountadd); damount->setAddMode(amountadd); + ddamping->setAddMode(dampingadd); + diter->setAddMode(iteradd); + eradius->setAddMode(radiusadd); + etolerance->setAddMode(edgetoladd); + hcamount->setAddMode(haloctrladd); } void Sharpening::trimValues (rtengine::procparams::ProcParams* pp) { + radius->trimValue(pp->sharpening.radius); + dradius->trimValue(pp->sharpening.deconvradius); amount->trimValue(pp->sharpening.amount); damount->trimValue(pp->sharpening.deconvamount); + ddamping->trimValue(pp->sharpening.deconvdamping); + diter->trimValue(pp->sharpening.deconviter); + eradius->trimValue(pp->sharpening.edges_radius); + etolerance->trimValue(pp->sharpening.edges_tolerance); + hcamount->trimValue(pp->sharpening.halocontrol_amount); } diff --git a/rtgui/sharpening.h b/rtgui/sharpening.h index 45c2d9fe1..2901036f5 100644 --- a/rtgui/sharpening.h +++ b/rtgui/sharpening.h @@ -70,7 +70,7 @@ public: void halocontrol_toggled (); void method_changed (); - void setAdjusterBehavior (bool amountadd); + void setAdjusterBehavior (bool radiusadd, bool amountadd, bool dampingadd, bool iteradd, bool edgetoladd, bool haloctrladd); void trimValues (rtengine::procparams::ProcParams* pp); }; From aae027da98cbb60f078ccbfbc15a414be9ea7763 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Tue, 29 Aug 2017 02:10:23 +0200 Subject: [PATCH 048/126] Minor bugfix --- rtgui/prsharpening.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rtgui/prsharpening.cc b/rtgui/prsharpening.cc index 10fc69c10..e9dd6b606 100644 --- a/rtgui/prsharpening.cc +++ b/rtgui/prsharpening.cc @@ -486,13 +486,13 @@ void PrSharpening::setAdjusterBehavior (bool radiusadd, bool amountadd, bool dam void PrSharpening::trimValues (rtengine::procparams::ProcParams* pp) { - radius->trimValue(pp->sharpening.radius); - dradius->trimValue(pp->sharpening.deconvradius); - amount->trimValue(pp->sharpening.amount); - damount->trimValue(pp->sharpening.deconvamount); - ddamping->trimValue(pp->sharpening.deconvdamping); - diter->trimValue(pp->sharpening.deconviter); - eradius->trimValue(pp->sharpening.edges_radius); - etolerance->trimValue(pp->sharpening.edges_tolerance); - hcamount->trimValue(pp->sharpening.halocontrol_amount); + radius->trimValue(pp->prsharpening.radius); + dradius->trimValue(pp->prsharpening.deconvradius); + amount->trimValue(pp->prsharpening.amount); + damount->trimValue(pp->prsharpening.deconvamount); + ddamping->trimValue(pp->prsharpening.deconvdamping); + diter->trimValue(pp->prsharpening.deconviter); + eradius->trimValue(pp->prsharpening.edges_radius); + etolerance->trimValue(pp->prsharpening.edges_tolerance); + hcamount->trimValue(pp->prsharpening.halocontrol_amount); } From e6f1b53142b7f5a53d438c5224e3affed9513c67 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Wed, 30 Aug 2017 21:46:58 +0200 Subject: [PATCH 049/126] Shows the RL Deconv. section when in BatchMode --- rtgui/prsharpening.cc | 1 + rtgui/sharpening.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/rtgui/prsharpening.cc b/rtgui/prsharpening.cc index e9dd6b606..94034b471 100644 --- a/rtgui/prsharpening.cc +++ b/rtgui/prsharpening.cc @@ -455,6 +455,7 @@ void PrSharpening::setBatchMode (bool batchMode) hcbin->pack_start (*hcbox); removeIfThere (edgebin, edgebox, false); edgebin->pack_start (*edgebox); + pack_start (*rld); radius->showEditedCB (); amount->showEditedCB (); diff --git a/rtgui/sharpening.cc b/rtgui/sharpening.cc index c6d7b08c8..9abfc6de8 100644 --- a/rtgui/sharpening.cc +++ b/rtgui/sharpening.cc @@ -449,6 +449,7 @@ void Sharpening::setBatchMode (bool batchMode) hcbin->pack_start (*hcbox); removeIfThere (edgebin, edgebox, false); edgebin->pack_start (*edgebox); + pack_start (*rld); radius->showEditedCB (); amount->showEditedCB (); From 1e36c564a724992e4f6b9435f8a6daf594668497 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 1 Sep 2017 14:59:17 +0200 Subject: [PATCH 050/126] Moved focus mask preview to clipped shadows/highlights section, uses large focus-screem icon, #4027 --- .../actions/previewmodeF-focusScreen-off.png | Bin 0 -> 805 bytes .../actions/previewmodeF-focusScreen-on.png | Bin 0 -> 719 bytes .../actions/previewmodeF-focusScreen-off.png | Bin 0 -> 710 bytes .../actions/previewmodeF-focusScreen-on.png | Bin 0 -> 719 bytes rtgui/cropwindow.cc | 6 +- rtgui/editorpanel.cc | 10 +- rtgui/indclippedpanel.cc | 50 +- rtgui/indclippedpanel.h | 24 +- rtgui/previewmodepanel.cc | 23 - rtgui/previewmodepanel.h | 9 +- .../previewmodeF-focusScreen-off.file | 1 + .../scalable/previewmodeF-focusScreen-off.svg | 630 ++++++++++++++++++ .../scalable/previewmodeF-focusScreen-on.file | 1 + .../scalable/previewmodeF-focusScreen-on.svg | 604 +++++++++++++++++ 14 files changed, 1309 insertions(+), 49 deletions(-) create mode 100644 rtdata/images/Dark/actions/previewmodeF-focusScreen-off.png create mode 100644 rtdata/images/Dark/actions/previewmodeF-focusScreen-on.png create mode 100644 rtdata/images/Light/actions/previewmodeF-focusScreen-off.png create mode 100644 rtdata/images/Light/actions/previewmodeF-focusScreen-on.png create mode 100644 tools/source_icons/scalable/previewmodeF-focusScreen-off.file create mode 100644 tools/source_icons/scalable/previewmodeF-focusScreen-off.svg create mode 100644 tools/source_icons/scalable/previewmodeF-focusScreen-on.file create mode 100644 tools/source_icons/scalable/previewmodeF-focusScreen-on.svg diff --git a/rtdata/images/Dark/actions/previewmodeF-focusScreen-off.png b/rtdata/images/Dark/actions/previewmodeF-focusScreen-off.png new file mode 100644 index 0000000000000000000000000000000000000000..75a285de2017aa00450c9e313c43eeddbf71034d GIT binary patch literal 805 zcmV+=1KRwFP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10-{MoK~y-6wUtdz+dvS8XVyvVII$bY#ZZz`FaeZWD540daO%e; zRsK-_NYCX*RN~lPkhq{ADw9H;77;|L3fU4%&Ihr#hYELNLP;wzr}6B&&%SGoW&!Rf z@HRoAP!Rk5z9vbM1OU+KbULY2s%hJH@4vv7Wo5hF?mQyuLv)NWcHZmt_K%K^=%`?v zot?D^A=7`qOL)Rp$8q)mfbn%<2=oad9h_2&}y~LtJUh>_V)IGLqrTb&wGD- zeB2&zY#7D@0AzV_rBZpkyuAEW6vZ?m5=11DB&BC&W~NQkRCjlG8$3G}i$Sy5`~d(E zx)TIpoQEzhF5WK|i=|;#R}^J(ZEfv!xm;f0>x7U8VGi)SSA!ssc~PlUnrDn%>l#H- z#>d9So&f-^uC7-2HO5%7P$-BYI0ynM3Q$#5kJeJDlwlag3r;f^)m*Vibb&X(e@K#) znV6V(8F9!U5`+*If(ap=sNmw_B5WN=lC)ed_bRG!UDp|6s2hSE$LSJ6Jbra&XXgMB znJ9|)a=Bc2*p0Tfw%$eDdXD4#0RsT|zW<#U*|vSwXf!_O^Z9E|0f5zNwYM7^8wY&R z_x;nWJnUmtRoz%D_J}{sw(XN-GFj7gU604(8e`0NUDw{++H3_O_pUPJkQe@V@Uu2 jL~P5lOmBOd?ks)*h)eUf?RVt`00000NkvXXu0mjfnM`Mh literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/previewmodeF-focusScreen-on.png b/rtdata/images/Dark/actions/previewmodeF-focusScreen-on.png new file mode 100644 index 0000000000000000000000000000000000000000..3d46dedc7f9e22b0c997bb20e40379777486d535 GIT binary patch literal 719 zcmV;=0x=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10!&FnK~y-6wUysa6HySxznQa@wvcEkifCK@WDAjoSc#gDc;kck zU_6Hpz=bBp7?F^)0{ZnW)VXk(+^UZH(CTGt9t|(}j!L7Js zJtvhy+{6I@UE3X>>$FQ$`t@JnOnq%qNfv=#8qkoB6wsEj$=%xQ%j40&3d+_W7KCMP zST_J*tU0LV-jqSmi@^%Y9j>lg!OSSoJ{*U&+0D0pjr}ioKR?d@D--~%!Az!J%=>6T@gQ);0iNTZLs!g~RcgzE~_OHhy0Ht)aRF13aO5ek|u%pF)SR7vPl0y4Z z0SDBFo@mv(SzvMr5=_h+pSX%T&3zMfKJe&djKmD3<$*m zJt>1;gv3rYU+sedz*zG&WNH#=Nx=guB~_8(S_ zdjvfr=oz4Us+PMcW=8q}XX>H>;6~0icoHsu&ymRYwVB z`r?NI7aW_p+M{J_?EENDYhwFHw_m@%{MhtG?$b)jn%ELR0}pyqG@S{%`!TikeNg_; ztEo^bT>CaPkxF(b0RWw(p4@EyJT4V3znZQregha&=;z`DVaEUf002ovPDHLkV1iEX BJd*$b literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/previewmodeF-focusScreen-off.png b/rtdata/images/Light/actions/previewmodeF-focusScreen-off.png new file mode 100644 index 0000000000000000000000000000000000000000..0aa81a7051602e00101014fe2c1a1935e0e2797d GIT binary patch literal 710 zcmV;%0y+JOP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10z*keK~y-6wUy6q(?Af$zi(|4Cs9f^MJ-gNfSaZgK7c@QMsNY~ zLc9oPUV;bU#FYa|q3s4rgi4W07ZsHM-r>;3B#zStq|RwIp84%JquDWVLB{g}YPDK^ zI2`IA2m%1;cDvnDsdUt6H2VJqj-sgA>-Fj+7c=5SM1J)9{q0t(W#>p!bwg*XMx(07;*GSob_{E~P1Wxl*Z!wf1NVyt=wt z$mjF-k!lag6#x%OJ|GzZxayqilKefP(DSN=LgDN2@$nD<{LzOX2tpB2DKWQ2Dd zR-JRj@gNbYJLjgRhU7AUM>uKO^HffuR;%R`uyZcR04!#RT@sPUW1x+UYJvnj!zSiZ zL@EHDoD~BAN-0UeN~!J?RU{c5lA7eRbPP$8A*h#tjWIo?R6CWlb9(z_5qUbJqSq<4 zZDY(|FaX4H{5_R;C?dN6rj(vSUx~=hxHFF9gV8y8APWl%zkJ`nfyut_1NZ=75r75| z184wv3E)ktLf7eZ-i;o}#5jdvxZ!!;#B9!M&bg1xW;5ye#ICT`9%-%1B+LH-6_NdB zv)LH;rMDZbwFlK|^%6-vC-jps=6%{fbJ4G@t?67Yw>fLk12`NE2HSgkdq1=C&;2z; sQIu=9+gd~l06?-+EEer~zorYbKlNJQ5fyalApigX07*qoM6N<$f&lF|=Kufz literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/previewmodeF-focusScreen-on.png b/rtdata/images/Light/actions/previewmodeF-focusScreen-on.png new file mode 100644 index 0000000000000000000000000000000000000000..3d46dedc7f9e22b0c997bb20e40379777486d535 GIT binary patch literal 719 zcmV;=0x=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10!&FnK~y-6wUysa6HySxznQa@wvcEkifCK@WDAjoSc#gDc;kck zU_6Hpz=bBp7?F^)0{ZnW)VXk(+^UZH(CTGt9t|(}j!L7Js zJtvhy+{6I@UE3X>>$FQ$`t@JnOnq%qNfv=#8qkoB6wsEj$=%xQ%j40&3d+_W7KCMP zST_J*tU0LV-jqSmi@^%Y9j>lg!OSSoJ{*U&+0D0pjr}ioKR?d@D--~%!Az!J%=>6T@gQ);0iNTZLs!g~RcgzE~_OHhy0Ht)aRF13aO5ek|u%pF)SR7vPl0y4Z z0SDBFo@mv(SzvMr5=_h+pSX%T&3zMfKJe&djKmD3<$*m zJt>1;gv3rYU+sedz*zG&WNH#=Nx=guB~_8(S_ zdjvfr=oz4Us+PMcW=8q}XX>H>;6~0icoHsu&ymRYwVB z`r?NI7aW_p+M{J_?EENDYhwFHw_m@%{MhtG?$b)jn%ELR0}pyqG@S{%`!TikeNg_; ztEo^bT>CaPkxF(b0RWw(p4@EyJT4V3znZQregha&=;z`DVaEUf002ovPDHLkV1iEX BJd*$b literal 0 HcmV?d00001 diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 5ae65691e..93426a1c6 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -1361,13 +1361,13 @@ void CropWindow::expose (Cairo::RefPtr cr) imgH = cropHandler.cropPixbuf->get_height (); exposeVersion++; - bool showcs = iarea->indClippedPanel->showClippedShadows(); - bool showch = iarea->indClippedPanel->showClippedHighlights(); const bool showR = iarea->previewModePanel->showR(); // will show clipping if R channel is clipped const bool showG = iarea->previewModePanel->showG(); // will show clipping if G channel is clipped const bool showB = iarea->previewModePanel->showB(); // will show clipping if B channel is clipped const bool showL = iarea->previewModePanel->showL(); // will show clipping if L value is clipped - const bool showFocusMask = iarea->previewModePanel->showFocusMask(); + const bool showFocusMask = iarea->indClippedPanel->showFocusMask(); + bool showcs = iarea->indClippedPanel->showClippedShadows(); + bool showch = iarea->indClippedPanel->showClippedHighlights(); // While the Right-side ALT is pressed, auto-enable highlight and shadow clipping indicators // TODO: Add linux/MacOS specific functions for alternative diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 8d2d6251a..aced7faa3 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1539,11 +1539,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) return true; case GDK_KEY_F: //preview mode Focus Mask - iareapanel->imageArea->previewModePanel->toggleFocusMask(); - return true; - - case GDK_KEY_f: - iareapanel->imageArea->zoomPanel->zoomFitClicked(); + iareapanel->imageArea->indClippedPanel->toggleFocusMask(); return true; case GDK_KEY_less: @@ -1554,6 +1550,10 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) iareapanel->imageArea->indClippedPanel->toggleClipped (true); return true; + case GDK_KEY_f: + iareapanel->imageArea->zoomPanel->zoomFitClicked(); + return true; + case GDK_KEY_F5: openThm->openDefaultViewer ((event->state & GDK_SHIFT_MASK) ? 2 : 1); return true; diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index 72180b31a..bc5cecab6 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -24,6 +24,14 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) { + iFon = new RTImage ("previewmodeF-focusScreen-on.png"); + iFoff = new RTImage ("previewmodeF-focusScreen-off.png"); + + previewFocusMask = Gtk::manage (new Gtk::ToggleButton ()); + previewFocusMask->set_relief(Gtk::RELIEF_NONE); + previewFocusMask->set_tooltip_markup (M("MAIN_TOOLTIP_PREVIEWFOCUSMASK")); + previewFocusMask->set_image(*iFoff); + Glib::ustring tt; indclippedh = Gtk::manage (new Gtk::ToggleButton ()); @@ -48,14 +56,17 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) indclippeds->set_tooltip_markup (tt); } + previewFocusMask->set_active (false); indclippedh->set_active (options.showClippedHighlights); indclippeds->set_active (options.showClippedShadows); + pack_start (*previewFocusMask, Gtk::PACK_SHRINK, 0); pack_start (*indclippeds, Gtk::PACK_SHRINK, 0); pack_start (*indclippedh, Gtk::PACK_SHRINK, 0); - indclippedh->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled) ); - indclippeds->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled) ); + connFocusMask = previewFocusMask->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), previewFocusMask) ); + connClippedS = indclippeds->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indclippeds) ); + connClippedH = indclippedh->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indclippedh) ); show_all (); } @@ -70,8 +81,35 @@ void IndicateClippedPanel::toggleClipped (bool highlights) } } -void IndicateClippedPanel::buttonToggled () +void IndicateClippedPanel::toggleFocusMask () { + previewFocusMask->set_active(!previewFocusMask->get_active()); +} + +void IndicateClippedPanel::buttonToggled (Gtk::ToggleButton* tb) +{ + + connFocusMask.block(true); + connClippedS.block(true); + connClippedH.block(true); + + if (tb != previewFocusMask) { + previewFocusMask->set_active(false); + } else { + if (indclippeds->get_active()) { + indclippeds->set_active(false); + } + if (indclippedh->get_active()) { + indclippedh->set_active(false); + } + } + + previewFocusMask->set_image(previewFocusMask->get_active() ? *iFon : *iFoff); + + connFocusMask.block(false); + connClippedS.block(false); + connClippedH.block(false); + imageArea->queue_draw (); // this will redraw the linked Before image area @@ -80,3 +118,9 @@ void IndicateClippedPanel::buttonToggled () imageArea->iLinkedImageArea->queue_draw (); } } + +IndicateClippedPanel::~IndicateClippedPanel () +{ + delete iFon; + delete iFoff; +} diff --git a/rtgui/indclippedpanel.h b/rtgui/indclippedpanel.h index 3a6bc5296..54973e6ba 100644 --- a/rtgui/indclippedpanel.h +++ b/rtgui/indclippedpanel.h @@ -25,24 +25,34 @@ class IndicateClippedPanel : public Gtk::HBox { protected: + Gtk::Image* iFon, *iFoff; + Gtk::ToggleButton* previewFocusMask; Gtk::ToggleButton* indclippedh; Gtk::ToggleButton* indclippeds; ImageArea* imageArea; public: - explicit IndicateClippedPanel (ImageArea* ia); + explicit IndicateClippedPanel(ImageArea* ia); + ~IndicateClippedPanel(); - void buttonToggled (); + void buttonToggled(Gtk::ToggleButton* tb); + void toggleClipped(bool highlights); // inverts a toggle programmatically + void toggleFocusMask(); - void toggleClipped (bool highlights); // inverts a toggle programmatically + sigc::connection connFocusMask, connClippedS, connClippedH; - bool showClippedShadows () + + bool showFocusMask () { - return indclippeds->get_active (); + return previewFocusMask->get_active (); } - bool showClippedHighlights () + bool showClippedShadows() { - return indclippedh->get_active (); + return indclippeds->get_active(); + } + bool showClippedHighlights() + { + return indclippedh->get_active(); } }; diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index 7627b3fde..60b450e4a 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -28,7 +28,6 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) iG = new RTImage ("previewmodeG-on.png"); iB = new RTImage ("previewmodeB-on.png"); iL = new RTImage ("previewmodeL-on.png"); - iF = new RTImage ("previewmodeF-on.png"); iBC0 = new RTImage ("previewmodeBC0-on.png"); iBC1 = new RTImage ("previewmodeBC1-on.png"); iBC2 = new RTImage ("previewmodeBC2-on.png"); @@ -38,7 +37,6 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) igG = new RTImage ("previewmodeG-off.png"); igB = new RTImage ("previewmodeB-off.png"); igL = new RTImage ("previewmodeL-off.png"); - igF = new RTImage ("previewmodeF-off.png"); igBC0 = new RTImage ("previewmodeBC0-off.png"); igBC1 = new RTImage ("previewmodeBC1-off.png"); igBC2 = new RTImage ("previewmodeBC2-off.png"); @@ -84,16 +82,10 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) previewL->set_tooltip_markup (M("MAIN_TOOLTIP_PREVIEWL")); previewL->set_image(*igL); - previewFocusMask = Gtk::manage (new Gtk::ToggleButton ()); - previewFocusMask->set_relief(Gtk::RELIEF_NONE); - previewFocusMask->set_tooltip_markup (M("MAIN_TOOLTIP_PREVIEWFOCUSMASK")); - previewFocusMask->set_image(*igF); - previewR->set_active (false); previewG->set_active (false); previewB->set_active (false); previewL->set_active (false); - previewFocusMask->set_active (false); backColor0->set_active (options.bgcolor == 0); backColor1->set_active (options.bgcolor == 1); @@ -111,13 +103,11 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) pack_start (*previewG, Gtk::PACK_SHRINK, 0); pack_start (*previewB, Gtk::PACK_SHRINK, 0); pack_start (*previewL, Gtk::PACK_SHRINK, 0); - pack_start (*previewFocusMask, Gtk::PACK_SHRINK, 0); connR = previewR->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewR) ); connG = previewG->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewG) ); connB = previewB->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewB) ); connL = previewL->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewL) ); - connFocusMask = previewFocusMask->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled), previewFocusMask) ); connbackColor0 = backColor0->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor0) ); connbackColor1 = backColor1->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &PreviewModePanel::buttonToggled_backColor), backColor1) ); @@ -133,7 +123,6 @@ PreviewModePanel::~PreviewModePanel () delete iG; delete iB; delete iL; - delete iF; delete iBC0; delete iBC1; delete iBC2; @@ -142,7 +131,6 @@ PreviewModePanel::~PreviewModePanel () delete igG; delete igB; delete igL; - delete igF; delete igBC0; delete igBC1; delete igBC2; @@ -165,10 +153,6 @@ void PreviewModePanel::toggleL () { previewL->set_active(!previewL->get_active()); } -void PreviewModePanel::toggleFocusMask () -{ - previewFocusMask->set_active(!previewFocusMask->get_active()); -} void PreviewModePanel::togglebackColor0 () { @@ -194,7 +178,6 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) connG.block(true); connB.block(true); connL.block(true); - connFocusMask.block(true); // control state of the buttons // only 0 or 1 button at a time can remain pressed @@ -214,22 +197,16 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) previewL->set_active(false); } - if (tbpreview != previewFocusMask) { - previewFocusMask->set_active(false); - } - // set image based on button's state previewR->set_image(previewR->get_active() ? *iR : *igR); previewG->set_image(previewG->get_active() ? *iG : *igG); previewB->set_image(previewB->get_active() ? *iB : *igB); previewL->set_image(previewL->get_active() ? *iL : *igL); - previewFocusMask->set_image(previewFocusMask->get_active() ? *iF : *igF); connR.block(false); connG.block(false); connB.block(false); connL.block(false); - connFocusMask.block(false); imageArea->queue_draw (); diff --git a/rtgui/previewmodepanel.h b/rtgui/previewmodepanel.h index 19136d770..1d7b99625 100644 --- a/rtgui/previewmodepanel.h +++ b/rtgui/previewmodepanel.h @@ -30,7 +30,6 @@ protected: Gtk::ToggleButton* previewG; Gtk::ToggleButton* previewB; Gtk::ToggleButton* previewL; - Gtk::ToggleButton* previewFocusMask; Gtk::ToggleButton* backColor0; Gtk::ToggleButton* backColor1; Gtk::ToggleButton* backColor2; @@ -41,7 +40,6 @@ protected: Gtk::Image* iG, *igG; Gtk::Image* iB, *igB; Gtk::Image* iL, *igL; - Gtk::Image* iF, *igF; Gtk::Image* iBC0, *igBC0; Gtk::Image* iBC1, *igBC1; Gtk::Image* iBC2, *igBC2; @@ -55,14 +53,13 @@ public: void toggleG (); void toggleB (); void toggleL (); - void toggleFocusMask (); void togglebackColor0(); void togglebackColor1(); void togglebackColor2(); void togglebackColor3(); void togglebackColor(); - sigc::connection connR, connB, connG, connL, connFocusMask, connbackColor0, connbackColor1, connbackColor2, connbackColor3; + sigc::connection connR, connB, connG, connL, connbackColor0, connbackColor1, connbackColor2, connbackColor3; void buttonToggled(Gtk::ToggleButton* tbpreview); void buttonToggled_backColor(Gtk::ToggleButton* tbbackColor); @@ -83,10 +80,6 @@ public: { return previewL->get_active (); } - bool showFocusMask () - { - return previewFocusMask->get_active (); - } int GetbackColor(); }; diff --git a/tools/source_icons/scalable/previewmodeF-focusScreen-off.file b/tools/source_icons/scalable/previewmodeF-focusScreen-off.file new file mode 100644 index 000000000..f019c1bfb --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-focusScreen-off.file @@ -0,0 +1 @@ +previewmodeF-focusScreen-off.png,w22,actions diff --git a/tools/source_icons/scalable/previewmodeF-focusScreen-off.svg b/tools/source_icons/scalable/previewmodeF-focusScreen-off.svg new file mode 100644 index 000000000..814bc9e93 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-focusScreen-off.svg @@ -0,0 +1,630 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/previewmodeF-focusScreen-on.file b/tools/source_icons/scalable/previewmodeF-focusScreen-on.file new file mode 100644 index 000000000..07dc7c137 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-focusScreen-on.file @@ -0,0 +1 @@ +previewmodeF-focusScreen-on.png,w22,actions diff --git a/tools/source_icons/scalable/previewmodeF-focusScreen-on.svg b/tools/source_icons/scalable/previewmodeF-focusScreen-on.svg new file mode 100644 index 000000000..63b0e4ec8 --- /dev/null +++ b/tools/source_icons/scalable/previewmodeF-focusScreen-on.svg @@ -0,0 +1,604 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + From 64116d88c1743f4de47da2e841c0f136c701d5d6 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 1 Sep 2017 15:05:06 +0200 Subject: [PATCH 051/126] Clipped S/H variable name capitalization change for readability --- rtgui/indclippedpanel.cc | 48 ++++++++++++++++++++-------------------- rtgui/indclippedpanel.h | 8 +++---- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index bc5cecab6..03241f369 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -34,39 +34,39 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) Glib::ustring tt; - indclippedh = Gtk::manage (new Gtk::ToggleButton ()); - indclippedh->set_relief(Gtk::RELIEF_NONE); - indclippedh->add (*Gtk::manage (new RTImage ("warnhl.png"))); - tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_INDCLIPPEDH"), M("MAIN_TOOLTIP_THRESHOLD"), options.highlightThreshold); + indClippedH = Gtk::manage (new Gtk::ToggleButton ()); + indClippedH->set_relief(Gtk::RELIEF_NONE); + indClippedH->add (*Gtk::manage (new RTImage ("warnhl.png"))); + tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_indClippedH"), M("MAIN_TOOLTIP_THRESHOLD"), options.highlightThreshold); if (tt.find("<") == Glib::ustring::npos && tt.find(">") == Glib::ustring::npos) { - indclippedh->set_tooltip_text (tt); + indClippedH->set_tooltip_text (tt); } else { - indclippedh->set_tooltip_markup (tt); + indClippedH->set_tooltip_markup (tt); } - indclippeds = Gtk::manage (new Gtk::ToggleButton ()); - indclippeds->set_relief(Gtk::RELIEF_NONE); - indclippeds->add (*Gtk::manage (new RTImage ("warnsh.png"))); - tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_INDCLIPPEDS"), M("MAIN_TOOLTIP_THRESHOLD"), options.shadowThreshold); + indClippedS = Gtk::manage (new Gtk::ToggleButton ()); + indClippedS->set_relief(Gtk::RELIEF_NONE); + indClippedS->add (*Gtk::manage (new RTImage ("warnsh.png"))); + tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_indClippedS"), M("MAIN_TOOLTIP_THRESHOLD"), options.shadowThreshold); if (tt.find("<") == Glib::ustring::npos && tt.find(">") == Glib::ustring::npos) { - indclippeds->set_tooltip_text (tt); + indClippedS->set_tooltip_text (tt); } else { - indclippeds->set_tooltip_markup (tt); + indClippedS->set_tooltip_markup (tt); } previewFocusMask->set_active (false); - indclippedh->set_active (options.showClippedHighlights); - indclippeds->set_active (options.showClippedShadows); + indClippedH->set_active (options.showClippedHighlights); + indClippedS->set_active (options.showClippedShadows); pack_start (*previewFocusMask, Gtk::PACK_SHRINK, 0); - pack_start (*indclippeds, Gtk::PACK_SHRINK, 0); - pack_start (*indclippedh, Gtk::PACK_SHRINK, 0); + pack_start (*indClippedS, Gtk::PACK_SHRINK, 0); + pack_start (*indClippedH, Gtk::PACK_SHRINK, 0); connFocusMask = previewFocusMask->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), previewFocusMask) ); - connClippedS = indclippeds->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indclippeds) ); - connClippedH = indclippedh->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indclippedh) ); + connClippedS = indClippedS->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indClippedS) ); + connClippedH = indClippedH->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled), indClippedH) ); show_all (); } @@ -75,9 +75,9 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) void IndicateClippedPanel::toggleClipped (bool highlights) { if (highlights) { - indclippedh->set_active(!indclippedh->get_active()); + indClippedH->set_active(!indClippedH->get_active()); } else { - indclippeds->set_active(!indclippeds->get_active()); + indClippedS->set_active(!indClippedS->get_active()); } } @@ -96,11 +96,11 @@ void IndicateClippedPanel::buttonToggled (Gtk::ToggleButton* tb) if (tb != previewFocusMask) { previewFocusMask->set_active(false); } else { - if (indclippeds->get_active()) { - indclippeds->set_active(false); + if (indClippedS->get_active()) { + indClippedS->set_active(false); } - if (indclippedh->get_active()) { - indclippedh->set_active(false); + if (indClippedH->get_active()) { + indClippedH->set_active(false); } } diff --git a/rtgui/indclippedpanel.h b/rtgui/indclippedpanel.h index 54973e6ba..1da4b61de 100644 --- a/rtgui/indclippedpanel.h +++ b/rtgui/indclippedpanel.h @@ -27,8 +27,8 @@ class IndicateClippedPanel : public Gtk::HBox protected: Gtk::Image* iFon, *iFoff; Gtk::ToggleButton* previewFocusMask; - Gtk::ToggleButton* indclippedh; - Gtk::ToggleButton* indclippeds; + Gtk::ToggleButton* indClippedH; + Gtk::ToggleButton* indClippedS; ImageArea* imageArea; public: @@ -48,11 +48,11 @@ public: } bool showClippedShadows() { - return indclippeds->get_active(); + return indClippedS->get_active(); } bool showClippedHighlights() { - return indclippedh->get_active(); + return indClippedH->get_active(); } }; From f5628dd5b36f318b5526b9d45785c178dd442659 Mon Sep 17 00:00:00 2001 From: Daniel Lichtenberger Date: Fri, 1 Sep 2017 20:01:28 +0200 Subject: [PATCH 052/126] Fix crash on empty command line arguments --- rtgui/main-cli.cc | 6 ++++-- rtgui/main.cc | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 7908b9133..36ef4ce8b 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -285,8 +285,7 @@ bool dontLoadCache ( int argc, char **argv ) #if ECLIPSE_ARGS currParam = currParam.substr (1, currParam.length() - 2); #endif - - if ( currParam.at (0) == '-' && currParam.at (1) == 'q' ) { + if ( currParam.length() > 1 && currParam.at(0) == '-' && currParam.at(1) == 'q' ) { return true; } } @@ -317,6 +316,9 @@ int processLineParams ( int argc, char **argv ) for ( int iArg = 1; iArg < argc; iArg++) { Glib::ustring currParam (argv[iArg]); + if ( currParam.empty() ) { + continue; + } #if ECLIPSE_ARGS currParam = currParam.substr (1, currParam.length() - 2); #endif diff --git a/rtgui/main.cc b/rtgui/main.cc index f133c1e07..3ebd894df 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -122,6 +122,9 @@ int processLineParams ( int argc, char **argv ) { for ( int iArg = 1; iArg < argc; iArg++) { Glib::ustring currParam (argv[iArg]); + if ( currParam.empty() ) { + continue; + } #if ECLIPSE_ARGS currParam = currParam.substr (1, currParam.length() - 2); #endif @@ -697,4 +700,3 @@ int main (int argc, char **argv) return ret; } - From bfe24ab1950037369b4d71dabc19c5451c457cd3 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sat, 2 Sep 2017 18:21:12 +0200 Subject: [PATCH 053/126] BatchToolPanelCoordinator::initSession fixed (issue #4014) --- rtgui/batchtoolpanelcoord.cc | 21 ++++------ rtgui/paramsedited.cc | 80 ++++++++++++++++++------------------ rtgui/toolpanelcoord.cc | 2 +- 3 files changed, 50 insertions(+), 53 deletions(-) diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index db858bdbc..be092fbfb 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -248,13 +248,13 @@ void BatchToolPanelCoordinator::initSession () pparams.prsharpening.radius = pparams.prsharpening.deconvradius = pparams.prsharpening.edges_radius = 0; } if (options.baBehav[ADDSET_SHARP_AMOUNT]) { - pparams.sharpening.amount = pparams.sharpening.deconvamount = 0; + pparams.sharpening.amount = pparams.sharpening.deconvamount = pparams.prsharpening.amount = pparams.prsharpening.deconvamount = 0; } - if (options.baBehav[ADDSET_SHARP_DAMPING]) { pparams.sharpening.deconvdamping = 0; pparams.prsharpening.deconvdamping = 0; } - if (options.baBehav[ADDSET_SHARP_ITER]) { pparams.sharpening.deconviter = 0; pparams.prsharpening.deconviter = 0; } - if (options.baBehav[ADDSET_SHARP_EDGETOL]) { pparams.sharpening.edges_tolerance = 0; pparams.prsharpening.edges_tolerance = 0; } - if (options.baBehav[ADDSET_SHARP_HALOCTRL]) { pparams.sharpening.halocontrol_amount = 0; pparams.prsharpening.halocontrol_amount = 0; } + if (options.baBehav[ADDSET_SHARP_DAMPING]) { pparams.sharpening.deconvdamping = pparams.prsharpening.deconvdamping = 0; } + if (options.baBehav[ADDSET_SHARP_ITER]) { pparams.sharpening.deconviter = pparams.prsharpening.deconviter = 0; } + if (options.baBehav[ADDSET_SHARP_EDGETOL]) { pparams.sharpening.edges_tolerance = pparams.prsharpening.edges_tolerance = 0; } + if (options.baBehav[ADDSET_SHARP_HALOCTRL]) { pparams.sharpening.halocontrol_amount = pparams.prsharpening.halocontrol_amount = 0; } if (options.baBehav[ADDSET_SHARPENEDGE_AMOUNT]) { pparams.sharpenEdge.amount = 0; } if (options.baBehav[ADDSET_SHARPENMICRO_AMOUNT]) { pparams.sharpenMicro.amount = 0; } if (options.baBehav[ADDSET_SHARPENEDGE_PASS]) { pparams.sharpenEdge.passes = 0; } @@ -309,18 +309,15 @@ void BatchToolPanelCoordinator::initSession () if (options.baBehav[ADDSET_GRADIENT_DEGREE]) { pparams.gradient.degree = 0; } if (options.baBehav[ADDSET_GRADIENT_FEATHER]) { pparams.gradient.feather = 0; } if (options.baBehav[ADDSET_GRADIENT_STRENGTH]) { pparams.gradient.strength = 0; } - if (options.baBehav[ADDSET_GRADIENT_CENTER]) { pparams.gradient.centerX = 0; } - if (options.baBehav[ADDSET_GRADIENT_CENTER]) { pparams.gradient.centerY = 0; } + if (options.baBehav[ADDSET_GRADIENT_CENTER]) { pparams.gradient.centerX = pparams.gradient.centerY = 0; } if (options.baBehav[ADDSET_PCVIGNETTE_STRENGTH]) { pparams.pcvignette.strength = 0; } if (options.baBehav[ADDSET_PCVIGNETTE_FEATHER]) { pparams.pcvignette.feather = 0; } if (options.baBehav[ADDSET_PCVIGNETTE_ROUNDNESS]) { pparams.pcvignette.roundness = 0; } - if (options.baBehav[ADDSET_CA]) { pparams.cacorrection.red = 0; } - if (options.baBehav[ADDSET_CA]) { pparams.cacorrection.blue = 0; } + if (options.baBehav[ADDSET_CA]) { pparams.cacorrection.red = pparams.cacorrection.blue = 0; } if (options.baBehav[ADDSET_VIGN_AMOUNT]) { pparams.vignetting.amount = 0; } if (options.baBehav[ADDSET_VIGN_RADIUS]) { pparams.vignetting.radius = 0; } if (options.baBehav[ADDSET_VIGN_STRENGTH]) { pparams.vignetting.strength = 0; } - if (options.baBehav[ADDSET_VIGN_CENTER]) { pparams.vignetting.centerX = 0; } - if (options.baBehav[ADDSET_VIGN_CENTER]) { pparams.vignetting.centerY = 0; } + if (options.baBehav[ADDSET_VIGN_CENTER]) { pparams.vignetting.centerX = pparams.vignetting.centerY = 0; } if (options.baBehav[ADDSET_DIRPYREQ]) for (int i = 0; i < 6; i++) { pparams.dirpyrequalizer.mult[i] = 0; } if (options.baBehav[ADDSET_DIRPYREQ_THRESHOLD]) { pparams.dirpyrequalizer.threshold = 0; } if (options.baBehav[ADDSET_DIRPYREQ_SKINPROTECT]) { pparams.dirpyrequalizer.skinprotect = 0; } @@ -361,7 +358,7 @@ void BatchToolPanelCoordinator::initSession () if (options.baBehav[ADDSET_RAWEXPOS_LINEAR]) { pparams.raw.expos = 0; } if (options.baBehav[ADDSET_RAWEXPOS_PRESER]) { pparams.raw.preser = 0; } if (options.baBehav[ADDSET_RAWEXPOS_BLACKS]) { - pparams.raw.bayersensor.black0 = pparams.raw.bayersensor.black1 = pparams.raw.bayersensor.black2 = pparams.raw.bayersensor.black3 = 0; + pparams.raw.bayersensor.black0 = pparams.raw.bayersensor.black1 = pparams.raw.bayersensor.black2 = pparams.raw.bayersensor.black3 = pparams.raw.xtranssensor.blackred = pparams.raw.xtranssensor.blackgreen = pparams.raw.xtranssensor.blackblue = 0; } if (options.baBehav[ADDSET_RAWFFCLIPCONTROL]) { pparams.raw.ff_clipControl = 0; } diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index ea9248ddc..adff63e45 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1318,7 +1318,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (labCurve.contrast) { - toEdit.labCurve.contrast = dontforceSet && options.baBehav[ADDSET_LC_CONTRAST] ? toEdit.labCurve.contrast + mods.labCurve.contrast : mods.labCurve.contrast; + toEdit.labCurve.contrast = dontforceSet && options.baBehav[ADDSET_LC_CONTRAST] ? toEdit.labCurve.contrast + mods.labCurve.contrast : mods.labCurve.contrast; } if (labCurve.chromaticity) { @@ -1326,15 +1326,15 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (labCurve.avoidcolorshift) { - toEdit.labCurve.avoidcolorshift = mods.labCurve.avoidcolorshift; + toEdit.labCurve.avoidcolorshift = mods.labCurve.avoidcolorshift; } if (labCurve.rstprotection) { - toEdit.labCurve.rstprotection = mods.labCurve.rstprotection; + toEdit.labCurve.rstprotection = mods.labCurve.rstprotection; } if (labCurve.lcredsk) { - toEdit.labCurve.lcredsk = mods.labCurve.lcredsk; + toEdit.labCurve.lcredsk = mods.labCurve.lcredsk; } if (rgbCurves.lumamode) { @@ -1354,11 +1354,11 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (colorToning.enabled) { - toEdit.colorToning.enabled = mods.colorToning.enabled; + toEdit.colorToning.enabled = mods.colorToning.enabled; } if (colorToning.twocolor) { - toEdit.colorToning.twocolor = mods.colorToning.twocolor; + toEdit.colorToning.twocolor = mods.colorToning.twocolor; } if (colorToning.opacityCurve) { @@ -1382,19 +1382,19 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (colorToning.autosat) { - toEdit.colorToning.autosat = mods.colorToning.autosat; + toEdit.colorToning.autosat = mods.colorToning.autosat; } if (colorToning.saturatedopacity) { - toEdit.colorToning.saturatedOpacity = dontforceSet && options.baBehav[ADDSET_COLORTONING_SATOPACITY] ? toEdit.colorToning.saturatedOpacity + mods.colorToning.saturatedOpacity : mods.colorToning.saturatedOpacity; + toEdit.colorToning.saturatedOpacity = dontforceSet && options.baBehav[ADDSET_COLORTONING_SATOPACITY] ? toEdit.colorToning.saturatedOpacity + mods.colorToning.saturatedOpacity : mods.colorToning.saturatedOpacity; } if (colorToning.strength) { - toEdit.colorToning.strength = dontforceSet && options.baBehav[ADDSET_COLORTONING_STRENGTH] ? toEdit.colorToning.strength + mods.colorToning.strength : mods.colorToning.strength; + toEdit.colorToning.strength = dontforceSet && options.baBehav[ADDSET_COLORTONING_STRENGTH] ? toEdit.colorToning.strength + mods.colorToning.strength : mods.colorToning.strength; } if (colorToning.shadowsColSat) { - toEdit.colorToning.shadowsColSat = mods.colorToning.shadowsColSat; + toEdit.colorToning.shadowsColSat = mods.colorToning.shadowsColSat; } if (colorToning.hlColSat) { @@ -1502,7 +1502,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (sharpening.radius) { - toEdit.sharpening.radius = mods.sharpening.radius; + toEdit.sharpening.radius = dontforceSet && options.baBehav[ADDSET_SHARP_RADIUS] ? toEdit.sharpening.radius + mods.sharpening.radius : mods.sharpening.radius; } if (sharpening.amount) { @@ -1518,19 +1518,19 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (sharpening.edges_radius) { - toEdit.sharpening.edges_radius = mods.sharpening.edges_radius; + toEdit.sharpening.edges_radius = dontforceSet && options.baBehav[ADDSET_SHARP_RADIUS] ? toEdit.sharpening.edges_radius + mods.sharpening.edges_radius: mods.sharpening.edges_radius; } if (sharpening.edges_tolerance) { - toEdit.sharpening.edges_tolerance = mods.sharpening.edges_tolerance; + toEdit.sharpening.edges_tolerance = dontforceSet && options.baBehav[ADDSET_SHARP_EDGETOL] ? toEdit.sharpening.edges_tolerance + mods.sharpening.edges_tolerance : mods.sharpening.edges_tolerance; } if (sharpening.halocontrol) { - toEdit.sharpening.halocontrol = mods.sharpening.halocontrol; + toEdit.sharpening.halocontrol = mods.sharpening.halocontrol; } if (sharpening.halocontrol_amount) { - toEdit.sharpening.halocontrol_amount = mods.sharpening.halocontrol_amount; + toEdit.sharpening.halocontrol_amount = dontforceSet && options.baBehav[ADDSET_SHARP_HALOCTRL] ? toEdit.sharpening.halocontrol_amount + mods.sharpening.halocontrol_amount : mods.sharpening.halocontrol_amount; } if (sharpening.method) { @@ -1538,19 +1538,19 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (sharpening.deconvamount) { - toEdit.sharpening.deconvamount = dontforceSet && options.baBehav[ADDSET_SHARP_AMOUNT] ? toEdit.sharpening.deconvamount + mods.sharpening.deconvamount : mods.sharpening.deconvamount; + toEdit.sharpening.deconvamount = dontforceSet && options.baBehav[ADDSET_SHARP_AMOUNT] ? toEdit.sharpening.deconvamount + mods.sharpening.deconvamount : mods.sharpening.deconvamount; } if (sharpening.deconvradius) { - toEdit.sharpening.deconvradius = mods.sharpening.deconvradius; + toEdit.sharpening.deconvradius = dontforceSet && options.baBehav[ADDSET_SHARP_RADIUS] ? toEdit.sharpening.deconvradius + mods.sharpening.deconvradius : mods.sharpening.deconvradius; } if (sharpening.deconviter) { - toEdit.sharpening.deconviter = mods.sharpening.deconviter; + toEdit.sharpening.deconviter = dontforceSet && options.baBehav[ADDSET_SHARP_ITER] ? toEdit.sharpening.deconviter + mods.sharpening.deconviter : mods.sharpening.deconviter; } if (sharpening.deconvdamping) { - toEdit.sharpening.deconvdamping = mods.sharpening.deconvdamping; + toEdit.sharpening.deconvdamping = dontforceSet && options.baBehav[ADDSET_SHARP_DAMPING] ? toEdit.sharpening.deconvdamping + mods.sharpening.deconvdamping : mods.sharpening.deconvdamping; } if (prsharpening.enabled) { @@ -1558,7 +1558,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (prsharpening.radius) { - toEdit.prsharpening.radius = mods.prsharpening.radius; + toEdit.prsharpening.radius = dontforceSet && options.baBehav[ADDSET_SHARP_RADIUS] ? toEdit.prsharpening.radius + mods.prsharpening.radius : mods.prsharpening.radius; } if (prsharpening.amount) { @@ -1574,11 +1574,11 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (prsharpening.edges_radius) { - toEdit.prsharpening.edges_radius = mods.prsharpening.edges_radius; + toEdit.prsharpening.edges_radius = dontforceSet && options.baBehav[ADDSET_SHARP_RADIUS] ? toEdit.prsharpening.edges_radius + mods.prsharpening.edges_radius : mods.prsharpening.edges_radius; } if (prsharpening.edges_tolerance) { - toEdit.prsharpening.edges_tolerance = mods.prsharpening.edges_tolerance; + toEdit.prsharpening.edges_tolerance = dontforceSet && options.baBehav[ADDSET_SHARP_EDGETOL] ? toEdit.prsharpening.edges_tolerance + mods.prsharpening.edges_tolerance : mods.prsharpening.edges_tolerance; } if (prsharpening.halocontrol) { @@ -1586,7 +1586,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (prsharpening.halocontrol_amount) { - toEdit.prsharpening.halocontrol_amount = mods.prsharpening.halocontrol_amount; + toEdit.prsharpening.halocontrol_amount = dontforceSet && options.baBehav[ADDSET_SHARP_HALOCTRL] ? toEdit.prsharpening.halocontrol_amount + mods.prsharpening.halocontrol_amount : mods.prsharpening.halocontrol_amount; } if (prsharpening.method) { @@ -1598,15 +1598,15 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (prsharpening.deconvradius) { - toEdit.prsharpening.deconvradius = mods.prsharpening.deconvradius; + toEdit.prsharpening.deconvradius = dontforceSet && options.baBehav[ADDSET_SHARP_RADIUS] ? toEdit.prsharpening.deconvradius + mods.prsharpening.deconvradius : mods.prsharpening.deconvradius; } if (prsharpening.deconviter) { - toEdit.prsharpening.deconviter = mods.prsharpening.deconviter; + toEdit.prsharpening.deconviter = dontforceSet && options.baBehav[ADDSET_SHARP_ITER] ? toEdit.prsharpening.deconviter + mods.prsharpening.deconviter : mods.prsharpening.deconviter; } if (prsharpening.deconvdamping) { - toEdit.prsharpening.deconvdamping = mods.prsharpening.deconvdamping; + toEdit.prsharpening.deconvdamping = dontforceSet && options.baBehav[ADDSET_SHARP_DAMPING] ? toEdit.prsharpening.deconvdamping + mods.prsharpening.deconvdamping : mods.prsharpening.deconvdamping; } if (vibrance.enabled) { @@ -1746,7 +1746,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (colorappearance.adapscen) { - toEdit.colorappearance.adapscen = mods.colorappearance.adapscen; + toEdit.colorappearance.adapscen = dontforceSet && options.baBehav[ADDSET_CAT_ADAPTSCENE] ? toEdit.colorappearance.adapscen + mods.colorappearance.adapscen : mods.colorappearance.adapscen; } if (colorappearance.autoybscen) { @@ -2081,23 +2081,23 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (gradient.degree) { - toEdit.gradient.degree = dontforceSet && options.baBehav[ADDSET_GRADIENT_DEGREE] ? toEdit.gradient.degree + mods.gradient.degree : mods.gradient.degree; + toEdit.gradient.degree = dontforceSet && options.baBehav[ADDSET_GRADIENT_DEGREE] ? toEdit.gradient.degree + mods.gradient.degree : mods.gradient.degree; } if (gradient.feather) { - toEdit.gradient.feather = mods.gradient.feather; + toEdit.gradient.feather = dontforceSet && options.baBehav[ADDSET_GRADIENT_FEATHER] ? toEdit.gradient.feather + mods.gradient.feather : mods.gradient.feather; } if (gradient.strength) { - toEdit.gradient.strength = mods.gradient.strength; + toEdit.gradient.strength = dontforceSet && options.baBehav[ADDSET_GRADIENT_STRENGTH] ? toEdit.gradient.strength + mods.gradient.strength : mods.gradient.strength; } if (gradient.centerX) { - toEdit.gradient.centerX = mods.gradient.centerX; + toEdit.gradient.centerX = dontforceSet && options.baBehav[ADDSET_GRADIENT_CENTER] ? toEdit.gradient.centerX + mods.gradient.centerX : mods.gradient.centerX; } if (gradient.centerY) { - toEdit.gradient.centerY = mods.gradient.centerY; + toEdit.gradient.centerY = dontforceSet && options.baBehav[ADDSET_GRADIENT_CENTER] ? toEdit.gradient.centerY + mods.gradient.centerY : mods.gradient.centerY; } if (pcvignette.enabled) { @@ -2105,15 +2105,15 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (pcvignette.strength) { - toEdit.pcvignette.strength = mods.pcvignette.strength; + toEdit.pcvignette.strength = dontforceSet && options.baBehav[ADDSET_PCVIGNETTE_STRENGTH] ? toEdit.pcvignette.strength + mods.pcvignette.strength : mods.pcvignette.strength; } if (pcvignette.feather) { - toEdit.pcvignette.feather = mods.pcvignette.feather; + toEdit.pcvignette.feather = dontforceSet && options.baBehav[ADDSET_PCVIGNETTE_FEATHER] ? toEdit.pcvignette.feather + mods.pcvignette.feather : mods.pcvignette.feather; } if (pcvignette.roundness) { - toEdit.pcvignette.roundness = mods.pcvignette.roundness; + toEdit.pcvignette.roundness = dontforceSet && options.baBehav[ADDSET_PCVIGNETTE_ROUNDNESS] ? toEdit.pcvignette.roundness + mods.pcvignette.roundness : mods.pcvignette.roundness; } if (cacorrection.red) { @@ -2129,19 +2129,19 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (vignetting.radius) { - toEdit.vignetting.radius = mods.vignetting.radius; + toEdit.vignetting.radius = dontforceSet && options.baBehav[ADDSET_VIGN_RADIUS] ? toEdit.vignetting.radius + mods.vignetting.radius : mods.vignetting.radius; } if (vignetting.strength) { - toEdit.vignetting.strength = mods.vignetting.strength; + toEdit.vignetting.strength = dontforceSet && options.baBehav[ADDSET_VIGN_STRENGTH] ? toEdit.vignetting.strength + mods.vignetting.strength : mods.vignetting.strength; } if (vignetting.centerX) { - toEdit.vignetting.centerX = mods.vignetting.centerX; + toEdit.vignetting.centerX = dontforceSet && options.baBehav[ADDSET_VIGN_CENTER] ? toEdit.vignetting.centerX + mods.vignetting.centerX : mods.vignetting.centerX; } if (vignetting.centerY) { - toEdit.vignetting.centerY = mods.vignetting.centerY; + toEdit.vignetting.centerY = dontforceSet && options.baBehav[ADDSET_VIGN_CENTER] ? toEdit.vignetting.centerY + mods.vignetting.centerY : mods.vignetting.centerY; } for (int i = 0; i < 3; i++) { @@ -2251,7 +2251,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten } if (resize.scale) { - toEdit.resize.scale = mods.resize.scale; + toEdit.resize.scale = dontforceSet && options.baBehav[ADDSET_RESIZE_SCALE] ? toEdit.resize.scale + mods.resize.scale : mods.resize.scale; } if (resize.appliesTo) { diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index e30309fdf..d2c0fba2d 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -60,7 +60,7 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false colorappearance = Gtk::manage (new ColorAppearance ()); whitebalance = Gtk::manage (new WhiteBalance ()); vignetting = Gtk::manage (new Vignetting ()); - retinex = Gtk::manage (new Retinex ()); + retinex = Gtk::manage (new Retinex ()); gradient = Gtk::manage (new Gradient ()); pcvignette = Gtk::manage (new PCVignette ()); perspective = Gtk::manage (new PerspCorrection ()); From 71d4393384e97ecb1b1c5bfebb306fe73384a69e Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 2 Sep 2017 20:46:30 +0200 Subject: [PATCH 054/126] Reverted unintentional language string caps change --- rtgui/indclippedpanel.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index 03241f369..ae7cff644 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -37,7 +37,7 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) indClippedH = Gtk::manage (new Gtk::ToggleButton ()); indClippedH->set_relief(Gtk::RELIEF_NONE); indClippedH->add (*Gtk::manage (new RTImage ("warnhl.png"))); - tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_indClippedH"), M("MAIN_TOOLTIP_THRESHOLD"), options.highlightThreshold); + tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_INDCLIPPEDH"), M("MAIN_TOOLTIP_THRESHOLD"), options.highlightThreshold); if (tt.find("<") == Glib::ustring::npos && tt.find(">") == Glib::ustring::npos) { indClippedH->set_tooltip_text (tt); @@ -48,7 +48,7 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) indClippedS = Gtk::manage (new Gtk::ToggleButton ()); indClippedS->set_relief(Gtk::RELIEF_NONE); indClippedS->add (*Gtk::manage (new RTImage ("warnsh.png"))); - tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_indClippedS"), M("MAIN_TOOLTIP_THRESHOLD"), options.shadowThreshold); + tt = Glib::ustring::compose("%1\n%2 = %3", M("MAIN_TOOLTIP_INDCLIPPEDS"), M("MAIN_TOOLTIP_THRESHOLD"), options.shadowThreshold); if (tt.find("<") == Glib::ustring::npos && tt.find(">") == Glib::ustring::npos) { indClippedS->set_tooltip_text (tt); From 46ca336cb3919e0d89c7cb360de0013a8d12a5a7 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sat, 2 Sep 2017 21:29:32 +0200 Subject: [PATCH 055/126] Fix needed after merging dev into bgcolor-h --- rtgui/editorpanel.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 71d0729e6..f1835be89 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1581,11 +1581,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) return true; case GDK_KEY_F: //preview mode Focus Mask - iareapanel->imageArea->previewModePanel->toggleFocusMask(); - return true; - - case GDK_KEY_f: - iareapanel->imageArea->zoomPanel->zoomFitClicked(); + iareapanel->imageArea->indClippedPanel->toggleFocusMask(); return true; case GDK_KEY_less: @@ -1596,6 +1592,10 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) iareapanel->imageArea->indClippedPanel->toggleClipped (true); return true; + case GDK_KEY_f: + iareapanel->imageArea->zoomPanel->zoomFitClicked(); + return true; + case GDK_KEY_F5: openThm->openDefaultViewer ((event->state & GDK_SHIFT_MASK) ? 2 : 1); return true; From a2467deddbc4f30da022b6f5ee940030620ac77b Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sun, 3 Sep 2017 01:35:40 +0200 Subject: [PATCH 056/126] Update TooWaBlue v2.56 Toggle button fix --- rtdata/themes/TooWaBlue-GTK3-20_.css | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 5006d1715..42488b977 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2017 TooWaBoo - Version 2.55 - requires RT 5.0 (Gtk+ >= 3.20) + Version 2.56 - requires RT 5.0 (Gtk+ >= 3.20) RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1035,16 +1035,12 @@ window.csd:not(.fullscreen) #MainNotebook > header.top { margin-right: 0; } -#EditorTopPanel > box:nth-child(9) > button.image-button:not(:last-child) { +#EditorTopPanel > box:nth-child(9) > button.image-button { min-width: 0; padding-left: 0.25em; padding-right: 0.25em; } -#EditorTopPanel > box:nth-child(9) > button.image-button:last-child { - -gtk-icon-shadow: none; -} - /*Button editor bottom*/ #EditorZoomPanel label { min-width: 4em; @@ -1841,5 +1837,4 @@ headerbar:backdrop { headerbar .title:backdrop { color: alpha(@winTitle,.60); } -/**/ /*** end ***************************************************************************************/ From d434a09055bc052715a9ccc72832916efcf7bac7 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 3 Sep 2017 17:00:31 +0200 Subject: [PATCH 057/126] Commented crop ratios --- rtgui/crop.cc | 54 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 4b9e22fd2..bc40f3bb7 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -150,59 +150,59 @@ Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), *****************/ int NumberOfCropRatios = 26; //!!! change this value when adding new crop ratios cropratio.resize (NumberOfCropRatios); - + // Landscape Portrait cropratio[0].label = "3:2"; - cropratio[0].value = 3.0 / 2.0; + cropratio[0].value = 3.0 / 2.0; // 1.5 0.666... cropratio[1].label = "4:3"; - cropratio[1].value = 4.0 / 3.0; + cropratio[1].value = 4.0 / 3.0; // 1.333... 0.75 cropratio[2].label = "16:9"; - cropratio[2].value = 16.0 / 9.0; + cropratio[2].value = 16.0 / 9.0; // 1.777... 0.5625 cropratio[3].label = "16:10"; - cropratio[3].value = 16.0 / 10.0; + cropratio[3].value = 16.0 / 10.0; // 1.6 0.625 cropratio[4].label = "1:1"; - cropratio[4].value = 1.0 / 1.0; + cropratio[4].value = 1.0 / 1.0; // 1 1 cropratio[5].label = "2:1"; - cropratio[5].value = 2.0 / 1.0; + cropratio[5].value = 2.0 / 1.0; // 2 0.5 cropratio[6].label = "3:1"; - cropratio[6].value = 3.0 / 1.0; + cropratio[6].value = 3.0 / 1.0; // 3 0.333... cropratio[7].label = "4:1"; - cropratio[7].value = 4.0 / 1.0; + cropratio[7].value = 4.0 / 1.0; // 4 0.25 cropratio[8].label = "5:1"; - cropratio[8].value = 5.0 / 1.0; + cropratio[8].value = 5.0 / 1.0; // 5 0.2 cropratio[9].label = "6:1"; - cropratio[9].value = 6.0 / 1.0; + cropratio[9].value = 6.0 / 1.0; // 6 0.1666... cropratio[10].label = "7:1"; - cropratio[10].value = 7.0 / 1.0; + cropratio[10].value = 7.0 / 1.0; // 7 0.142 cropratio[11].label = "4:5"; - cropratio[11].value = 4.0 / 5.0; + cropratio[11].value = 4.0 / 5.0; // 1.25 0.8 cropratio[12].label = "5:7"; - cropratio[12].value = 5.0 / 7.0; + cropratio[12].value = 5.0 / 7.0; // 1.4 0.714... cropratio[13].label = "6:7"; - cropratio[13].value = 6.0 / 7.0; + cropratio[13].value = 6.0 / 7.0; // 1,166... 0.857... cropratio[14].label = "6:17"; - cropratio[14].value = 6.0 / 17.0; + cropratio[14].value = 6.0 / 17.0; // 2.833... 0.352... cropratio[15].label = "24:65 - XPAN"; - cropratio[15].value = 24.0 / 65.0; + cropratio[15].value = 24.0 / 65.0; // 2.708... 0.369... cropratio[16].label = "1.414 - DIN EN ISO 216"; - cropratio[16].value = 1.414; + cropratio[16].value = 1.414; // 1.414 0.707... cropratio[17].label = "3.5:5"; - cropratio[17].value = 3.5 / 5.0; + cropratio[17].value = 3.5 / 5.0; // 1.428 0.7 cropratio[18].label = "8.5:11 - US Letter"; - cropratio[18].value = 8.5 / 11.0; + cropratio[18].value = 8.5 / 11.0; // 1.294 0.772... cropratio[19].label = "9.5:12"; - cropratio[19].value = 9.5 / 12.0; + cropratio[19].value = 9.5 / 12.0; // 1.263 0.791... cropratio[20].label = "10:12"; - cropratio[20].value = 10.0 / 12.0; + cropratio[20].value = 10.0 / 12.0; // 1.2 0.833... cropratio[21].label = "11:14"; - cropratio[21].value = 11.0 / 14.0; + cropratio[21].value = 11.0 / 14.0; // 1.272... 0.785 cropratio[22].label = "11:17 - Tabloid"; - cropratio[22].value = 11.0 / 17.0; + cropratio[22].value = 11.0 / 17.0; // 1.545... 0.647... cropratio[23].label = "13:19"; - cropratio[23].value = 13.0 / 19.0; + cropratio[23].value = 13.0 / 19.0; // 1.461... 0.684 cropratio[24].label = "17:22"; - cropratio[24].value = 17.0 / 22.0; + cropratio[24].value = 17.0 / 22.0; // 1.294 0.772... cropratio[25].label = "45:35 - ePassport"; - cropratio[25].value = 45.0 / 35.0; + cropratio[25].value = 45.0 / 35.0; // 1.285 0.777... From 5e400492972f5bfa7c9515c14c2e84e46c3f8d48 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 3 Sep 2017 17:18:34 +0200 Subject: [PATCH 058/126] Added new crop ratio 64:27, #4053 --- rtgui/crop.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtgui/crop.cc b/rtgui/crop.cc index bc40f3bb7..5dc5c10d4 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -148,7 +148,7 @@ Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), /**************** * Crop Ratio *****************/ - int NumberOfCropRatios = 26; //!!! change this value when adding new crop ratios + int NumberOfCropRatios = 27; //!!! change this value when adding new crop ratios cropratio.resize (NumberOfCropRatios); // Landscape Portrait cropratio[0].label = "3:2"; @@ -203,8 +203,8 @@ Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), cropratio[24].value = 17.0 / 22.0; // 1.294 0.772... cropratio[25].label = "45:35 - ePassport"; cropratio[25].value = 45.0 / 35.0; // 1.285 0.777... - - + cropratio[26].label = "64:27"; + cropratio[26].value = 64.0 / 27.0; // 2.370... 0.421... // populate the combobox for (int i = 0; i < NumberOfCropRatios; i++) { From 2c257d22150d287fc45ca819f06f0a6aecc6a346 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 3 Sep 2017 20:48:49 +0200 Subject: [PATCH 059/126] started refactoring ImProcFunctions::transform in preparation for lensfun integration --- rtengine/improcfun.h | 8 +- rtengine/iptransform.cc | 207 +++++++--------------------------------- 2 files changed, 41 insertions(+), 174 deletions(-) diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 309e5c029..05bd2081d 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -54,9 +54,13 @@ class ImProcFunctions void calcVignettingParams (int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul); - void transformPreview (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap); + enum TransformMode { + TRANSFORM_PREVIEW, + TRANSFORM_HIGH_QUALITY, + TRANSFORM_HIGH_QUALITY_FULLIMAGE + }; void transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH); - void transformHighQuality (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap, bool fullImage); + void transformGeneral(TransformMode mode, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap); void sharpenHaloCtrl (float** luminance, float** blurmap, float** base, int W, int H, const SharpeningParams &sharpenParam); void sharpenHaloCtrl (LabImage* lab, float** blurmap, float** base, int W, int H, SharpeningParams &sharpenParam); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index ee14c80c2..3ee42a684 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -325,10 +325,16 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, if (! (needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP()) && (needsVignetting() || needsPCVignetting() || needsGradient())) { transformLuminanceOnly (original, transformed, cx, cy, oW, oH, fW, fH); - } else if (!needsCA() && scale != 1) { - transformPreview (original, transformed, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap); } else { - transformHighQuality (original, transformed, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap, fullImage); + TransformMode mode; + if (!needsCA() && scale != 1) { + mode = TRANSFORM_PREVIEW; + } else if (!fullImage) { + mode = TRANSFORM_HIGH_QUALITY; + } else { + mode = TRANSFORM_HIGH_QUALITY_FULLIMAGE; + } + transformGeneral(mode, original, transformed, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap); } if (pLCPMap) { @@ -721,9 +727,8 @@ void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* } } -// Transform WITH scaling (opt.) and CA, cubic interpolation -void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, - const LCPMapper *pLCPMap, bool fullImage) + +void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap) { double w2 = (double) oW / 2.0 - 0.5; double h2 = (double) oH / 2.0 - 0.5; @@ -781,17 +786,31 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr oH * tan (hpalpha) * sqrt (SQR (4 * maxRadius) + SQR (oH * tan (hpalpha)))) / (SQR (maxRadius) * 8))); double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); - double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, true /*fullImage*/ ? pLCPMap : nullptr) : 1.0; + double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, pLCPMap) : 1.0; // smaller crop images are a problem, so only when processing fully - bool enableLCPCA = pLCPMap && params->lensProf.useCA && fullImage && pLCPMap->enableCA; - bool enableLCPDist = pLCPMap && params->lensProf.useDist; // && fullImage; + bool enableLCPCA = false; + bool enableLCPDist = false; + bool enableCA = false; - if (enableLCPCA) { - enableLCPDist = false; + switch (mode) { + case ImProcFunctions::TRANSFORM_HIGH_QUALITY_FULLIMAGE: + enableLCPCA = pLCPMap && params->lensProf.useCA && pLCPMap->enableCA; + // no break on purpose + case ImProcFunctions::TRANSFORM_HIGH_QUALITY: + enableLCPDist = pLCPMap && params->lensProf.useDist; + if (enableLCPCA) { + enableLCPDist = false; + } + enableCA = enableLCPCA || needsCA(); + default: // ImProcFunctions::TRANSFORM_PREVIEW + enableLCPDist = pLCPMap && params->lensProf.useDist; + break; } - bool enableCA = enableLCPCA || needsCA(); + if (!enableCA) { + chDist[0] = 0.0; + } // main cycle bool darkening = (params->vignetting.amount <= 0.0); @@ -895,6 +914,10 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr // all interpolation pixels inside image if (enableCA) { interpolateTransformChannelsCubic (chOrig[c], xc - 1, yc - 1, Dx, Dy, & (chTrans[c][y][x]), vignmul); + } else if (mode == ImProcFunctions::TRANSFORM_PREVIEW) { + transformed->r (y, x) = vignmul * (original->r (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->r (yc, xc + 1) * Dx * (1.0 - Dy) + original->r (yc + 1, xc) * (1.0 - Dx) * Dy + original->r (yc + 1, xc + 1) * Dx * Dy); + transformed->g (y, x) = vignmul * (original->g (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->g (yc, xc + 1) * Dx * (1.0 - Dy) + original->g (yc + 1, xc) * (1.0 - Dx) * Dy + original->g (yc + 1, xc + 1) * Dx * Dy); + transformed->b (y, x) = vignmul * (original->b (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->b (yc, xc + 1) * Dx * (1.0 - Dy) + original->b (yc + 1, xc) * (1.0 - Dx) * Dy + original->b (yc + 1, xc + 1) * Dx * Dy); } else { interpolateTransformCubic (original, xc - 1, yc - 1, Dx, Dy, & (transformed->r (y, x)), & (transformed->g (y, x)), & (transformed->b (y, x)), vignmul); } @@ -928,166 +951,6 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr } } -// Transform WITH scaling, WITHOUT CA, simple (and fast) interpolation. Used for preview -void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap) -{ - - double w2 = (double) oW / 2.0 - 0.5; - double h2 = (double) oH / 2.0 - 0.5; - - double vig_w2, vig_h2, maxRadius, v, b, mul; - calcVignettingParams (oW, oH, params->vignetting, vig_w2, vig_h2, maxRadius, v, b, mul); - - struct grad_params gp; - - if (needsGradient()) { - calcGradientParams (oW, oH, params->gradient, gp); - } - - struct pcv_params pcv; - - if (needsPCVignetting()) { - calcPCVignetteParams (fW, fH, oW, oH, params->pcvignette, params->crop, pcv); - } - - // auxiliary variables for distortion correction - bool needsDist = needsDistortion(); // for performance - double distAmount = params->distortion.amount; - - // auxiliary variables for rotation - double cost = cos (params->rotate.degree * rtengine::RT_PI / 180.0); - double sint = sin (params->rotate.degree * rtengine::RT_PI / 180.0); - - // auxiliary variables for vertical perspective correction - double vpdeg = params->perspective.vertical / 100.0 * 45.0; - double vpalpha = (90 - vpdeg) / 180.0 * rtengine::RT_PI; - double vpteta = fabs (vpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((vpdeg > 0 ? 1.0 : -1.0) * sqrt ((-oW * oW * tan (vpalpha) * tan (vpalpha) + (vpdeg > 0 ? 1.0 : -1.0) * oW * tan (vpalpha) * sqrt (16 * maxRadius * maxRadius + oW * oW * tan (vpalpha) * tan (vpalpha))) / (maxRadius * maxRadius * 8))); - double vpcospt = (vpdeg >= 0 ? 1.0 : -1.0) * cos (vpteta), vptanpt = tan (vpteta); - - // auxiliary variables for horizontal perspective correction - double hpdeg = params->perspective.horizontal / 100.0 * 45.0; - double hpalpha = (90 - hpdeg) / 180.0 * rtengine::RT_PI; - double hpteta = fabs (hpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((hpdeg > 0 ? 1.0 : -1.0) * sqrt ((-oH * oH * tan (hpalpha) * tan (hpalpha) + (hpdeg > 0 ? 1.0 : -1.0) * oH * tan (hpalpha) * sqrt (16 * maxRadius * maxRadius + oH * oH * tan (hpalpha) * tan (hpalpha))) / (maxRadius * maxRadius * 8))); - double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); - - double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, pLCPMap) : 1.0; - - bool darkening = (params->vignetting.amount <= 0.0); - - // main cycle - #pragma omp parallel for if (multiThread) - - for (int y = 0; y < transformed->getHeight(); y++) { - for (int x = 0; x < transformed->getWidth(); x++) { - double x_d = x, y_d = y; - - if (pLCPMap && params->lensProf.useDist) { - correct_distortion(pLCPMap, x_d, y_d, cx, cy, ascale); // must be first transform - } else { - x_d *= ascale; - y_d *= ascale; - } - - x_d += ascale * (cx - w2); // centering x coord & scale - y_d += ascale * (cy - h2); // centering y coord & scale - - double vig_x_d = 0., vig_y_d = 0.; - - if (needsVignetting()) { - vig_x_d = ascale * (x + cx - vig_w2); // centering x coord & scale - vig_y_d = ascale * (y + cy - vig_h2); // centering y coord & scale - } - - if (needsPerspective()) { - // horizontal perspective transformation - y_d *= maxRadius / (maxRadius + x_d * hptanpt); - x_d *= maxRadius * hpcospt / (maxRadius + x_d * hptanpt); - - // vertical perspective transformation - x_d *= maxRadius / (maxRadius - y_d * vptanpt); - y_d *= maxRadius * vpcospt / (maxRadius - y_d * vptanpt); - } - - // rotate - double Dx = x_d * cost - y_d * sint; - double Dy = x_d * sint + y_d * cost; - - // distortion correction - double s = 1; - - if (needsDist) { - double r = sqrt (Dx * Dx + Dy * Dy) / maxRadius; // sqrt is slow - s = 1.0 - distAmount + distAmount * r ; - Dx *= s; - Dy *= s; - } - - double r2 = 0.; - - if (needsVignetting()) { - double vig_Dx = vig_x_d * cost - vig_y_d * sint; - double vig_Dy = vig_x_d * sint + vig_y_d * cost; - r2 = sqrt (vig_Dx * vig_Dx + vig_Dy * vig_Dy); - } - - // de-center - Dx += w2; - Dy += h2; - - // Extract integer and fractions of source screen coordinates - int xc = (int)Dx; - Dx -= (double)xc; - xc -= sx; - int yc = (int)Dy; - Dy -= (double)yc; - yc -= sy; - - // Convert only valid pixels - if (yc >= 0 && yc < original->getHeight() && xc >= 0 && xc < original->getWidth()) { - - // multiplier for vignetting correction - double vignmul = 1.0; - - if (needsVignetting()) { - if (darkening) { - vignmul /= std::max (v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); - } else { - vignmul = v + mul * tanh (b * (maxRadius - s * r2) / maxRadius); - } - } - - if (needsGradient()) { - vignmul *= calcGradientFactor (gp, cx + x, cy + y); - } - - if (needsPCVignetting()) { - vignmul *= calcPCVignetteFactor (pcv, cx + x, cy + y); - } - - if (yc < original->getHeight() - 1 && xc < original->getWidth() - 1) { - // all interpolation pixels inside image - transformed->r (y, x) = vignmul * (original->r (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->r (yc, xc + 1) * Dx * (1.0 - Dy) + original->r (yc + 1, xc) * (1.0 - Dx) * Dy + original->r (yc + 1, xc + 1) * Dx * Dy); - transformed->g (y, x) = vignmul * (original->g (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->g (yc, xc + 1) * Dx * (1.0 - Dy) + original->g (yc + 1, xc) * (1.0 - Dx) * Dy + original->g (yc + 1, xc + 1) * Dx * Dy); - transformed->b (y, x) = vignmul * (original->b (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->b (yc, xc + 1) * Dx * (1.0 - Dy) + original->b (yc + 1, xc) * (1.0 - Dx) * Dy + original->b (yc + 1, xc + 1) * Dx * Dy); - } else { - // edge pixels - int y1 = LIM (yc, 0, original->getHeight() - 1); - int y2 = LIM (yc + 1, 0, original->getHeight() - 1); - int x1 = LIM (xc, 0, original->getWidth() - 1); - int x2 = LIM (xc + 1, 0, original->getWidth() - 1); - transformed->r (y, x) = vignmul * (original->r (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r (y1, x2) * Dx * (1.0 - Dy) + original->r (y2, x1) * (1.0 - Dx) * Dy + original->r (y2, x2) * Dx * Dy); - transformed->g (y, x) = vignmul * (original->g (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g (y1, x2) * Dx * (1.0 - Dy) + original->g (y2, x1) * (1.0 - Dx) * Dy + original->g (y2, x2) * Dx * Dy); - transformed->b (y, x) = vignmul * (original->b (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b (y1, x2) * Dx * (1.0 - Dy) + original->b (y2, x1) * (1.0 - Dx) * Dy + original->b (y2, x2) * Dx * Dy); - } - } else { - // not valid (source pixel x,y not inside source image, etc.) - transformed->r (y, x) = 0; - transformed->g (y, x) = 0; - transformed->b (y, x) = 0; - } - } - } -} double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap) { From f7b857eb9e0d4f68fba9ae3936eb4a306f663adf Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 5 Sep 2017 23:42:17 +0200 Subject: [PATCH 060/126] added wrapper classes for lensfun types --- rtengine/rtlensfun.cc | 225 ++++++++++++++++++++++++++++++++++++++++++ rtengine/rtlensfun.h | 85 ++++++++++++++++ 2 files changed, 310 insertions(+) create mode 100644 rtengine/rtlensfun.cc create mode 100644 rtengine/rtlensfun.h diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc new file mode 100644 index 000000000..1b8009ee1 --- /dev/null +++ b/rtengine/rtlensfun.cc @@ -0,0 +1,225 @@ +/* -*- C++ -*- + * + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Alberto Griggio + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * 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 . + */ + +#include "rtlensfun.h" + +namespace rtengine { + +//----------------------------------------------------------------------------- +// LFModifier +//----------------------------------------------------------------------------- + +bool LFModifier::ok() const +{ + return data_.get(); +} + + +void LFModifier::correctDistortion(double &x, double &y) +{ + if (!ok()) { + return; + } + + float pos[2]; + data_->ApplyGeometryDistortion(x, y, 1, 1, pos); + x = pos[0]; + y = pos[1]; +} + + +void LFModifier::processVignetteLine(int width, int y, float *line) +{ + // TODO +} + + +void LFModifier::processVignetteLine3Channels(int width, int y, float *line) +{ + // TODO +} + + +//----------------------------------------------------------------------------- +// LFCamera +//----------------------------------------------------------------------------- + +bool LFCamera::ok() const +{ + return data_.get(); +} + + +Glib::ustring LFCamera::getMake() const +{ + if (ok()) { + return data_->Maker; + } else { + return ""; + } +} + + +Glib::ustring LFCamera::getModel() const +{ + if (ok()) { + return data_->Model; + } else { + return ""; + } +} + + +float LFCamera::getCropFactor() const +{ + if (ok()) { + return data_->CropFactor; + } else { + return 0; + } +} + + +Glib::ustring LFCamera::getDisplayString() const +{ + if (ok()) { + return Glib::ustring::compose("%1 %2", getMake(), getModel()); + } else { + return "---"; + } +} + + +//----------------------------------------------------------------------------- +// LFLens +//----------------------------------------------------------------------------- + +bool LFLens::ok() const +{ + return data_->get(); +} + + +Glib::ustring LFLens::getDisplayString() const +{ + if (ok()) { + return Glib::ustring::compose("%1 %2", data_->Maker, data_->Model); + } else { + return "---"; + } +} + + +//----------------------------------------------------------------------------- +// LFDatabase +//----------------------------------------------------------------------------- + +LFDatabase LFDatabase::instance_; + + +bool LFDatabase::init() +{ + instance_.data_.reset(new lfDatabase()); + return instance_.data_->Load() != LF_NO_ERROR; +} + + +LFDatabase *LFDatabase::getInstance() +{ + return &instance_; +} + + +std::vector LFDatabase::getCameras() +{ + auto cams = data_->GetCameras(); + std::vector ret; + while (*cams) { + ret.emplace_back(LFCamera()); + ret.back().data_.reset(new lfCamera(**cams)); + ++cams; + } + return ret; +} + + +std::vector getLenses(const LFCamera &camera) +{ + auto lenses = data_->FindLenses(*camera.data_->get(), NULL, "", LF_SEARCH_LOOSE | LF_SEARCH_SORT_AND_UNIQUIFY); + std::vector ret; + while (*lenses) { + ret.emplace_back(LFLens()); + ret.back().data_.reset(new lfLens(**lenses)); + ++lenses; + } + lf_free(lenses); + return ret; +} + + +LFCamera LFDatabase::findCamera(const Glib::ustring &make, const Glib::ustring &model) +{ + LFCamera ret; + auto found = data_->FindCamerasExt(make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + if (found) { + ret.data_.reset(new lfCamera(*found[0])); + lf_free(found); + } + return ret; +} + + +LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) +{ + LFLens ret; + auto found = data_->FindLenses(camera.data_.get(), NULL, name.c_str(), LF_SEARCH_LOOSE); + if (!found) { + // try to split the maker from the model of the lens + Glib::ustring make, model; + auto i = name.find_first_of(' '); + if (i != Glib::ustring::npos) { + make = name.substr(0, i); + model = name.substr(i+1); + found = data_->FindLenses(camera.data_.get(), make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + } + } + if (found) { + ret.data_.reset(new lfLens(*found[0])); + lf_free(found); + } + return ret; +} + + +LFModifier LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, + int width, int height, float focalLen, + float aperture) +{ + LFModifier ret; + if (camera.ok() && lens.ok()) { + lfModifier *mod = lfModifier::Create(lens.data_.get(), camera.getCropFactor(), width, height); + mod->Initialize(lens.data_.get(), LF_PF_F32, focalLen, aperture, 1000, 1, LF_RECTILINEAR, LF_MODIFY_VIGNETTING | LF_MODIFY_DISTORTION, false); + ret.data_.reset(mod); + } + return ret; +} + + +} // namespace rtengine diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h new file mode 100644 index 000000000..aaa49c8e0 --- /dev/null +++ b/rtengine/rtlensfun.h @@ -0,0 +1,85 @@ +/* -*- C++ -*- + * + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Alberto Griggio + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * 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 . + */ + +#pragma once + +#include +#include +#include + +namespace rtengine { + +class LFModifier { +public: + bool ok() const; + + void correctDistortion(double &x, double &y); + void processVignetteLine(int width, int y, float *line); + void processVignetteLine3Channels(int width, int y, float *line); + +private: + friend class LFDatabase; + std::shared_ptr data_; +}; + +class LFCamera { +public: + bool ok() const; + + Glib::ustring getMake() const; + Glib::ustring getModel() const; + float getCropFactor() const; + + Glib::ustring getDisplayString() const; + +private: + friend class LFDatabase; + std::shared_ptr data_; +}; + +class LFLens { +public: + bool ok() const; + + Glib::ustring getDisplayString() const; +private: + friend class LFDatabase; + std::shared_ptr data_; +}; + +class LFDatabase { +public: + static bool init(); + static LFDatabase *getInstance(); + + std::vector getCameras(); + std::vector getLenses(const LFCamera &camera); + LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model); + LFLens findLens(const LFCamera &camera, const Glib::ustring &name); + LFModifier getModifier(const LFCamera &camera, const LFLens &lens, + int width, int height, + float focalLen, float aperture); + +private: + static LFDatabase instance_; + std::shared_ptr data_; +}; + +} // namespace rtengine From b4d3caf9c6b1cbfdf02561463d237c1926a977ad Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Wed, 6 Sep 2017 00:15:41 +0200 Subject: [PATCH 061/126] changed signature of ImProcFunctions::transform to take as input an ImageMetaData pointer --- rtengine/dcrop.cc | 7 ++++--- rtengine/improccoordinator.cc | 10 +++++++--- rtengine/improcfun.h | 5 +++-- rtengine/iptransform.cc | 8 +++++++- rtengine/rtengine.h | 1 + rtengine/rtthumbnail.cc | 27 +++++++++++++++++++-------- rtengine/rtthumbnail.h | 5 +++-- rtengine/simpleprocess.cc | 8 +++++--- rtgui/cacheimagedata.h | 33 ++++++++++++++++++++++++++++----- rtgui/thumbnail.cc | 6 ++++-- 10 files changed, 81 insertions(+), 29 deletions(-) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index df75e7a0e..acd73c0a3 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -698,9 +698,10 @@ void Crop::update (int todo) if (needstransform) parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, skips (parent->fw, skip), skips (parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), - parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), - parent->imgsrc->getMetaData()->getFocusDist(), - parent->imgsrc->getMetaData()->getFNumber(), + parent->imgsrc->getMetaData(), + // parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), + // parent->imgsrc->getMetaData()->getFocusDist(), + // parent->imgsrc->getMetaData()->getFNumber(), parent->imgsrc->getRotateDegree(), false); else { baseCrop->copyData (transCrop); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index d5032cd46..b14db1588 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -401,7 +401,9 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) if (needstransform) ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), - imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), false); + imgsrc->getMetaData(), + // imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), + imgsrc->getRotateDegree(), false); else { orig_prev->copyData (oprevi); } @@ -1219,8 +1221,10 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool if (ipf.needsTransform()) { Imagefloat* trImg = new Imagefloat (fW, fH); - ipf.transform (im, trImg, 0, 0, 0, 0, fW, fH, fW, fH, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), - imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), true); + ipf.transform (im, trImg, 0, 0, 0, 0, fW, fH, fW, fH, + imgsrc->getMetaData(), + // imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), + imgsrc->getRotateDegree(), true); delete im; im = trImg; } diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 05bd2081d..983295c38 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -239,8 +239,9 @@ public: void colorCurve (LabImage* lold, LabImage* lnew); void sharpening (LabImage* lab, float** buffer, SharpeningParams &sharpenParam); void sharpeningcam (CieImage* ncie, float** buffer); - void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, - double focalLen, double focalLen35mm, float focusDist, double fNumber, int rawRotationDeg, bool fullImage); + /* void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, */ + /* double focalLen, double focalLen35mm, float focusDist, double fNumber, int rawRotationDeg, bool fullImage); */ + void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const ImageMetaData *metadata, int rawRotationDeg, bool fullImage); float resizeScale (const ProcParams* params, int fw, int fh, int &imw, int &imh); void lab2monitorRgb (LabImage* lab, Image8* image); void resize (Image16* src, Image16* dst, float dScale); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 3ee42a684..6d34c5935 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -307,8 +307,14 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& } void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, - double focalLen, double focalLen35mm, float focusDist, double fNumber, int rawRotationDeg, bool fullImage) + const ImageMetaData *metadata, + //double focalLen, double focalLen35mm, float focusDist, double fNumber, + int rawRotationDeg, bool fullImage) { + double focalLen = metadata->getFocalLen(); + double focalLen35mm = metadata->getFocalLen35mm(); + float focusDist = metadata->getFocusDist(); + double fNumber = metadata->getFNumber(); LCPMapper *pLCPMap = nullptr; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 9ba794a1f..c78d8ef40 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -48,6 +48,7 @@ class IImage8; class IImage16; class IImagefloat; + /** * This class represents provides functions to obtain exif and IPTC metadata information * from the image file diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 511b17f9f..52314ceaf 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -954,9 +954,19 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int } // Full thumbnail processing, second stage if complete profile exists -IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, std::string camName, - double focalLen, double focalLen35mm, float focusDist, float shutter, float fnumber, float iso, std::string expcomp_, double& myscale) +// IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, std::string camName, +// double focalLen, double focalLen35mm, float focusDist, float shutter, float fnumber, float iso, std::string expcomp_, double& myscale) +IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, const ImageMetaData *metadata, double& myscale) { + std::string camName = metadata->getCamera(); + double focalLen = metadata->getFocalLen(); + double focalLen35mm = metadata->getFocalLen35mm(); + float focusDist = metadata->getFocusDist(); + float shutter = metadata->getShutterSpeed(); + float fnumber = metadata->getFNumber(); + float iso = metadata->getISOSpeed(); + float fcomp = metadata->getExpComp(); + // check if the WB's equalizer value has changed if (wbEqual < (params.wb.equal - 5e-4) || wbEqual > (params.wb.equal + 5e-4) || wbTempBias < (params.wb.tempBias - 5e-4) || wbTempBias > (params.wb.tempBias + 5e-4)) { wbEqual = params.wb.equal; @@ -1079,7 +1089,8 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei int origFH; double tscale = 0.0; getDimensions (origFW, origFH, tscale); - ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, fnumber, 0, true); // Raw rotate degree not detectable here + // ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, fnumber, 0, true); // Raw rotate degree not detectable here + ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, metadata, 0, true); // Raw rotate degree not detectable here delete baseImg; baseImg = trImg; } @@ -1278,11 +1289,11 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei float fnum = fnumber;// F number float fiso = iso;// ISO float fspeed = shutter;//speed - char * writ = new char[expcomp_.size() + 1];//convert expcomp_ to char - std::copy (expcomp_.begin(), expcomp_.end(), writ); - writ[expcomp_.size()] = '\0'; - float fcomp = atof (writ); //compensation + - - delete[] writ; + // char * writ = new char[expcomp_.size() + 1];//convert expcomp_ to char + // std::copy (expcomp_.begin(), expcomp_.end(), writ); + // writ[expcomp_.size()] = '\0'; + // float fcomp = atof (writ); //compensation + - + // delete[] writ; float adap; if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index c40a226c4..4fc3466c8 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -71,8 +71,9 @@ public: void init (); - IImage8* processImage (const procparams::ProcParams& pparams, int rheight, TypeInterpolation interp, std::string camName, - double focalLen, double focalLen35mm, float focusDist, float shutter, float fnumber, float iso, std::string expcomp_, double& scale); + // IImage8* processImage (const procparams::ProcParams& pparams, int rheight, TypeInterpolation interp, std::string camName, + // double focalLen, double focalLen35mm, float focusDist, float shutter, float fnumber, float iso, std::string expcomp_, double& scale); + IImage8* processImage (const procparams::ProcParams& pparams, int rheight, TypeInterpolation interp, const ImageMetaData *metadata, double& scale); IImage8* quickProcessImage (const procparams::ProcParams& pparams, int rheight, TypeInterpolation interp, double& scale); int getImageWidth (const procparams::ProcParams& pparams, int rheight, float &ratio); void getDimensions (int& w, int& h, double& scaleFac); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 14ad333e4..fabcf2158 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -813,9 +813,11 @@ private: // perform transform (excepted resizing) if (ipf.needsTransform()) { Imagefloat* trImg = new Imagefloat (fw, fh); - ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), - imgsrc->getMetaData()->getFocusDist(), - imgsrc->getMetaData()->getFNumber(), + ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh, + imgsrc->getMetaData(), + // imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), + // imgsrc->getMetaData()->getFocusDist(), + // imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), true); delete baseImg; baseImg = trImg; diff --git a/rtgui/cacheimagedata.h b/rtgui/cacheimagedata.h index f655bd88b..378325630 100644 --- a/rtgui/cacheimagedata.h +++ b/rtgui/cacheimagedata.h @@ -21,8 +21,9 @@ #include #include "options.h" +#include "rtengine.h" -class CacheImageData +class CacheImageData: public rtengine::ImageMetaData { public: @@ -76,9 +77,31 @@ public: int load (const Glib::ustring& fname); int save (const Glib::ustring& fname); - Glib::ustring getCamera() const - { - return Glib::ustring(camMake + " " + camModel); - } + // Glib::ustring getCamera() const + // { + // return Glib::ustring(camMake + " " + camModel); + // } + + //------------------------------------------------------------------------- + // ImageMetaData interface + //------------------------------------------------------------------------- + + bool hasExif() const { return false; } + const rtexif::TagDirectory *getExifData() const { return NULL; } + bool hasIPTC() const { return false; } + const procparams::IPTCPairs getIPTCData () const { return procparams::IPTCPairs(); } + struct tm getDateTime () const { struct tm ret; return ret; } + time_t getDateTimeAsTS() const { time_t ret; return ret; } + int getISOSpeed() const { return iso; } + double getFNumber() const { return fnumber; } + double getFocalLen() const { return focalLen; } + double getFocalLen35mm() const { return focalLen35mm; } + float getFocusDist() const { return focusDist; } + double getShutterSpeed() const { return shutter; } + double getExpComp() const { return atof(expcomp.c_str()); } + std::string getMake() const { return camMake; } + std::string getModel() const { return camModel; } + std::string getLens() const { return lens; } + std::string getOrientation() const { return ""; } // TODO }; #endif diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 9db7c69b6..2d67a4a03 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -602,7 +602,8 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro image = tpp->quickProcessImage (pparams, h, rtengine::TI_Nearest, scale); } else { // Full thumbnail: apply profile - image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, cfs.getCamera(), cfs.focalLen, cfs.focalLen35mm, cfs.focusDist, cfs.shutter, cfs.fnumber, cfs.iso, cfs.expcomp, scale ); + // image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, cfs.getCamera(), cfs.focalLen, cfs.focalLen35mm, cfs.focusDist, cfs.shutter, cfs.fnumber, cfs.iso, cfs.expcomp, scale ); + image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, &cfs, scale ); } tpp->getDimensions(lastW, lastH, lastScale); @@ -627,7 +628,8 @@ rtengine::IImage8* Thumbnail::upgradeThumbImage (const rtengine::procparams::Pro return nullptr; } - rtengine::IImage8* image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, cfs.getCamera(), cfs.focalLen, cfs.focalLen35mm, cfs.focusDist, cfs.shutter, cfs.fnumber, cfs.iso, cfs.expcomp, scale ); + // rtengine::IImage8* image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, cfs.getCamera(), cfs.focalLen, cfs.focalLen35mm, cfs.focusDist, cfs.shutter, cfs.fnumber, cfs.iso, cfs.expcomp, scale ); + rtengine::IImage8* image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, &cfs, scale ); tpp->getDimensions(lastW, lastH, lastScale); delete tpp; From 5656d16e64a04c4829f1b75a937c59e3963f0e5d Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Wed, 6 Sep 2017 15:27:54 +0200 Subject: [PATCH 062/126] LCP: filter out bad vignetting correction entries Candidate fix for regression #4062 --- rtengine/lcp.cc | 139 ++++++++++++++++++++++++++---------------------- rtengine/lcp.h | 12 +++-- 2 files changed, 83 insertions(+), 68 deletions(-) diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index c09d2d9be..048ba9dcf 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -134,11 +134,20 @@ LCPPersModel::LCPPersModel() } // mode: 0=distortion, 1=vignette, 2=CA -bool LCPPersModel::hasModeData(int mode) const +bool LCPPersModel::hasModeData(LCPCorrectionMode mode) const { - return (mode == 0 && !vignette.empty() && !vignette.bad_error) || (mode == 1 && !base.empty() && !base.bad_error) - || (mode == 2 && !chromRG.empty() && !chromG.empty() && !chromBG.empty() && - !chromRG.bad_error && !chromG.bad_error && !chromBG.bad_error); + switch (mode) { + case LCP_MODE_VIGNETTE: + return !vignette.empty() && !vignette.bad_error; + case LCP_MODE_DISTORTION: + return !base.empty() && !base.bad_error; + case LCP_MODE_CA: + return !chromRG.empty() && !chromG.empty() && !chromBG.empty() && + !chromRG.bad_error && !chromG.bad_error && !chromBG.bad_error; + default: + assert(false); + return false; + } } void LCPPersModel::print() const @@ -195,11 +204,11 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); } - pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, nullptr, nullptr); + pProf->calcParams(vignette ? LCP_MODE_VIGNETTE : LCP_MODE_DISTORTION, focalLength, focusDist, aperture, &mc, nullptr, nullptr); mc.prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); if (!vignette) { - pProf->calcParams(2, focalLength, focusDist, aperture, &chrom[0], &chrom[1], &chrom[2]); + pProf->calcParams(LCP_MODE_CA, focalLength, focusDist, aperture, &chrom[0], &chrom[1], &chrom[2]); for (int i = 0; i < 3; i++) { chrom[i].prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); @@ -410,9 +419,11 @@ LCPProfile::LCPProfile(const Glib::ustring &fname) } // Two phase filter: first filter out the very rough ones, that distord the average a lot // force it, even if there are few frames (community profiles) -// filterBadFrames(2.0, 0); + filterBadFrames(LCP_MODE_VIGNETTE, 2.0, 0); + filterBadFrames(LCP_MODE_CA, 2.0, 0); // from the non-distorded, filter again on new average basis, but only if there are enough frames left -// filterBadFrames(1.5, 100); + filterBadFrames(LCP_MODE_VIGNETTE, 1.5, 50); + filterBadFrames(LCP_MODE_CA, 1.5, 50); } @@ -429,67 +440,66 @@ LCPProfile::~LCPProfile() } // from all frames not marked as bad already, take average and filter out frames with higher deviation than this if there are enough values -int LCPProfile::filterBadFrames(double maxAvgDevFac, int minFramesLeft) +int LCPProfile::filterBadFrames(LCPCorrectionMode mode, double maxAvgDevFac, int minFramesLeft) { - // take average error per type, then calculated the maximum deviation allowed - double errBase = 0, errChrom = 0, errVignette = 0; - int baseCount = 0, chromCount = 0, vignetteCount = 0; + // take average error, then calculated the maximum deviation allowed + double err = 0; + int count = 0; for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; pm++) { - if (aPersModel[pm]->hasModeData(0)) { - errVignette += aPersModel[pm]->vignette.mean_error; - vignetteCount++; - } - - if (aPersModel[pm]->hasModeData(1)) { - errBase += aPersModel[pm]->base.mean_error; - baseCount++; - } - - if (aPersModel[pm]->hasModeData(2)) { - errChrom += rtengine::max(aPersModel[pm]->chromRG.mean_error, aPersModel[pm]->chromG.mean_error, aPersModel[pm]->chromBG.mean_error); - chromCount++; + if (aPersModel[pm]->hasModeData(mode)) { + count++; + switch (mode) { + case LCP_MODE_VIGNETTE: + err += aPersModel[pm]->vignette.mean_error; + break; + case LCP_MODE_DISTORTION: + err += aPersModel[pm]->base.mean_error; + break; + case LCP_MODE_CA: + err += rtengine::max(aPersModel[pm]->chromRG.mean_error, aPersModel[pm]->chromG.mean_error, aPersModel[pm]->chromBG.mean_error); + break; + } } } // Only if we have enough frames, filter out errors int filtered = 0; - if (baseCount + chromCount + vignetteCount >= minFramesLeft) { - if (baseCount > 0) { - errBase /= (double)baseCount; - } - - if (chromCount > 0) { - errChrom /= (double)chromCount; - } - - if (vignetteCount > 0) { - errVignette /= (double)vignetteCount; + if (count >= minFramesLeft) { + if (count > 0) { + err /= (double)count; } // Now mark all the bad ones as bad, and hasModeData will return false; for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; pm++) { - if (aPersModel[pm]->hasModeData(0) && aPersModel[pm]->vignette.mean_error > maxAvgDevFac * errVignette) { - aPersModel[pm]->vignette.bad_error = true; - filtered++; - } - - if (aPersModel[pm]->hasModeData(1) && aPersModel[pm]->base.mean_error > maxAvgDevFac * errBase) { - aPersModel[pm]->base.bad_error = true; - filtered++; - } - - if (aPersModel[pm]->hasModeData(2) && - (aPersModel[pm]->chromRG.mean_error > maxAvgDevFac * errChrom || aPersModel[pm]->chromG.mean_error > maxAvgDevFac * errChrom - || aPersModel[pm]->chromBG.mean_error > maxAvgDevFac * errChrom)) { - aPersModel[pm]->chromRG.bad_error = aPersModel[pm]->chromG.bad_error = aPersModel[pm]->chromBG.bad_error = true; - filtered++; + if (aPersModel[pm]->hasModeData(mode)) { + switch (mode) { + case LCP_MODE_VIGNETTE: + if (aPersModel[pm]->vignette.mean_error > maxAvgDevFac * err) { + aPersModel[pm]->vignette.bad_error = true; + filtered++; + } + break; + case LCP_MODE_DISTORTION: + if (aPersModel[pm]->base.mean_error > maxAvgDevFac * err) { + aPersModel[pm]->base.bad_error = true; + filtered++; + } + break; + case LCP_MODE_CA: + if ((aPersModel[pm]->chromRG.mean_error > maxAvgDevFac * err || aPersModel[pm]->chromG.mean_error > maxAvgDevFac * err + || aPersModel[pm]->chromBG.mean_error > maxAvgDevFac * err)) { + aPersModel[pm]->chromRG.bad_error = aPersModel[pm]->chromG.bad_error = aPersModel[pm]->chromBG.bad_error = true; + filtered++; + } + break; + } } } if (settings->verbose) { - printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered*100./(baseCount+chromCount+vignetteCount), maxAvgDevFac, baseCount+chromCount+vignetteCount-filtered); + printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered*100./count, maxAvgDevFac, count-filtered); } } @@ -497,8 +507,7 @@ int LCPProfile::filterBadFrames(double maxAvgDevFac, int minFramesLeft) } -// mode: 0=vignette, 1=distortion, 2=CA -void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const +void LCPProfile::calcParams(LCPCorrectionMode mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const { float euler = exp(1.0); @@ -541,24 +550,24 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float if (aPersModel[pm]->hasModeData(mode)) { double lowMeanErr, highMeanErr; switch (mode) { - case 0: + case LCP_MODE_VIGNETTE: meanErr = aPersModel[pm]->vignette.mean_error; lowMeanErr = pLow->vignette.mean_error; highMeanErr = pHigh->vignette.mean_error; break; - case 1: + case LCP_MODE_DISTORTION: meanErr = aPersModel[pm]->base.mean_error; lowMeanErr = pLow->base.mean_error; highMeanErr = pHigh->base.mean_error; break; - default: //case 2: + default: // LCP_MODE_CA meanErr = aPersModel[pm]->chromG.mean_error; lowMeanErr = pLow->chromG.mean_error; highMeanErr = pHigh->chromG.mean_error; break; } - if (aperture > 0 && mode != 2) { + if (aperture > 0 && mode != LCP_MODE_CA) { if (aPersModel[pm]->focLen == bestFocLenLow && ( (aper == aperture && lowMeanErr > meanErr) || (aper >= aperture && aper < pLow->aperture && pLow->aperture > aperture) @@ -572,7 +581,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float || (aper >= aperture && (pHigh->aperture < aperture || fabs(aperture - aper) < fabs(aperture - pHigh->aperture))))) { pHigh = aPersModel[pm]; } - } else if (focusDist > 0 && mode != 0) { + } else if (focusDist > 0 && mode != LCP_MODE_VIGNETTE) { // by focus distance if (aPersModel[pm]->focLen == bestFocLenLow && ( (focDist == focusDist && lowMeanErr > meanErr) @@ -615,26 +624,26 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float } // and average the other factor if available - if (mode == 0 && pLow->aperture < aperture && pHigh->aperture > aperture) { + if (mode == LCP_MODE_VIGNETTE && pLow->aperture < aperture && pHigh->aperture > aperture) { // Mix in aperture float facAperLow = (pHigh->aperture - aperture) / (pHigh->aperture - pLow->aperture); facLow = focLenOnSpot ? facAperLow : (0.5 * facLow + 0.5 * facAperLow); - } else if (mode != 0 && focusDist > 0 && pLow->focDist < focusDist && pHigh->focDist > focusDist) { + } else if (mode != LCP_MODE_VIGNETTE && focusDist > 0 && pLow->focDist < focusDist && pHigh->focDist > focusDist) { // focus distance for all else (if focus distance is given) float facDistLow = (log(pHigh->focDist) + euler - focusDistLog) / (log(pHigh->focDist) - log(pLow->focDist)); facLow = focLenOnSpot ? facDistLow : (0.8 * facLow + 0.2 * facDistLow); } switch (mode) { - case 0: // vignette + case LCP_MODE_VIGNETTE: pCorr1->merge(pLow->vignette, pHigh->vignette, facLow); break; - case 1: // distortion + case LCP_MODE_DISTORTION: pCorr1->merge(pLow->base, pHigh->base, facLow); break; - case 2: // CA + case LCP_MODE_CA: pCorr1->merge(pLow->chromRG, pHigh->chromRG, facLow); pCorr2->merge(pLow->chromG, pHigh->chromG, facLow); pCorr3->merge(pLow->chromBG, pHigh->chromBG, facLow); @@ -646,7 +655,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float } } else { if (settings->verbose) { - printf("Error: LCP file contained no %s parameters\n", mode == 0 ? "vignette" : mode == 1 ? "distortion" : "CA" ); + printf("Error: LCP file contained no %s parameters\n", mode == LCP_MODE_VIGNETTE ? "vignette" : mode == LCP_MODE_DISTORTION ? "distortion" : "CA" ); } } } diff --git a/rtengine/lcp.h b/rtengine/lcp.h index f7164117f..291710c5f 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -33,6 +33,12 @@ namespace rtengine { +enum LCPCorrectionMode { + LCP_MODE_VIGNETTE = 0, + LCP_MODE_DISTORTION = 1, + LCP_MODE_CA = 2 +}; + // Perspective model common data, also used for Vignette and Fisheye class LCPModelCommon final { @@ -76,7 +82,7 @@ public: LCPModelCommon vignette; // vignette (may be empty) LCPPersModel(); - bool hasModeData(int mode) const; + bool hasModeData(LCPCorrectionMode mode) const; void print() const; }; @@ -93,7 +99,7 @@ class LCPProfile static void XMLCALL XmlTextHandler (void *pLCPProfile, const XML_Char *s, int len); static void XMLCALL XmlEndHandler (void *pLCPProfile, const char *el); - int filterBadFrames(double maxAvgDevFac, int minFramesLeft); + int filterBadFrames(LCPCorrectionMode mode, double maxAvgDevFac, int minFramesLeft); void handle_text(std::string text); std::ostringstream textbuf; @@ -112,7 +118,7 @@ public: explicit LCPProfile(const Glib::ustring &fname); ~LCPProfile(); - void calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames + void calcParams(LCPCorrectionMode mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames void print() const; }; From dde94bc6d3ccfa2ebbb0f7ce8a1a6f7ddc362911 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 7 Sep 2017 00:53:03 +0200 Subject: [PATCH 063/126] added basic integration of lensfun so far only distortion correction, and no GUI yet --- CMakeLists.txt | 1 + rtengine/CMakeLists.txt | 3 + rtengine/dcrop.cc | 5 +- rtengine/improccoordinator.cc | 5 +- rtengine/improcfun.h | 9 +- rtengine/init.cc | 2 + rtengine/iptransform.cc | 65 ++++++++++--- rtengine/lcp.cc | 8 +- rtengine/lcp.h | 18 +++- rtengine/procparams.cc | 61 ++++++++++++ rtengine/procparams.h | 6 ++ rtengine/rtlensfun.cc | 178 ++++++++++++++++++++++------------ rtengine/rtlensfun.h | 48 ++++++--- rtengine/rtthumbnail.cc | 3 - rtgui/CMakeLists.txt | 4 + rtgui/cacheimagedata.h | 6 +- rtgui/paramsedited.cc | 10 ++ rtgui/paramsedited.h | 1 + 18 files changed, 320 insertions(+), 113 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 685b418bf..e506499b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,6 +272,7 @@ pkg_check_modules (GIOMM REQUIRED giomm-2.4>=2.44) pkg_check_modules (GTHREAD REQUIRED gthread-2.0>=2.44) pkg_check_modules (GOBJECT REQUIRED gobject-2.0>=2.44) pkg_check_modules (SIGC REQUIRED sigc++-2.0>=2.3.1) +pkg_check_modules (LENSFUN REQUIRED lensfun>=0.2) if(WIN32) add_definitions(-DWIN32) diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index a813d4156..32d99cb8f 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -9,6 +9,7 @@ include_directories(${EXTRA_INCDIR} ${GTK_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS} + ${LENSFUN_INCLUDE_DIRS} ) link_directories("${PROJECT_SOURCE_DIR}/rtexif" @@ -109,6 +110,7 @@ set(RTENGINESOURCEFILES slicer.cc stdimagesource.cc utils.cc + rtlensfun.cc ) if(NOT WITH_SYSTEM_KLT) @@ -153,6 +155,7 @@ target_link_libraries(rtengine rtexif ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} + ${LENSFUN_LIBRARIES} ) install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index acd73c0a3..92416917d 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -1086,8 +1086,9 @@ bool check_need_larger_crop_for_lcp_distortion (int fw, int fh, int x, int y, in return false; } - return (params.lensProf.lcpFile.length() > 0 && - params.lensProf.useDist); + return (params.lensProf.useDist && + (params.lensProf.useLensfun || + params.lensProf.lcpFile.length() > 0)); } } // namespace diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index b14db1588..9f53ab81d 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -400,8 +400,9 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (needstransform) - ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), + ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData(), + // imgsrc->getMetaData()->getFocalLen(), // imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), false); else { @@ -1120,7 +1121,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & MyMutex::MyLock lock (mProcessing); - LCPMapper *pLCPMap = nullptr; + LensCorrection *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { LCPProfile *pLCPProf = lcpStore->getProfile (params.lensProf.lcpFile); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 983295c38..1bcca4d37 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -60,7 +60,7 @@ class ImProcFunctions TRANSFORM_HIGH_QUALITY_FULLIMAGE }; void transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH); - void transformGeneral(TransformMode mode, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap); + void transformGeneral(TransformMode mode, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap); void sharpenHaloCtrl (float** luminance, float** blurmap, float** base, int W, int H, const SharpeningParams &sharpenParam); void sharpenHaloCtrl (LabImage* lab, float** blurmap, float** base, int W, int H, SharpeningParams &sharpenParam); @@ -74,6 +74,7 @@ class ImProcFunctions bool needsGradient (); bool needsVignetting (); bool needsLCP (); + bool needsLensfun(); // static cmsUInt8Number* Mempro = NULL; inline void interpolateTransformCubic (Imagefloat* src, int xs, int ys, double Dx, double Dy, float *r, float *g, float *b, double mul) @@ -352,11 +353,11 @@ public: Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga = nullptr); // CieImage *ciec; - bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); - bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); + bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr); + bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr); static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); - double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); + double getTransformAutoFill (int oW, int oH, const LensCorrection *pLCPMap = nullptr); void rgb2lab (const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); void lab2rgb (const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; diff --git a/rtengine/init.cc b/rtengine/init.cc index 2d157c762..7ef40f43a 100644 --- a/rtengine/init.cc +++ b/rtengine/init.cc @@ -30,6 +30,7 @@ #include "rtthumbnail.h" #include "profilestore.h" #include "../rtgui/threadutils.h" +#include "rtlensfun.h" namespace rtengine { @@ -50,6 +51,7 @@ int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDi Color::init (); PerceptualToneCurve::init (); RawImageSource::init (); + LFDatabase::init(); delete lcmsMutex; lcmsMutex = new MyMutex; dfm.init( s->darkFramesPath ); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 6d34c5935..a054cc57a 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -24,6 +24,7 @@ #include "mytime.h" #include "rt_math.h" #include "sleef.c" +#include "rtlensfun.h" using namespace std; @@ -86,16 +87,18 @@ float normn (float a, float b, int n) } -void correct_distortion(const rtengine::LCPMapper *lcp, double &x, double &y, +inline void correct_distortion(const rtengine::LensCorrection *lcp, double &x, double &y, int cx, int cy, double scale) { assert (lcp); - x += cx; - y += cy; - lcp->correctDistortion(x, y, scale); - x -= (cx * scale); - y -= (cy * scale); + // x += cx; + // y += cy; + // std::cout << "DIST: x=" << x << ", y=" << y; + lcp->correctDistortion(x, y, cx, cy, scale); + // std::cout << " --> pos[0]=" << x << ", pos[1]=" << y << std::endl; + // x -= (cx * scale); + // y -= (cy * scale); } } @@ -107,7 +110,7 @@ namespace rtengine #define CLIPTOC(a,b,c,d) ((a)>=(b)?((a)<=(c)?(a):(d=true,(c))):(d=true,(b))) bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef, - const LCPMapper *pLCPMap) + const LensCorrection *pLCPMap) { bool clipped = false; @@ -209,7 +212,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, } // Transform all corners and critical sidelines of an image -bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef, const LCPMapper *pLCPMap) +bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef, const LensCorrection *pLCPMap) { const int DivisionsPerBorder = 32; @@ -316,9 +319,30 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, float focusDist = metadata->getFocusDist(); double fNumber = metadata->getFNumber(); - LCPMapper *pLCPMap = nullptr; + LensCorrection *pLCPMap = nullptr; - if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip + if (needsLensfun()) { + const LFDatabase *db = LFDatabase::getInstance(); + Glib::ustring make, model, lens; + if (params->lensProf.lfAutoMatch) { + make = metadata->getMake(); + model = metadata->getModel(); + lens = metadata->getLens(); + } else { + make = params->lensProf.lfCameraMake; + model = params->lensProf.lfCameraModel; + lens = params->lensProf.lfLens; + } + LFCamera c = db->findCamera(make, model); + LFLens l = db->findLens(c, lens); + pLCPMap = db->getModifier(c, l, fW, fH, focalLen, fNumber, focusDist); + + std::cout << "LENSFUN:\n" + << " camera: " << c.getDisplayString() << "\n" + << " lens: " << l.getDisplayString() << "\n" + << " correction? " << (pLCPMap ? "yes" : "no") << std::endl; + + } else if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip LCPProfile *pLCPProf = lcpStore->getProfile (params->lensProf.lcpFile); if (pLCPProf) { @@ -329,7 +353,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, } } - if (! (needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP()) && (needsVignetting() || needsPCVignetting() || needsGradient())) { + if (! (needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP() || needsLensfun()) && (needsVignetting() || needsPCVignetting() || needsGradient())) { transformLuminanceOnly (original, transformed, cx, cy, oW, oH, fW, fH); } else { TransformMode mode; @@ -734,7 +758,7 @@ void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* } -void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap) +void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imagefloat *original, Imagefloat *transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LensCorrection *pLCPMap) { double w2 = (double) oW / 2.0 - 0.5; double h2 = (double) oH / 2.0 - 0.5; @@ -801,7 +825,7 @@ void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imag switch (mode) { case ImProcFunctions::TRANSFORM_HIGH_QUALITY_FULLIMAGE: - enableLCPCA = pLCPMap && params->lensProf.useCA && pLCPMap->enableCA; + enableLCPCA = pLCPMap && params->lensProf.useCA && pLCPMap->supportsCA(); // no break on purpose case ImProcFunctions::TRANSFORM_HIGH_QUALITY: enableLCPDist = pLCPMap && params->lensProf.useDist; @@ -958,12 +982,16 @@ void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imag } -double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap) +double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LensCorrection *pLCPMap) { if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) { return 1; } + if (pLCPMap && !pLCPMap->supportsAutoFill()) { + return 1; + } + double scaleU = 2, scaleL = 0.001; // upper and lower border, iterate inbetween do { @@ -1019,12 +1047,17 @@ bool ImProcFunctions::needsVignetting () bool ImProcFunctions::needsLCP () { - return params->lensProf.lcpFile.length() > 0; + return params->lensProf.lcpFile.length() > 0 && !needsLensfun(); +} + +bool ImProcFunctions::needsLensfun() +{ + return params->lensProf.useLensfun; } bool ImProcFunctions::needsTransform () { - return needsCA () || needsDistortion () || needsRotation () || needsPerspective () || needsGradient () || needsPCVignetting () || needsVignetting () || needsLCP(); + return needsCA () || needsDistortion () || needsRotation () || needsPerspective () || needsGradient () || needsPCVignetting () || needsVignetting () || needsLCP() || needsLensfun(); } diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index c09d2d9be..92a3a3ce8 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -210,8 +210,11 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm isFisheye = pProf->isFisheye; } -void LCPMapper::correctDistortion(double& x, double& y, double scale) const +void LCPMapper::correctDistortion(double &x, double &y, int cx, int cy, double scale) const { + x += cx; + y += cy; + if (isFisheye) { double u = x * scale; double v = y * scale; @@ -253,6 +256,9 @@ void LCPMapper::correctDistortion(double& x, double& y, double scale) const x = xnew * mc.fx + x0; y = ynew * mc.fy + y0; } + + x -= cx * scale; + y -= cy * scale; } void LCPMapper::correctCA(double& x, double& y, int channel) const diff --git a/rtengine/lcp.h b/rtengine/lcp.h index f7164117f..1a4b677d3 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -136,8 +136,20 @@ public: #define lcpStore LCPStore::getInstance() +class LensCorrection { +public: + virtual ~LensCorrection() {} + virtual void correctDistortion(double &x, double &y, int cx, int cy, double scale) const = 0; + virtual bool supportsAutoFill() const = 0; + virtual bool supportsCA() const = 0; + virtual void correctCA(double &x, double &y, int channel) const = 0; + virtual void processVignetteLine(int width, int y, float *line) const = 0; + virtual void processVignetteLine3Channels(int width, int y, float *line) const = 0; +}; + + // Once precalculated class to correct a point -class LCPMapper +class LCPMapper: public LensCorrection { bool useCADist; // should the distortion in the CA info be used? @@ -153,7 +165,9 @@ public: LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg); - void correctDistortion(double& x, double& y, double scale) const; // MUST be the first stage + void correctDistortion(double &x, double &y, int cx, int cy, double scale) const; // MUST be the first stage + bool supportsCA() const { return enableCA; } + bool supportsAutoFill() const { return true; } void correctCA(double& x, double& y, int channel) const; void processVignetteLine(int width, int y, float *line) const; void processVignetteLine3Channels(int width, int y, float *line) const; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index e1a3002e2..29b2cce84 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -922,6 +922,11 @@ void LensProfParams::setDefaults() lcpFile = ""; useDist = useVign = true; useCA = false; + useLensfun = false; + lfAutoMatch = true; + lfCameraMake = ""; + lfCameraModel = ""; + lfLens = ""; } void CoarseTransformParams::setDefaults() @@ -2565,6 +2570,22 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("LensProfile", "UseCA", lensProf.useCA); } + if (!pedited || pedited->lensProf.useLensfun) { + keyFile.set_boolean("LensProfile", "UseLensfun", lensProf.useLensfun); + } + if (!pedited || pedited->lensProf.lfAutoMatch) { + keyFile.set_boolean("LensProfile", "LFAutoMatch", lensProf.lfAutoMatch); + } + if (!pedited || pedited->lensProf.lfCameraMake) { + keyFile.set_string("LensProfile", "LFCameraMake", lensProf.lfCameraMake); + } + if (!pedited || pedited->lensProf.lfCameraModel) { + keyFile.set_string("LensProfile", "LFCameraModel", lensProf.lfCameraModel); + } + if (!pedited || pedited->lensProf.lfLens) { + keyFile.set_string("LensProfile", "LFLens", lensProf.lfLens); + } + // save perspective correction if (!pedited || pedited->perspective.horizontal) { keyFile.set_double ("Perspective", "Horizontal", perspective.horizontal); @@ -5832,6 +5853,41 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->lensProf.useCA = true; } } + + if (keyFile.has_key("LensProfile", "UseLensfun")) { + lensProf.useLensfun = keyFile.get_boolean("LensProfile", "UseLensfun"); + if (pedited) { + pedited->lensProf.useLensfun = true; + } + } + + if (keyFile.has_key("LensProfile", "LFAutoMatch")) { + lensProf.lfAutoMatch = keyFile.get_boolean("LensProfile", "LFAutoMatch"); + if (pedited) { + pedited->lensProf.lfAutoMatch = true; + } + } + + if (keyFile.has_key("LensProfile", "LFCameraMake")) { + lensProf.lfCameraMake = keyFile.get_string("LensProfile", "LFCameraMake"); + if (pedited) { + pedited->lensProf.lfCameraMake = true; + } + } + + if (keyFile.has_key("LensProfile", "LFCameraModel")) { + lensProf.lfCameraModel = keyFile.get_string("LensProfile", "LFCameraModel"); + if (pedited) { + pedited->lensProf.lfCameraModel = true; + } + } + + if (keyFile.has_key("LensProfile", "LFLens")) { + lensProf.lfLens = keyFile.get_string("LensProfile", "LFLens"); + if (pedited) { + pedited->lensProf.lfLens = true; + } + } } // load perspective correction @@ -8432,6 +8488,11 @@ bool ProcParams::operator== (const ProcParams& other) && lensProf.useDist == other.lensProf.useDist && lensProf.useVign == other.lensProf.useVign && lensProf.useCA == other.lensProf.useCA + && lensProf.useLensfun == other.lensProf.useLensfun + && lensProf.lfAutoMatch == other.lensProf.lfAutoMatch + && lensProf.lfCameraMake == other.lensProf.lfCameraMake + && lensProf.lfCameraModel == other.lensProf.lfCameraModel + && lensProf.lfLens == other.lensProf.lfLens && perspective.horizontal == other.perspective.horizontal && perspective.vertical == other.perspective.vertical && gradient.enabled == other.gradient.enabled diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 53561ce16..c7bedf611 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -831,6 +831,11 @@ class LensProfParams public: Glib::ustring lcpFile; bool useDist, useVign, useCA; + bool useLensfun; + bool lfAutoMatch; + Glib::ustring lfCameraMake; + Glib::ustring lfCameraModel; + Glib::ustring lfLens; LensProfParams() { @@ -839,6 +844,7 @@ public: void setDefaults(); }; + /** * Parameters of the perspective correction */ diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 1b8009ee1..7d376269d 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -26,32 +26,46 @@ namespace rtengine { // LFModifier //----------------------------------------------------------------------------- -bool LFModifier::ok() const +LFModifier::LFModifier(lfModifier *m): + data_(m) { - return data_.get(); } -void LFModifier::correctDistortion(double &x, double &y) +LFModifier::~LFModifier() +{ + if (data_) { + data_->Destroy(); + } +} + +bool LFModifier::ok() const +{ + return data_; +} + + +void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double scale) const { if (!ok()) { return; } float pos[2]; - data_->ApplyGeometryDistortion(x, y, 1, 1, pos); - x = pos[0]; - y = pos[1]; + if (data_->ApplyGeometryDistortion(x+cx, y+cy, 1, 1, pos)) { + x = pos[0] - cx; + y = pos[1] - cy; + } } -void LFModifier::processVignetteLine(int width, int y, float *line) +void LFModifier::processVignetteLine(int width, int y, float *line) const { // TODO } -void LFModifier::processVignetteLine3Channels(int width, int y, float *line) +void LFModifier::processVignetteLine3Channels(int width, int y, float *line) const { // TODO } @@ -61,15 +75,21 @@ void LFModifier::processVignetteLine3Channels(int width, int y, float *line) // LFCamera //----------------------------------------------------------------------------- +LFCamera::LFCamera(): + data_(nullptr) +{ +} + + bool LFCamera::ok() const { - return data_.get(); + return data_; } Glib::ustring LFCamera::getMake() const { - if (ok()) { + if (data_) { return data_->Maker; } else { return ""; @@ -79,7 +99,7 @@ Glib::ustring LFCamera::getMake() const Glib::ustring LFCamera::getModel() const { - if (ok()) { + if (data_) { return data_->Model; } else { return ""; @@ -89,7 +109,7 @@ Glib::ustring LFCamera::getModel() const float LFCamera::getCropFactor() const { - if (ok()) { + if (data_) { return data_->CropFactor; } else { return 0; @@ -99,7 +119,7 @@ float LFCamera::getCropFactor() const Glib::ustring LFCamera::getDisplayString() const { - if (ok()) { + if (data_) { return Glib::ustring::compose("%1 %2", getMake(), getModel()); } else { return "---"; @@ -111,15 +131,21 @@ Glib::ustring LFCamera::getDisplayString() const // LFLens //----------------------------------------------------------------------------- +LFLens::LFLens(): + data_(nullptr) +{ +} + + bool LFLens::ok() const { - return data_->get(); + return data_; } Glib::ustring LFLens::getDisplayString() const { - if (ok()) { + if (data_) { return Glib::ustring::compose("%1 %2", data_->Maker, data_->Model); } else { return "---"; @@ -136,87 +162,111 @@ LFDatabase LFDatabase::instance_; bool LFDatabase::init() { - instance_.data_.reset(new lfDatabase()); + instance_.data_ = lfDatabase::Create(); return instance_.data_->Load() != LF_NO_ERROR; } -LFDatabase *LFDatabase::getInstance() +LFDatabase::LFDatabase(): + data_(nullptr) +{ +} + + +LFDatabase::~LFDatabase() +{ + if (data_) { + data_->Destroy(); + } +} + + +const LFDatabase *LFDatabase::getInstance() { return &instance_; } -std::vector LFDatabase::getCameras() +std::vector LFDatabase::getCameras() const { - auto cams = data_->GetCameras(); std::vector ret; - while (*cams) { - ret.emplace_back(LFCamera()); - ret.back().data_.reset(new lfCamera(**cams)); - ++cams; - } + if (data_) { + auto cams = data_->GetCameras(); + while (*cams) { + ret.emplace_back(LFCamera()); + ret.back().data_ = *cams; + ++cams; + } + } return ret; } -std::vector getLenses(const LFCamera &camera) +std::vector LFDatabase::getLenses(const LFCamera &camera) const { - auto lenses = data_->FindLenses(*camera.data_->get(), NULL, "", LF_SEARCH_LOOSE | LF_SEARCH_SORT_AND_UNIQUIFY); std::vector ret; - while (*lenses) { - ret.emplace_back(LFLens()); - ret.back().data_.reset(new lfLens(**lenses)); - ++lenses; + if (data_) { + auto lenses = data_->FindLenses(camera.data_, NULL, "", LF_SEARCH_LOOSE /*| LF_SEARCH_SORT_AND_UNIQUIFY*/); + while (*lenses) { + ret.emplace_back(LFLens()); + ret.back().data_ = *lenses; + ++lenses; + } + lf_free(lenses); } - lf_free(lenses); return ret; } -LFCamera LFDatabase::findCamera(const Glib::ustring &make, const Glib::ustring &model) +LFCamera LFDatabase::findCamera(const Glib::ustring &make, const Glib::ustring &model) const { LFCamera ret; - auto found = data_->FindCamerasExt(make.c_str(), model.c_str(), LF_SEARCH_LOOSE); - if (found) { - ret.data_.reset(new lfCamera(*found[0])); - lf_free(found); - } - return ret; -} - - -LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) -{ - LFLens ret; - auto found = data_->FindLenses(camera.data_.get(), NULL, name.c_str(), LF_SEARCH_LOOSE); - if (!found) { - // try to split the maker from the model of the lens - Glib::ustring make, model; - auto i = name.find_first_of(' '); - if (i != Glib::ustring::npos) { - make = name.substr(0, i); - model = name.substr(i+1); - found = data_->FindLenses(camera.data_.get(), make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + if (data_) { + auto found = data_->FindCamerasExt(make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + if (found) { + ret.data_ = found[0]; + lf_free(found); } } - if (found) { - ret.data_.reset(new lfLens(*found[0])); - lf_free(found); + return ret; +} + + +LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) const +{ + LFLens ret; + if (data_) { + auto found = data_->FindLenses(camera.data_, NULL, name.c_str(), LF_SEARCH_LOOSE); + if (!found) { + // try to split the maker from the model of the lens + Glib::ustring make, model; + auto i = name.find_first_of(' '); + if (i != Glib::ustring::npos) { + make = name.substr(0, i); + model = name.substr(i+1); + found = data_->FindLenses(camera.data_, make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + } + } + if (found) { + ret.data_ = found[0]; + lf_free(found); + } } return ret; } -LFModifier LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, - int width, int height, float focalLen, - float aperture) +LFModifier *LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, + int width, int height, float focalLen, + float aperture, float focusDist) const { - LFModifier ret; - if (camera.ok() && lens.ok()) { - lfModifier *mod = lfModifier::Create(lens.data_.get(), camera.getCropFactor(), width, height); - mod->Initialize(lens.data_.get(), LF_PF_F32, focalLen, aperture, 1000, 1, LF_RECTILINEAR, LF_MODIFY_VIGNETTING | LF_MODIFY_DISTORTION, false); - ret.data_.reset(mod); + LFModifier *ret = nullptr; + if (data_) { + if (camera.ok() && lens.ok()) { + lfModifier *mod = lfModifier::Create(lens.data_, camera.getCropFactor(), width, height); + mod->Initialize(lens.data_, LF_PF_F32, focalLen, aperture, focusDist > 0 ? focusDist : 1000, 0.0, LF_RECTILINEAR, LF_MODIFY_VIGNETTING | LF_MODIFY_DISTORTION, false); + ret = new LFModifier(mod); + } } return ret; } diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index aaa49c8e0..434f821fd 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -23,24 +23,34 @@ #include #include #include +#include "lcp.h" namespace rtengine { -class LFModifier { +class LFModifier: public LensCorrection { public: + ~LFModifier(); bool ok() const; - void correctDistortion(double &x, double &y); - void processVignetteLine(int width, int y, float *line); - void processVignetteLine3Channels(int width, int y, float *line); + void correctDistortion(double &x, double &y, int cx, int cy, double scale) const; + bool supportsAutoFill() const { return false; } + bool supportsCA() const { return false; } + void correctCA(double &x, double &y, int channel) const {} + void processVignetteLine(int width, int y, float *line) const; + void processVignetteLine3Channels(int width, int y, float *line) const; private: + explicit LFModifier(lfModifier *m); + LFModifier(const LFModifier &); + LFModifier &operator=(const LFModifier &); + friend class LFDatabase; - std::shared_ptr data_; + lfModifier *data_; }; class LFCamera { public: + LFCamera(); bool ok() const; Glib::ustring getMake() const; @@ -51,35 +61,41 @@ public: private: friend class LFDatabase; - std::shared_ptr data_; + const lfCamera *data_; }; class LFLens { public: + LFLens(); bool ok() const; Glib::ustring getDisplayString() const; private: friend class LFDatabase; - std::shared_ptr data_; + const lfLens *data_; }; class LFDatabase { public: static bool init(); - static LFDatabase *getInstance(); + static const LFDatabase *getInstance(); - std::vector getCameras(); - std::vector getLenses(const LFCamera &camera); - LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model); - LFLens findLens(const LFCamera &camera, const Glib::ustring &name); - LFModifier getModifier(const LFCamera &camera, const LFLens &lens, - int width, int height, - float focalLen, float aperture); + ~LFDatabase(); + + std::vector getCameras() const; + std::vector getLenses(const LFCamera &camera) const; + LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const; + LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const; + LFModifier *getModifier(const LFCamera &camera, const LFLens &lens, + int width, int height, + float focalLen, float aperture, float focusDist) const; private: + LFDatabase(); + LFDatabase(const LFDatabase &); + LFDatabase &operator=(const LFDatabase &); static LFDatabase instance_; - std::shared_ptr data_; + lfDatabase *data_; }; } // namespace rtengine diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 52314ceaf..a5d951de2 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -959,9 +959,6 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, const ImageMetaData *metadata, double& myscale) { std::string camName = metadata->getCamera(); - double focalLen = metadata->getFocalLen(); - double focalLen35mm = metadata->getFocalLen35mm(); - float focusDist = metadata->getFocusDist(); float shutter = metadata->getShutterSpeed(); float fnumber = metadata->getFNumber(); float iso = metadata->getISOSpeed(); diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index 05afd9af5..377b1bcbe 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -169,6 +169,7 @@ if(WIN32) ${GLIBMM_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} + ${LENSFUN_INCLUDE_DIRS} ) link_directories(. "${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} @@ -194,6 +195,7 @@ else() ${GTK_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS} + ${LENSFUN_INCLUDE_DIRS} ) link_directories(${EXTRA_LIBDIR} ${CANBERRA-GTK_LIBRARY_DIRS} @@ -251,6 +253,7 @@ target_link_libraries(rth rtengine ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} + ${LENSFUN_LIBRARIES} ) target_link_libraries(rth-cli rtengine @@ -270,6 +273,7 @@ target_link_libraries(rth-cli rtengine ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} + ${LENSFUN_LIBRARIES} ) # Install executables diff --git a/rtgui/cacheimagedata.h b/rtgui/cacheimagedata.h index 378325630..0af6d4fcf 100644 --- a/rtgui/cacheimagedata.h +++ b/rtgui/cacheimagedata.h @@ -21,7 +21,7 @@ #include #include "options.h" -#include "rtengine.h" +#include "../rtengine/rtengine.h" class CacheImageData: public rtengine::ImageMetaData { @@ -89,9 +89,9 @@ public: bool hasExif() const { return false; } const rtexif::TagDirectory *getExifData() const { return NULL; } bool hasIPTC() const { return false; } - const procparams::IPTCPairs getIPTCData () const { return procparams::IPTCPairs(); } + const rtengine::procparams::IPTCPairs getIPTCData () const { return rtengine::procparams::IPTCPairs(); } struct tm getDateTime () const { struct tm ret; return ret; } - time_t getDateTimeAsTS() const { time_t ret; return ret; } + time_t getDateTimeAsTS() const { return time_t(-1); } int getISOSpeed() const { return iso; } double getFNumber() const { return fnumber; } double getFocalLen() const { return focalLen; } diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index ea9248ddc..588006eca 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -291,6 +291,11 @@ void ParamsEdited::set (bool v) lensProf.useDist = v; lensProf.useVign = v; lensProf.useCA = v; + lensProf.useLensfun = v; + lensProf.lfAutoMatch = v; + lensProf.lfCameraMake = v; + lensProf.lfCameraModel = v; + lensProf.lfLens = v; perspective.horizontal = v; perspective.vertical = v; gradient.enabled = v; @@ -825,6 +830,11 @@ void ParamsEdited::initFrom (const std::vector lensProf.useDist = lensProf.useDist && p.lensProf.useDist == other.lensProf.useDist; lensProf.useVign = lensProf.useVign && p.lensProf.useVign == other.lensProf.useVign; lensProf.useCA = lensProf.useCA && p.lensProf.useCA == other.lensProf.useCA; + lensProf.useLensfun = lensProf.useLensfun && p.lensProf.useLensfun == other.lensProf.useLensfun; + lensProf.lfAutoMatch = lensProf.lfAutoMatch && p.lensProf.lfAutoMatch == other.lensProf.lfAutoMatch; + lensProf.lfCameraMake = lensProf.lfCameraMake && p.lensProf.lfCameraMake == other.lensProf.lfCameraMake; + lensProf.lfCameraModel = lensProf.lfCameraModel && p.lensProf.lfCameraModel == other.lensProf.lfCameraModel; + lensProf.lfLens = lensProf.lfLens && p.lensProf.lfLens == other.lensProf.lfLens; perspective.horizontal = perspective.horizontal && p.perspective.horizontal == other.perspective.horizontal; perspective.vertical = perspective.vertical && p.perspective.vertical == other.perspective.vertical; gradient.enabled = gradient.enabled && p.gradient.enabled == other.gradient.enabled; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 35e3c80b8..c30134f86 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -428,6 +428,7 @@ class LensProfParamsEdited { public: bool lcpFile, useDist, useVign, useCA; + bool useLensfun, lfAutoMatch, lfCameraMake, lfCameraModel, lfLens; bool isUnchanged() const; }; From 18f3bd6f4555f04b7c3f48ef2323ed5117f6eab7 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 7 Sep 2017 09:17:28 +0200 Subject: [PATCH 064/126] added vignette correction via lensfun --- rtengine/rawimagesource.cc | 28 +++++++++++++++++++++++++--- rtengine/rtlensfun.cc | 4 ++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 148d17ee9..c78dcff5f 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -33,6 +33,7 @@ #include "dcp.h" #include "rt_math.h" #include "improcfun.h" +#include "rtlensfun.h" #ifdef _OPENMP #include #endif @@ -1855,11 +1856,32 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le // Correct vignetting of lens profile if (!hasFlatField && lensProf.useVign) { - LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); + std::unique_ptr pmap; + if (lensProf.useLensfun) { + const LFDatabase *db = LFDatabase::getInstance(); + Glib::ustring make, model, lens; + if (lensProf.lfAutoMatch) { + make = idata->getMake(); + model = idata->getModel(); + lens = idata->getLens(); + } else { + make = lensProf.lfCameraMake; + model = lensProf.lfCameraModel; + lens = lensProf.lfLens; + } + LFCamera c = db->findCamera(make, model); + LFLens l = db->findLens(c, lens); + pmap.reset(db->getModifier(c, l, W, H, idata->getFocalLen(), idata->getFNumber(), idata->getFocusDist())); + } else { + LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); - if (pLCPProf) { // don't check focal length to allow distortion correction for lenses without chip, also pass dummy focal length 1 in case of 0 - LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); + if (pLCPProf) { // don't check focal length to allow distortion correction for lenses without chip, also pass dummy focal length 1 in case of 0 + pmap.reset(new LCPMapper(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1)); + } + } + if (pmap) { + LensCorrection &map = *pmap; if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) { if(numFrames == 4) { for(int i = 0; i < 4; ++i) { diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 7d376269d..38e68a4df 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -61,13 +61,13 @@ void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double void LFModifier::processVignetteLine(int width, int y, float *line) const { - // TODO + data_->ApplyColorModification(line, 0, y, width, 1, LF_CR_1(INTENSITY), 0); } void LFModifier::processVignetteLine3Channels(int width, int y, float *line) const { - // TODO + data_->ApplyColorModification(line, 0, y, width, 1, LF_CR_3(RED, GREEN, BLUE), 0); } From 940577ce459d868b399d57033f6d8922275a0026 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 7 Sep 2017 09:57:37 +0200 Subject: [PATCH 065/126] handle coarse rotation in lensfun distortion correction --- rtengine/iptransform.cc | 21 +------------ rtengine/rawimagesource.cc | 15 +-------- rtengine/rtlensfun.cc | 63 ++++++++++++++++++++++++++++++++++---- rtengine/rtlensfun.h | 10 ++++-- 4 files changed, 66 insertions(+), 43 deletions(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index a054cc57a..d36e2b5b9 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -322,26 +322,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, LensCorrection *pLCPMap = nullptr; if (needsLensfun()) { - const LFDatabase *db = LFDatabase::getInstance(); - Glib::ustring make, model, lens; - if (params->lensProf.lfAutoMatch) { - make = metadata->getMake(); - model = metadata->getModel(); - lens = metadata->getLens(); - } else { - make = params->lensProf.lfCameraMake; - model = params->lensProf.lfCameraModel; - lens = params->lensProf.lfLens; - } - LFCamera c = db->findCamera(make, model); - LFLens l = db->findLens(c, lens); - pLCPMap = db->getModifier(c, l, fW, fH, focalLen, fNumber, focusDist); - - std::cout << "LENSFUN:\n" - << " camera: " << c.getDisplayString() << "\n" - << " lens: " << l.getDisplayString() << "\n" - << " correction? " << (pLCPMap ? "yes" : "no") << std::endl; - + pLCPMap = LFDatabase::findModifier(params->lensProf, metadata, fW, fH, params->coarse, rawRotationDeg); } else if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip LCPProfile *pLCPProf = lcpStore->getProfile (params->lensProf.lcpFile); diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index c78dcff5f..de0ab3a9e 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1858,20 +1858,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le if (!hasFlatField && lensProf.useVign) { std::unique_ptr pmap; if (lensProf.useLensfun) { - const LFDatabase *db = LFDatabase::getInstance(); - Glib::ustring make, model, lens; - if (lensProf.lfAutoMatch) { - make = idata->getMake(); - model = idata->getModel(); - lens = idata->getLens(); - } else { - make = lensProf.lfCameraMake; - model = lensProf.lfCameraModel; - lens = lensProf.lfLens; - } - LFCamera c = db->findCamera(make, model); - LFLens l = db->findLens(c, lens); - pmap.reset(db->getModifier(c, l, W, H, idata->getFocalLen(), idata->getFNumber(), idata->getFocusDist())); + pmap.reset(LFDatabase::findModifier(lensProf, idata, W, H, coarse, -1)); } else { LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 38e68a4df..f546fe445 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -19,15 +19,20 @@ */ #include "rtlensfun.h" +#include "settings.h" +#include namespace rtengine { +extern const Settings *settings; + //----------------------------------------------------------------------------- // LFModifier //----------------------------------------------------------------------------- -LFModifier::LFModifier(lfModifier *m): - data_(m) +LFModifier::LFModifier(lfModifier *m, bool swap_xy): + data_(m), + swap_xy_(swap_xy) { } @@ -52,9 +57,17 @@ void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double } float pos[2]; - if (data_->ApplyGeometryDistortion(x+cx, y+cy, 1, 1, pos)) { + float xx = x + cx; + float yy = y + cy; + if (swap_xy_) { + std::swap(xx, yy); + } + if (data_->ApplyGeometryDistortion(xx, yy, 1, 1, pos)) { x = pos[0] - cx; y = pos[1] - cy; + if (swap_xy_) { + std::swap(x, y); + } } } @@ -257,19 +270,57 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c LFModifier *LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, - int width, int height, float focalLen, - float aperture, float focusDist) const + float focalLen, float aperture, float focusDist, + int width, int height, bool swap_xy) const { LFModifier *ret = nullptr; if (data_) { if (camera.ok() && lens.ok()) { lfModifier *mod = lfModifier::Create(lens.data_, camera.getCropFactor(), width, height); mod->Initialize(lens.data_, LF_PF_F32, focalLen, aperture, focusDist > 0 ? focusDist : 1000, 0.0, LF_RECTILINEAR, LF_MODIFY_VIGNETTING | LF_MODIFY_DISTORTION, false); - ret = new LFModifier(mod); + ret = new LFModifier(mod, swap_xy); } } return ret; } + + +LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg) +{ + const LFDatabase *db = getInstance(); + Glib::ustring make, model, lens; + if (lensProf.lfAutoMatch) { + make = idata->getMake(); + model = idata->getModel(); + lens = idata->getLens(); + } else { + make = lensProf.lfCameraMake; + model = lensProf.lfCameraModel; + lens = lensProf.lfLens; + } + LFCamera c = db->findCamera(make, model); + LFLens l = db->findLens(c, lens); + bool swap_xy = false; + if (rawRotationDeg >= 0) { + int rot = (coarse.rotate + rawRotationDeg) % 360; + swap_xy = (rot == 90 || rot == 270); + if (swap_xy) { + std::swap(width, height); + } + } + + LFModifier *ret = db->getModifier(c, l, idata->getFocalLen(), idata->getFNumber(), idata->getFocusDist(), width, height, swap_xy); + + + if (settings->verbose) { + std::cout << "LENSFUN:\n" + << " camera: " << c.getDisplayString() << "\n" + << " lens: " << l.getDisplayString() << "\n" + << " correction? " << (ret ? "yes" : "no") << std::endl; + } + + return ret; +} } // namespace rtengine diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index 434f821fd..4e3280de9 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -24,6 +24,7 @@ #include #include #include "lcp.h" +#include "procparams.h" namespace rtengine { @@ -40,12 +41,13 @@ public: void processVignetteLine3Channels(int width, int y, float *line) const; private: - explicit LFModifier(lfModifier *m); + explicit LFModifier(lfModifier *m, bool rotateXY); LFModifier(const LFModifier &); LFModifier &operator=(const LFModifier &); friend class LFDatabase; lfModifier *data_; + bool swap_xy_; }; class LFCamera { @@ -87,8 +89,10 @@ public: LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const; LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const; LFModifier *getModifier(const LFCamera &camera, const LFLens &lens, - int width, int height, - float focalLen, float aperture, float focusDist) const; + float focalLen, float aperture, float focusDist, + int width, int height, bool swap_xy) const; + + static LFModifier *findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg); private: LFDatabase(); From 642047b2a2677691d05fb76ecf2fea46fe75e747 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 7 Sep 2017 13:41:40 +0200 Subject: [PATCH 066/126] DNG files from HdrMerge are decoded incorrectly when zlib 1.2.11 is used, fixes #3674 --- rtengine/dcraw.cc | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index d6bac40de..264878974 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -25,7 +25,8 @@ /*RT*/#include "jpeg.h" #include "opthelper.h" - +#define BENCHMARK +#include "StopWatch.h" /* dcraw.c -- Dave Coffin's raw photo decoder Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net @@ -9754,7 +9755,40 @@ static void copyFloatDataToInt(float * src, ushort * dst, size_t size, float max fprintf(stderr, "DNG Float: NaN data found in input file\n"); } +static int decompress(size_t srcLen, size_t dstLen, unsigned char *in, unsigned char *out) { + + int ret; + z_stream strm; + /* allocate inflate state */ + strm.zalloc = Z_NULL; + strm.zfree = Z_NULL; + strm.opaque = Z_NULL; + strm.avail_in = 0; + strm.next_in = Z_NULL; + ret = inflateInit(&strm); + if (ret != Z_OK) { + return ret; + } + strm.avail_out = dstLen; + strm.next_out = out; + strm.avail_in = srcLen; + strm.next_in = in; + ret = inflate(&strm, Z_NO_FLUSH); + switch (ret) { + case Z_NEED_DICT: + ret = Z_DATA_ERROR; /* and fall through */ + case Z_DATA_ERROR: + case Z_MEM_ERROR: + (void)inflateEnd(&strm); + return ret; + } + /* clean up and return */ + (void)inflateEnd(&strm); + return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; +} + void CLASS deflate_dng_load_raw() { + BENCHFUN float_raw_image = new float[raw_width * raw_height]; #ifdef _OPENMP @@ -9815,27 +9849,27 @@ void CLASS deflate_dng_load_raw() { } uLongf dstLen = tile_width * tile_length * 4; -#if defined(_OPENMP) && ZLIB_VER_REVISION == 8 +#ifdef _OPENMP #pragma omp parallel #endif { Bytef * cBuffer = new Bytef[maxCompressed]; Bytef * uBuffer = new Bytef[dstLen]; -#if defined(_OPENMP) && ZLIB_VER_REVISION == 8 -#pragma omp for collapse(2) nowait +#ifdef _OPENMP +#pragma omp for collapse(2) schedule(dynamic) nowait #endif for (size_t y = 0; y < raw_height; y += tile_length) { for (size_t x = 0; x < raw_width; x += tile_width) { size_t t = (y / tile_length) * tilesWide + (x / tile_width); -#if defined(_OPENMP) && ZLIB_VER_REVISION == 8 +#ifdef _OPENMP #pragma omp critical #endif { fseek(ifp, tileOffsets[t], SEEK_SET); fread(cBuffer, 1, tileBytes[t], ifp); } - int err = uncompress(uBuffer, &dstLen, cBuffer, tileBytes[t]); + int err = decompress(tileBytes[t], dstLen, cBuffer, uBuffer); if (err != Z_OK) { fprintf(stderr, "DNG Deflate: Failed uncompressing tile %d, with error %d\n", (int)t, err); } else if (ifd->sample_format == 3) { // Floating point data From 50dce7084bb1c72cd700d05c03b609e30a1a635e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 7 Sep 2017 14:45:09 +0200 Subject: [PATCH 067/126] Removed timing code, added comment --- rtengine/dcraw.cc | 59 ++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 264878974..a70c2d2dc 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -25,8 +25,7 @@ /*RT*/#include "jpeg.h" #include "opthelper.h" -#define BENCHMARK -#include "StopWatch.h" + /* dcraw.c -- Dave Coffin's raw photo decoder Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net @@ -9756,6 +9755,8 @@ static void copyFloatDataToInt(float * src, ushort * dst, size_t size, float max } static int decompress(size_t srcLen, size_t dstLen, unsigned char *in, unsigned char *out) { + // At least in zlib 1.2.11 the uncompress function is not thread save while it is thread save in zlib 1.2.8 + // This simple replacement is thread save. Used example code from https://zlib.net/zlib_how.html int ret; z_stream strm; @@ -9788,11 +9789,10 @@ static int decompress(size_t srcLen, size_t dstLen, unsigned char *in, unsigned } void CLASS deflate_dng_load_raw() { - BENCHFUN float_raw_image = new float[raw_width * raw_height]; #ifdef _OPENMP -#pragma omp parallel for + #pragma omp parallel for #endif for (size_t i = 0; i < raw_width * raw_height; ++i) float_raw_image[i] = 0.0f; @@ -9857,36 +9857,37 @@ void CLASS deflate_dng_load_raw() { Bytef * uBuffer = new Bytef[dstLen]; #ifdef _OPENMP -#pragma omp for collapse(2) schedule(dynamic) nowait + #pragma omp for collapse(2) schedule(dynamic) nowait #endif for (size_t y = 0; y < raw_height; y += tile_length) { - for (size_t x = 0; x < raw_width; x += tile_width) { - size_t t = (y / tile_length) * tilesWide + (x / tile_width); + for (size_t x = 0; x < raw_width; x += tile_width) { + size_t t = (y / tile_length) * tilesWide + (x / tile_width); #ifdef _OPENMP -#pragma omp critical + #pragma omp critical #endif -{ - fseek(ifp, tileOffsets[t], SEEK_SET); - fread(cBuffer, 1, tileBytes[t], ifp); -} - int err = decompress(tileBytes[t], dstLen, cBuffer, uBuffer); - if (err != Z_OK) { - fprintf(stderr, "DNG Deflate: Failed uncompressing tile %d, with error %d\n", (int)t, err); - } else if (ifd->sample_format == 3) { // Floating point data - int bytesps = ifd->bps >> 3; - size_t thisTileLength = y + tile_length > raw_height ? raw_height - y : tile_length; - size_t thisTileWidth = x + tile_width > raw_width ? raw_width - x : tile_width; - for (size_t row = 0; row < thisTileLength; ++row) { - Bytef * src = uBuffer + row*tile_width*bytesps; - Bytef * dst = (Bytef *)&float_raw_image[(y+row)*raw_width + x]; - if (predFactor) - decodeFPDeltaRow(src, dst, thisTileWidth, tile_width, bytesps, predFactor); - expandFloats(dst, thisTileWidth, bytesps); - } - } else { // 32-bit Integer data - // TODO + { + fseek(ifp, tileOffsets[t], SEEK_SET); + fread(cBuffer, 1, tileBytes[t], ifp); + } + int err = decompress(tileBytes[t], dstLen, cBuffer, uBuffer); + if (err != Z_OK) { + fprintf(stderr, "DNG Deflate: Failed uncompressing tile %d, with error %d\n", (int)t, err); + } else if (ifd->sample_format == 3) { // Floating point data + int bytesps = ifd->bps >> 3; + size_t thisTileLength = y + tile_length > raw_height ? raw_height - y : tile_length; + size_t thisTileWidth = x + tile_width > raw_width ? raw_width - x : tile_width; + for (size_t row = 0; row < thisTileLength; ++row) { + Bytef * src = uBuffer + row*tile_width*bytesps; + Bytef * dst = (Bytef *)&float_raw_image[(y+row)*raw_width + x]; + if (predFactor) { + decodeFPDeltaRow(src, dst, thisTileWidth, tile_width, bytesps, predFactor); + } + expandFloats(dst, thisTileWidth, bytesps); + } + } else { // 32-bit Integer data + // TODO + } } - } } delete [] cBuffer; From 211d194c265f329f7e3ee3402192b6a968770012 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Thu, 7 Sep 2017 14:54:08 +0200 Subject: [PATCH 068/126] Crop ratio code streamlined by Floessie #4053 --- rtgui/crop.cc | 111 +++++++++++++++++++------------------------------- rtgui/crop.h | 16 ++++---- 2 files changed, 52 insertions(+), 75 deletions(-) diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 5dc5c10d4..546d910ba 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -54,7 +54,43 @@ int notifyListenerUI (void* data) } -Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), opt(0), wDirty(true), hDirty(true), xDirty(true), yDirty(true), lastFixRatio(true) +Crop::Crop(): + FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), + crop_ratios{ + {"3:2", 3.0 / 2.0}, // L1.5, P0.666... + {"4:3", 4.0 / 3.0}, // L1.333..., P0.75 + {"16:9", 16.0 / 9.0}, // L1.777..., P0.5625 + {"16:10", 16.0 / 10.0}, // L1.6, P0.625 + {"1:1", 1.0 / 1.0}, // L1, P1 + {"2:1", 2.0 / 1.0}, // L2, P0.5 + {"3:1", 3.0 / 1.0}, // L3, P0.333... + {"4:1", 4.0 / 1.0}, // L4, P0.25 + {"5:1", 5.0 / 1.0}, // L5, P0.2 + {"6:1", 6.0 / 1.0}, // L6, P0.1666... + {"7:1", 7.0 / 1.0}, // L7, P0.142... + {"4:5", 4.0 / 5.0}, // L1.25, P0.8 + {"5:7", 5.0 / 7.0}, // L1.4, P0.714... + {"6:7", 6.0 / 7.0}, // L1.166..., P0.857... + {"6:17", 6.0 / 17.0}, // L2.833..., P0.352... + {"24:65 - XPAN", 24.0 / 65.0}, // L2.708..., P0.369... + {"1.414 - DIN EN ISO 216", 1.414}, // L1.414, P0.707... + {"3.5:5", 3.5 / 5.0}, // L1.428..., P0.7 + {"8.5:11 - US Letter", 8.5 / 11.0}, // L1.294..., P0.772... + {"9.5:12", 9.5 / 12.0}, // L1.263..., P0.791... + {"10:12", 10.0 / 12.0}, // L1.2, P0.833... + {"11:14", 11.0 / 14.0}, // L1.272..., P0.785... + {"11:17 - Tabloid", 11.0 / 17.0}, // L1.545..., P0.647... + {"13:19", 13.0 / 19.0}, // L1.461..., P0.684... + {"17:22", 17.0 / 22.0}, // L1.294..., P0.772... + {"45:35 - ePassport", 45.0 / 35.0}, // L1.285,... P0.777... + {"64:27", 64.0 / 27.0}, // L2.370..., P0.421... + }, + opt(0), + wDirty(true), + hDirty(true), + xDirty(true), + yDirty(true), + lastFixRatio(true) { clistener = nullptr; @@ -145,70 +181,9 @@ Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), ppi->set_value (300); // ppibox END - /**************** - * Crop Ratio - *****************/ - int NumberOfCropRatios = 27; //!!! change this value when adding new crop ratios - cropratio.resize (NumberOfCropRatios); - // Landscape Portrait - cropratio[0].label = "3:2"; - cropratio[0].value = 3.0 / 2.0; // 1.5 0.666... - cropratio[1].label = "4:3"; - cropratio[1].value = 4.0 / 3.0; // 1.333... 0.75 - cropratio[2].label = "16:9"; - cropratio[2].value = 16.0 / 9.0; // 1.777... 0.5625 - cropratio[3].label = "16:10"; - cropratio[3].value = 16.0 / 10.0; // 1.6 0.625 - cropratio[4].label = "1:1"; - cropratio[4].value = 1.0 / 1.0; // 1 1 - cropratio[5].label = "2:1"; - cropratio[5].value = 2.0 / 1.0; // 2 0.5 - cropratio[6].label = "3:1"; - cropratio[6].value = 3.0 / 1.0; // 3 0.333... - cropratio[7].label = "4:1"; - cropratio[7].value = 4.0 / 1.0; // 4 0.25 - cropratio[8].label = "5:1"; - cropratio[8].value = 5.0 / 1.0; // 5 0.2 - cropratio[9].label = "6:1"; - cropratio[9].value = 6.0 / 1.0; // 6 0.1666... - cropratio[10].label = "7:1"; - cropratio[10].value = 7.0 / 1.0; // 7 0.142 - cropratio[11].label = "4:5"; - cropratio[11].value = 4.0 / 5.0; // 1.25 0.8 - cropratio[12].label = "5:7"; - cropratio[12].value = 5.0 / 7.0; // 1.4 0.714... - cropratio[13].label = "6:7"; - cropratio[13].value = 6.0 / 7.0; // 1,166... 0.857... - cropratio[14].label = "6:17"; - cropratio[14].value = 6.0 / 17.0; // 2.833... 0.352... - cropratio[15].label = "24:65 - XPAN"; - cropratio[15].value = 24.0 / 65.0; // 2.708... 0.369... - cropratio[16].label = "1.414 - DIN EN ISO 216"; - cropratio[16].value = 1.414; // 1.414 0.707... - cropratio[17].label = "3.5:5"; - cropratio[17].value = 3.5 / 5.0; // 1.428 0.7 - cropratio[18].label = "8.5:11 - US Letter"; - cropratio[18].value = 8.5 / 11.0; // 1.294 0.772... - cropratio[19].label = "9.5:12"; - cropratio[19].value = 9.5 / 12.0; // 1.263 0.791... - cropratio[20].label = "10:12"; - cropratio[20].value = 10.0 / 12.0; // 1.2 0.833... - cropratio[21].label = "11:14"; - cropratio[21].value = 11.0 / 14.0; // 1.272... 0.785 - cropratio[22].label = "11:17 - Tabloid"; - cropratio[22].value = 11.0 / 17.0; // 1.545... 0.647... - cropratio[23].label = "13:19"; - cropratio[23].value = 13.0 / 19.0; // 1.461... 0.684 - cropratio[24].label = "17:22"; - cropratio[24].value = 17.0 / 22.0; // 1.294 0.772... - cropratio[25].label = "45:35 - ePassport"; - cropratio[25].value = 45.0 / 35.0; // 1.285 0.777... - cropratio[26].label = "64:27"; - cropratio[26].value = 64.0 / 27.0; // 2.370... 0.421... - - // populate the combobox - for (int i = 0; i < NumberOfCropRatios; i++) { - ratio->append (cropratio[i].label); + // Populate the combobox + for (const auto& crop_ratio : crop_ratios) { + ratio->append (crop_ratio.label); } ratio->set_active (0); @@ -320,7 +295,7 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited) ratio->set_active_text (pp->crop.ratio); fixr->set_active (pp->crop.fixratio); - const bool flip_orientation = pp->crop.fixratio && cropratio[ratio->get_active_row_number()].value < 1.0; + const bool flip_orientation = pp->crop.fixratio && crop_ratios[ratio->get_active_row_number()].value < 1.0; if (pp->crop.orientation == "Landscape") { orientation->set_active (flip_orientation ? 1 : 0); @@ -415,7 +390,7 @@ void Crop::write (ProcParams* pp, ParamsEdited* pedited) pp->crop.ratio = ratio->get_active_text (); // for historical reasons we store orientation different if ratio is written as 2:3 instead of 3:2, but in GUI 'landscape' is always long side horizontal regardless of the ratio is written short or long side first. - const bool flip_orientation = fixr->get_active() && cropratio[ratio->get_active_row_number()].value < 1.0; + const bool flip_orientation = fixr->get_active() && crop_ratios[ratio->get_active_row_number()].value < 1.0; if (orientation->get_active_row_number() == 0) { pp->crop.orientation = flip_orientation ? "Portrait" : "Landscape"; @@ -1289,7 +1264,7 @@ double Crop::getRatio () return r; } - r = cropratio[ratio->get_active_row_number()].value; + r = crop_ratios[ratio->get_active_row_number()].value; if (r < 1.0) { r = 1.0 / r; // convert to long side first (eg 4:5 becomes 5:4) diff --git a/rtgui/crop.h b/rtgui/crop.h index 4c2d7a209..e786d8364 100644 --- a/rtgui/crop.h +++ b/rtgui/crop.h @@ -33,11 +33,6 @@ public: virtual void cropSelectRequested() = 0; }; -struct CropRatio { - Glib::ustring label; - double value; -}; - class Crop final : public ToolParamBlock, public CropGUIListener, @@ -94,6 +89,15 @@ public: void rotateCrop (int deg, bool hflip, bool vflip); private: + struct CropRatio { + Glib::ustring label; + double value; + }; + + const std::vector crop_ratios; + + void adjustCropToRatio(); + Gtk::CheckButton* fixr; MyComboBoxText* ratio; MyComboBoxText* orientation; @@ -116,8 +120,6 @@ private: int lastRotationDeg; sigc::connection xconn, yconn, wconn, hconn, fconn, rconn, oconn, gconn; bool wDirty, hDirty, xDirty, yDirty, lastFixRatio; - void adjustCropToRatio(); - std::vector cropratio; IdleRegister idle_register; }; From 30f62b05609367b56d5e812690c7f29495dd4540 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 7 Sep 2017 16:45:41 +0200 Subject: [PATCH 069/126] added GUI for lensfun --- rtengine/procevents.h | 4 + rtengine/refreshmap.cc | 6 +- rtengine/rtlensfun.cc | 5 +- rtengine/rtlensfun.h | 2 +- rtgui/lensprofile.cc | 282 ++++++++++++++++++++++++++++++++++++++++- rtgui/lensprofile.h | 42 ++++++ 6 files changed, 330 insertions(+), 11 deletions(-) diff --git a/rtengine/procevents.h b/rtengine/procevents.h index cf7f50704..4623b600b 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -511,6 +511,10 @@ enum ProcEvent { EvCATgreensc = 481, EvCATybscen = 482, EvCATAutoyb = 483, + // profiled lens correction new events + EvLensCorrMode = 484, + EvLensCorrLensfunCamera = 488, + EvLensCorrLensfunLens = 489, NUMOFEVENTS diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 5400a2e47..74eda6110 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -510,8 +510,10 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvCATtempsc LUMINANCECURVE, // EvCATgreensc LUMINANCECURVE, // EvCATybscen - LUMINANCECURVE // EvCATAutoyb - + LUMINANCECURVE, // EvCATAutoyb + DARKFRAME, // EvLensCorrMode + DARKFRAME, // EvLensCorrLensfunCamera + DARKFRAME // EvLensCorrLensfunLens }; diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index f546fe445..31392698d 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -215,17 +215,16 @@ std::vector LFDatabase::getCameras() const } -std::vector LFDatabase::getLenses(const LFCamera &camera) const +std::vector LFDatabase::getLenses() const { std::vector ret; if (data_) { - auto lenses = data_->FindLenses(camera.data_, NULL, "", LF_SEARCH_LOOSE /*| LF_SEARCH_SORT_AND_UNIQUIFY*/); + auto lenses = data_->GetLenses(); while (*lenses) { ret.emplace_back(LFLens()); ret.back().data_ = *lenses; ++lenses; } - lf_free(lenses); } return ret; } diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index 4e3280de9..d02535623 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -85,7 +85,7 @@ public: ~LFDatabase(); std::vector getCameras() const; - std::vector getLenses(const LFCamera &camera) const; + std::vector getLenses() const; LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const; LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const; LFModifier *getModifier(const LFCamera &camera, const LFLens &lens, diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 0855ef03f..82e156199 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -22,15 +22,66 @@ #include "../rtengine/lcp.h" #include #include "rtimage.h" +#include "../rtengine/rtlensfun.h" +#include +#include using namespace rtengine; using namespace rtengine::procparams; -LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")), lcpFileChanged(false), useDistChanged(false), useVignChanged(false), useCAChanged(false), isRaw(true), lensgeomLcpFill(nullptr) +LensProfilePanel::LensProfilePanel () : + FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")), + lcpFileChanged(false), + useDistChanged(false), + useVignChanged(false), + useCAChanged(false), + isRaw(true), + lensgeomLcpFill(nullptr), + useLensfunChanged(false), + lensfunAutoChanged(false), + lensfunCameraChanged(false), + lensfunLensChanged(false) { - hbLCPFile = Gtk::manage(new Gtk::HBox()); + corrOff = Gtk::manage(new Gtk::RadioButton(M("LENSPROFILE_CORRECTION_OFF"))); + pack_start(*corrOff); - lLCPFileHead = Gtk::manage(new Gtk::Label(M("GENERAL_FILE"))); + corrGroup = corrOff->get_group(); + + corrLensfunAuto = Gtk::manage(new Gtk::RadioButton(corrGroup, M("LENSPROFILE_CORRECTION_AUTOMATCH"))); + pack_start(*corrLensfunAuto); + + corrLensfunManual = Gtk::manage(new Gtk::RadioButton(corrGroup, M("LENSPROFILE_CORRECTION_MANUAL"))); + pack_start(*corrLensfunManual); + + lensfunCameraModel = Gtk::TreeStore::create(lensfunModelCam); + lensfunLensModel = Gtk::TreeStore::create(lensfunModelLens); + + lensfunCameras = Gtk::manage(new MyComboBox()); + lensfunCameras->set_model(lensfunCameraModel); + lensfunCameras->pack_start(lensfunModelCam.model); + lensfunLenses = Gtk::manage(new MyComboBox()); + lensfunLenses->set_model(lensfunLensModel); + lensfunLenses->pack_start(lensfunModelLens.lens); + + Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); + hb->pack_start(*Gtk::manage(new Gtk::Label(M("LENSFUN_CAMERA"))), Gtk::PACK_SHRINK, 4); + hb->pack_start(*lensfunCameras); + pack_start(*hb); + + fillLensfunCameras(); + + hb = Gtk::manage(new Gtk::HBox()); + hb->pack_start(*Gtk::manage(new Gtk::Label(M("LENSFUN_LENS"))), Gtk::PACK_SHRINK, 4); + hb->pack_start(*lensfunLenses); + pack_start(*hb); + + fillLensfunLenses(); + + corrLcpFile = Gtk::manage(new Gtk::RadioButton(corrGroup)); + hbLCPFile = Gtk::manage(new Gtk::HBox()); + hbLCPFile->pack_start(*corrLcpFile, Gtk::PACK_SHRINK); + + lLCPFileHead = Gtk::manage(new Gtk::Label(M("LENSPROFILE_CORRECTION_LCPFILE"))); hbLCPFile->pack_start(*lLCPFileHead, Gtk::PACK_SHRINK, 4); fcbLCPFile = Gtk::manage(new MyFileChooserButton(M("TP_LENSPROFILE_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN)); @@ -74,6 +125,13 @@ LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("T ckbUseVign->signal_toggled().connect( sigc::mem_fun(*this, &LensProfilePanel::onUseVignChanged) ); ckbUseCA->signal_toggled().connect( sigc::mem_fun(*this, &LensProfilePanel::onUseCAChanged) ); + lensfunCameras->signal_changed().connect(sigc::mem_fun(*this, &LensProfilePanel::onLensfunCameraChanged)); + lensfunLenses->signal_changed().connect(sigc::mem_fun(*this, &LensProfilePanel::onLensfunLensChanged)); + corrOff->signal_toggled().connect(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged)); + corrLensfunAuto->signal_toggled().connect(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged)); + corrLensfunManual->signal_toggled().connect(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged)); + corrLcpFile->signal_toggled().connect(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged)); + allowFocusDep = true; } @@ -82,7 +140,15 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa disableListener (); conUseDist.block(true); - if (!pp->lensProf.lcpFile.empty() && lcpStore->isValidLCPFileName(pp->lensProf.lcpFile)) { + corrOff->set_active(true); + if (pp->lensProf.useLensfun) { + if (pp->lensProf.lfAutoMatch) { + corrLensfunAuto->set_active(true); + } else { + corrLensfunManual->set_active(true); + } + } else if (!pp->lensProf.lcpFile.empty() && lcpStore->isValidLCPFileName(pp->lensProf.lcpFile)) { + corrLcpFile->set_active(true); fcbLCPFile->set_filename (pp->lensProf.lcpFile); updateDisabled(true); } else { @@ -104,7 +170,48 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa ckbUseVign->set_active (pp->lensProf.useVign && isRaw); ckbUseCA->set_active (pp->lensProf.useCA && isRaw); + if (!pp->lensProf.lfCameraMake.empty() && !pp->lensProf.lfCameraModel.empty()) { + // search for the active row + for (auto row : lensfunCameraModel->children()) { + if (row[lensfunModelCam.make] == pp->lensProf.lfCameraMake) { + auto &c = row.children(); + for (auto it = c.begin(), end = c.end(); it != end; ++it) { + auto &childrow = *it; + if (childrow[lensfunModelCam.model] == pp->lensProf.lfCameraModel) { + lensfunCameras->set_active(it); + break; + } + } + break; + } + } + } + + if (!pp->lensProf.lfLens.empty()) { + // search for the active row + auto pos = pp->lensProf.lfLens.find_first_of(' '); + Glib::ustring make = "(Unknown)"; + if (pos != Glib::ustring::npos) { + make = pp->lensProf.lfLens.substr(0, pos); + } + + for (auto row : lensfunCameraModel->children()) { + if (row[lensfunModelLens.lens] == make) { + auto &c = row.children(); + for (auto it = c.begin(), end = c.end(); it != end; ++it) { + auto &childrow = *it; + if (childrow[lensfunModelLens.lens] == pp->lensProf.lfLens) { + lensfunLenses->set_active(it); + break; + } + } + break; + } + } + } + lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; + useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; enableListener (); conUseDist.block(false); @@ -128,7 +235,7 @@ void LensProfilePanel::setRawMeta(bool raw, const rtengine::ImageMetaData* pMeta void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) { - if (lcpStore->isValidLCPFileName(fcbLCPFile->get_filename())) { + if (corrLcpFile->get_active() && lcpStore->isValidLCPFileName(fcbLCPFile->get_filename())) { pp->lensProf.lcpFile = fcbLCPFile->get_filename(); } else { pp->lensProf.lcpFile = ""; @@ -138,11 +245,33 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited pp->lensProf.useVign = ckbUseVign->get_active(); pp->lensProf.useCA = ckbUseCA->get_active(); + pp->lensProf.useLensfun = corrLensfunAuto->get_active() || corrLensfunManual->get_active(); + pp->lensProf.lfAutoMatch = corrLensfunAuto->get_active(); + auto itc = lensfunCameras->get_active(); + if (itc) { + pp->lensProf.lfCameraMake = (*itc)[lensfunModelCam.make]; + pp->lensProf.lfCameraModel = (*itc)[lensfunModelCam.model]; + } else { + pp->lensProf.lfCameraMake = ""; + pp->lensProf.lfCameraModel = ""; + } + auto itl = lensfunLenses->get_active(); + if (itl) { + pp->lensProf.lfLens = (*itl)[lensfunModelLens.lens]; + } else { + pp->lensProf.lfLens = ""; + } + if (pedited) { pedited->lensProf.lcpFile = lcpFileChanged; pedited->lensProf.useDist = useDistChanged; pedited->lensProf.useVign = useVignChanged; pedited->lensProf.useCA = useCAChanged; + pedited->lensProf.useLensfun = useLensfunChanged; + pedited->lensProf.lfAutoMatch = lensfunAutoChanged; + pedited->lensProf.lfCameraMake = lensfunCameraChanged; + pedited->lensProf.lfCameraModel = lensfunCameraChanged; + pedited->lensProf.lfLens = lensfunLensChanged; } } @@ -199,3 +328,146 @@ void LensProfilePanel::updateDisabled(bool enable) ckbUseVign->set_sensitive(enable && isRaw); ckbUseCA->set_sensitive(enable && allowFocusDep); } + +void LensProfilePanel::setBatchMode(bool yes) +{ + FoldableToolPanel::setBatchMode(yes); +} + + +void LensProfilePanel::fillLensfunCameras() +{ + std::map> camnames; + auto camlist = LFDatabase::getInstance()->getCameras(); + for (auto &c : camlist) { + camnames[c.getMake()].insert(c.getModel()); + } + for (auto &p : camnames) { + Gtk::TreeModel::Row row = *(lensfunCameraModel->append()); + row[lensfunModelCam.make] = p.first; + row[lensfunModelCam.model] = ""; + for (auto &c : p.second) { + Gtk::TreeModel::Row child = *(lensfunCameraModel->append(row.children())); + child[lensfunModelCam.make] = p.first; + child[lensfunModelCam.model] = c; + } + } +} + + +void LensProfilePanel::fillLensfunLenses() +{ + std::map> lenses; + auto lenslist = LFDatabase::getInstance()->getLenses(); + for (auto &l : lenslist) { + auto name = l.getDisplayString(); + auto pos = name.find_first_of(' '); + Glib::ustring make = "(Unknown)"; + if (pos != Glib::ustring::npos) { + make = name.substr(0, pos); + } + lenses[make].insert(name); + } + for (auto &p : lenses) { + Gtk::TreeModel::Row row = *(lensfunLensModel->append()); + row[lensfunModelLens.lens] = p.first; + for (auto &c : p.second) { + Gtk::TreeModel::Row child = *(lensfunLensModel->append(row.children())); + child[lensfunModelLens.lens] = c; + } + } +} + + +void LensProfilePanel::onLensfunCameraChanged() +{ + auto iter = lensfunCameras->get_active(); + + if (iter) { + lensfunCameraChanged = true; + + if (listener) { + Glib::ustring name = (*iter)[lensfunModelCam.model]; + listener->panelChanged(EvLensCorrLensfunCamera, name); + } + } +} + + +void LensProfilePanel::onLensfunLensChanged() +{ + auto iter = lensfunLenses->get_active(); + + if (iter) { + lensfunLensChanged = true; + + if (listener) { + Glib::ustring name = (*iter)[lensfunModelLens.lens]; + listener->panelChanged(EvLensCorrLensfunLens, name); + } + } +} + + +void LensProfilePanel::onCorrModeChanged() +{ + Glib::ustring mode; + + if (corrOff->get_active()) { + useLensfunChanged = true; + lcpFileChanged = true; + + lensfunCameras->set_sensitive(false); + lensfunLenses->set_sensitive(false); + ckbUseDist->set_sensitive(false); + ckbUseVign->set_sensitive(false); + ckbUseCA->set_sensitive(false); + + mode = M("LENSPROFILE_CORRECTION_OFF"); + } else if (corrLensfunAuto->get_active()) { + useLensfunChanged = true; + lcpFileChanged = true; + useDistChanged = true; + useVignChanged = true; + + lensfunCameras->set_sensitive(false); + lensfunLenses->set_sensitive(false); + + ckbUseDist->set_sensitive(true); + ckbUseVign->set_sensitive(true); + ckbUseCA->set_sensitive(false); + + mode = M("LENSPROFILE_CORRECTION_AUTOMATCH"); + } else if (corrLensfunManual->get_active()) { + useLensfunChanged = true; + lcpFileChanged = true; + lcpFileChanged = true; + useDistChanged = true; + useVignChanged = true; + + lensfunCameras->set_sensitive(true); + lensfunLenses->set_sensitive(true); + + ckbUseDist->set_sensitive(true); + ckbUseVign->set_sensitive(true); + ckbUseCA->set_sensitive(false); + + mode = M("LENSPROFILE_CORRECTION_MANUAL"); + } else if (corrLcpFile->get_active()) { + useLensfunChanged = true; + lcpFileChanged = true; + lcpFileChanged = true; + useDistChanged = true; + useVignChanged = true; + + lensfunCameras->set_sensitive(false); + lensfunLenses->set_sensitive(false); + updateDisabled(true); + + mode = M("LENSPROFILE_CORRECTION_LCPFILE"); + } + + if (listener) { + listener->panelChanged(EvLensCorrMode, mode); + } +} diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index 9543721a0..34222932e 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -41,6 +41,42 @@ protected: bool isRaw; LensGeometry *lensgeomLcpFill; + Gtk::RadioButton::Group corrGroup; + Gtk::RadioButton *corrOff; + Gtk::RadioButton *corrLensfunAuto; + Gtk::RadioButton *corrLensfunManual; + Gtk::RadioButton *corrLcpFile; + Gtk::RadioButton *corrUnchanged; + MyComboBox *lensfunCameras; + MyComboBox *lensfunLenses; + + class LFModelCam: public Gtk::TreeModel::ColumnRecord { + public: + LFModelCam() { add(make); add(model); } + Gtk::TreeModelColumn make; + Gtk::TreeModelColumn model; + }; + + class LFModelLens: public Gtk::TreeModel::ColumnRecord { + public: + LFModelLens() { add(lens); } + Gtk::TreeModelColumn lens; + }; + + LFModelCam lensfunModelCam; + LFModelLens lensfunModelLens; + + Glib::RefPtr lensfunCameraModel; + Glib::RefPtr lensfunLensModel; + + bool useLensfunChanged; + bool lensfunAutoChanged; + bool lensfunCameraChanged; + bool lensfunLensChanged; + + void fillLensfunCameras(); + void fillLensfunLenses(); + public: LensProfilePanel (); @@ -58,6 +94,12 @@ public: { lensgeomLcpFill = foo ; }; + + void setBatchMode(bool yes); + + void onLensfunCameraChanged(); + void onLensfunLensChanged(); + void onCorrModeChanged(); }; #endif From f3ae370ea7be2fb25ae74a03301fbc93f2e8f6aa Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 7 Sep 2017 16:53:53 +0200 Subject: [PATCH 070/126] fixed bug in passing image dimensions to the lensfun correction engine --- rtengine/iptransform.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index d36e2b5b9..2226c493b 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -322,7 +322,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, LensCorrection *pLCPMap = nullptr; if (needsLensfun()) { - pLCPMap = LFDatabase::findModifier(params->lensProf, metadata, fW, fH, params->coarse, rawRotationDeg); + pLCPMap = LFDatabase::findModifier(params->lensProf, metadata, oW, oH, params->coarse, rawRotationDeg); } else if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip LCPProfile *pLCPProf = lcpStore->getProfile (params->lensProf.lcpFile); From 9bfd2d60d3a24064f6c3161410bf42f195351c55 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 7 Sep 2017 17:50:33 +0200 Subject: [PATCH 071/126] fixed update of lensfun-related procparams after editing --- rtgui/lensprofile.cc | 9 ++++++--- rtgui/paramsedited.cc | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 82e156199..7ac67e106 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -140,7 +140,6 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa disableListener (); conUseDist.block(true); - corrOff->set_active(true); if (pp->lensProf.useLensfun) { if (pp->lensProf.lfAutoMatch) { corrLensfunAuto->set_active(true); @@ -164,6 +163,8 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa } updateDisabled(false); + + corrOff->set_active(true); } ckbUseDist->set_active (pp->lensProf.useDist); @@ -415,6 +416,7 @@ void LensProfilePanel::onCorrModeChanged() if (corrOff->get_active()) { useLensfunChanged = true; + lensfunAutoChanged = true; lcpFileChanged = true; lensfunCameras->set_sensitive(false); @@ -426,6 +428,7 @@ void LensProfilePanel::onCorrModeChanged() mode = M("LENSPROFILE_CORRECTION_OFF"); } else if (corrLensfunAuto->get_active()) { useLensfunChanged = true; + lensfunAutoChanged = true; lcpFileChanged = true; useDistChanged = true; useVignChanged = true; @@ -440,7 +443,7 @@ void LensProfilePanel::onCorrModeChanged() mode = M("LENSPROFILE_CORRECTION_AUTOMATCH"); } else if (corrLensfunManual->get_active()) { useLensfunChanged = true; - lcpFileChanged = true; + lensfunAutoChanged = true; lcpFileChanged = true; useDistChanged = true; useVignChanged = true; @@ -455,7 +458,7 @@ void LensProfilePanel::onCorrModeChanged() mode = M("LENSPROFILE_CORRECTION_MANUAL"); } else if (corrLcpFile->get_active()) { useLensfunChanged = true; - lcpFileChanged = true; + lensfunAutoChanged = true; lcpFileChanged = true; useDistChanged = true; useVignChanged = true; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 588006eca..e5c995f90 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -2078,6 +2078,26 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.lensProf.useCA = mods.lensProf.useCA; } + if (lensProf.useLensfun) { + toEdit.lensProf.useLensfun = mods.lensProf.useLensfun; + } + + if (lensProf.lfAutoMatch) { + toEdit.lensProf.lfAutoMatch = mods.lensProf.lfAutoMatch; + } + + if (lensProf.lfCameraMake) { + toEdit.lensProf.lfCameraMake = mods.lensProf.lfCameraMake; + } + + if (lensProf.lfCameraModel) { + toEdit.lensProf.lfCameraModel = mods.lensProf.lfCameraModel; + } + + if (lensProf.lfLens) { + toEdit.lensProf.lfLens = mods.lensProf.lfLens; + } + if (perspective.horizontal) { toEdit.perspective.horizontal = dontforceSet && options.baBehav[ADDSET_PERSPECTIVE] ? toEdit.perspective.horizontal + mods.perspective.horizontal : mods.perspective.horizontal; } From c8d9573606527f7eb10721a796899e1599a578b0 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 7 Sep 2017 18:04:55 +0200 Subject: [PATCH 072/126] disable the selection of lensfun auto mode if no match is found in the db --- rtdata/languages/default | 6 +++++- rtgui/lensprofile.cc | 18 ++++++++++++++++-- rtgui/lensprofile.h | 1 + 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 91eb5e2bf..083afc4df 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1654,7 +1654,7 @@ TP_LABCURVE_RSTPRO_TOOLTIP;Works on the Chromaticity slider and the CC curve. TP_LENSGEOM_AUTOCROP;Auto-Crop TP_LENSGEOM_FILL;Auto-fill TP_LENSGEOM_LABEL;Lens / Geometry -TP_LENSPROFILE_LABEL;Lens Correction Profile +TP_LENSPROFILE_LABEL;Profiled Lens Correction TP_LENSPROFILE_USECA;Chromatic aberration correction TP_LENSPROFILE_USEDIST;Distortion correction TP_LENSPROFILE_USEVIGN;Vignetting correction @@ -2152,3 +2152,7 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f ZOOMPANEL_ZOOMFITSCREEN;Fit whole image to screen\nShortcut: f ZOOMPANEL_ZOOMIN;Zoom In\nShortcut: + ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: - +LENSPROFILE_CORRECTION_OFF;None +LENSPROFILE_CORRECTION_AUTOMATCH;Auto-matched correction parameters +LENSPROFILE_CORRECTION_MANUAL;Manual correction parameters +LENSPROFILE_CORRECTION_LCPFILE;LCP File diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 7ac67e106..bd518ffe0 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -36,6 +36,7 @@ LensProfilePanel::LensProfilePanel () : useVignChanged(false), useCAChanged(false), isRaw(true), + metadata(nullptr), lensgeomLcpFill(nullptr), useLensfunChanged(false), lensfunAutoChanged(false), @@ -64,14 +65,14 @@ LensProfilePanel::LensProfilePanel () : lensfunLenses->pack_start(lensfunModelLens.lens); Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); - hb->pack_start(*Gtk::manage(new Gtk::Label(M("LENSFUN_CAMERA"))), Gtk::PACK_SHRINK, 4); + hb->pack_start(*Gtk::manage(new Gtk::Label(M("EXIFFILTER_CAMERA"))), Gtk::PACK_SHRINK, 4); hb->pack_start(*lensfunCameras); pack_start(*hb); fillLensfunCameras(); hb = Gtk::manage(new Gtk::HBox()); - hb->pack_start(*Gtk::manage(new Gtk::Label(M("LENSFUN_LENS"))), Gtk::PACK_SHRINK, 4); + hb->pack_start(*Gtk::manage(new Gtk::Label(M("EXIFFILTER_LENS"))), Gtk::PACK_SHRINK, 4); hb->pack_start(*lensfunLenses); pack_start(*hb); @@ -140,6 +141,8 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa disableListener (); conUseDist.block(true); + corrLensfunAuto->set_sensitive(true); + if (pp->lensProf.useLensfun) { if (pp->lensProf.lfAutoMatch) { corrLensfunAuto->set_active(true); @@ -214,6 +217,16 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; + if (!batchMode && metadata && pp->lensProf.useLensfun) { + std::unique_ptr mod(LFDatabase::findModifier(pp->lensProf, metadata, 100, 100, pp->coarse, -1)); + if (!mod) { + corrOff->set_active(true); + if (pp->lensProf.lfAutoMatch) { + corrLensfunAuto->set_sensitive(false); + } + } + } + enableListener (); conUseDist.block(false); } @@ -232,6 +245,7 @@ void LensProfilePanel::setRawMeta(bool raw, const rtengine::ImageMetaData* pMeta } isRaw = raw; + metadata = pMeta; } void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index 34222932e..11e3bb219 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -39,6 +39,7 @@ protected: void updateDisabled(bool enable); bool allowFocusDep; bool isRaw; + const rtengine::ImageMetaData* metadata; LensGeometry *lensgeomLcpFill; Gtk::RadioButton::Group corrGroup; From 80c58f5014a9e7767b80581df868d22ca95c5717 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 7 Sep 2017 20:30:03 +0200 Subject: [PATCH 073/126] Fix artifacts in raw ca correction when width of raw is odd --- rtengine/CA_correct_RT.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtengine/CA_correct_RT.cc b/rtengine/CA_correct_RT.cc index 1df27c5fb..7f2829b1c 100644 --- a/rtengine/CA_correct_RT.cc +++ b/rtengine/CA_correct_RT.cc @@ -134,12 +134,12 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const } // local variables - const int width = W, height = H; + const int width = W + (W & 1), height = H; //temporary array to store simple interpolation of G - float *Gtmp = (float (*)) malloc ((height * width + ((height * width) & 1)) / 2 * sizeof * Gtmp); + float *Gtmp = (float (*)) malloc ((height * width) / 2 * sizeof * Gtmp); // temporary array to avoid race conflicts, only every second pixel needs to be saved here - float *RawDataTmp = (float*) malloc( (height * width + ((height * width) & 1)) * sizeof(float) / 2); + float *RawDataTmp = (float*) malloc( (height * width) * sizeof(float) / 2); float blockave[2][2] = {{0, 0}, {0, 0}}, blocksqave[2][2] = {{0, 0}, {0, 0}}, blockdenom[2][2] = {{0, 0}, {0, 0}}, blockvar[2][2]; From 0b8900cf1bc8addb005d93629e3c4a0a50f2733e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 8 Sep 2017 00:02:21 +0200 Subject: [PATCH 074/126] Fix warning when compiling CA_correct_RT.cc without __SSE2__ being defined --- rtengine/CA_correct_RT.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/CA_correct_RT.cc b/rtengine/CA_correct_RT.cc index 7f2829b1c..ec598b6ca 100644 --- a/rtengine/CA_correct_RT.cc +++ b/rtengine/CA_correct_RT.cc @@ -1024,9 +1024,9 @@ void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const int c = FC(rr, cc); int GRBdir0 = GRBdir[0][c]; int GRBdir1 = GRBdir[1][c]; +#ifdef __SSE2__ vfloat shifthfracc = F2V(shifthfrac[c]); vfloat shiftvfracc = F2V(shiftvfrac[c]); -#ifdef __SSE2__ for (int indx = rr * ts + cc; cc < cc1 - 14; cc += 8, indx += 8) { //interpolate colour difference from optical R/B locations to grid locations vfloat grbdiffinthfloor = vintpf(shifthfracc, LVFU(grbdiff[(indx - GRBdir1) >> 1]), LVFU(grbdiff[indx >> 1])); From bece5d19ed288c37efb8e0bc2ca47b5eb3ecadbb Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 8 Sep 2017 09:35:49 +0200 Subject: [PATCH 075/126] fixed bug in showing the list of cameras in the lensfun db --- rtgui/lensprofile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index bd518ffe0..6f901946e 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -360,7 +360,7 @@ void LensProfilePanel::fillLensfunCameras() for (auto &p : camnames) { Gtk::TreeModel::Row row = *(lensfunCameraModel->append()); row[lensfunModelCam.make] = p.first; - row[lensfunModelCam.model] = ""; + row[lensfunModelCam.model] = p.first; for (auto &c : p.second) { Gtk::TreeModel::Row child = *(lensfunCameraModel->append(row.children())); child[lensfunModelCam.make] = p.first; From 266efa40aed70fef6d64427bdbb7f26eff71cd65 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 8 Sep 2017 11:24:10 +0200 Subject: [PATCH 076/126] fixed lensfun-based distortion correction for pictures in portrait orientation --- rtengine/rtlensfun.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 31392698d..3900d4ee9 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -63,11 +63,13 @@ void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double std::swap(xx, yy); } if (data_->ApplyGeometryDistortion(xx, yy, 1, 1, pos)) { - x = pos[0] - cx; - y = pos[1] - cy; + x = pos[0]; + y = pos[1]; if (swap_xy_) { std::swap(x, y); } + x -= cx; + y -= cy; } } From 5a37c38bfba2736ff408c7f6be7f5022fff852ce Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 8 Sep 2017 17:45:18 +0200 Subject: [PATCH 077/126] update the lens correction when selecting a camera/lens combination manually --- rtengine/procevents.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 4623b600b..5f30374ee 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -513,8 +513,8 @@ enum ProcEvent { EvCATAutoyb = 483, // profiled lens correction new events EvLensCorrMode = 484, - EvLensCorrLensfunCamera = 488, - EvLensCorrLensfunLens = 489, + EvLensCorrLensfunCamera = 485, + EvLensCorrLensfunLens = 486, NUMOFEVENTS From b2232f3843da25e706d64ebd14fb4b2ccf138f0b Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 8 Sep 2017 18:02:34 +0200 Subject: [PATCH 078/126] improved logic for auto-matching lensfun correction (esp. with fixed-lens cameras) --- rtengine/rtlensfun.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 3900d4ee9..1122fdd89 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -250,7 +250,13 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c { LFLens ret; if (data_) { - auto found = data_->FindLenses(camera.data_, NULL, name.c_str(), LF_SEARCH_LOOSE); + const char *lname = name.c_str(); + const lfCamera *cam = nullptr; + if (name.empty() || name.find("Unknown ") == 0) { + lname = "Standard"; + cam = camera.data_; + } + auto found = data_->FindLenses(cam, nullptr, lname, LF_SEARCH_LOOSE); if (!found) { // try to split the maker from the model of the lens Glib::ustring make, model; @@ -258,7 +264,7 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c if (i != Glib::ustring::npos) { make = name.substr(0, i); model = name.substr(i+1); - found = data_->FindLenses(camera.data_, make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + found = data_->FindLenses(cam, make.c_str(), model.c_str(), LF_SEARCH_LOOSE); } } if (found) { From cbae5e07189d630536fe29f45f8ed9d121f573df Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 8 Sep 2017 23:52:16 +0200 Subject: [PATCH 079/126] further tweaks to the lensfun automatching logic --- rtengine/rtlensfun.cc | 52 +++++++++++++++++++++++++++++++++---------- rtengine/rtlensfun.h | 9 +++++--- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 1122fdd89..4e2216fc0 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -30,9 +30,10 @@ extern const Settings *settings; // LFModifier //----------------------------------------------------------------------------- -LFModifier::LFModifier(lfModifier *m, bool swap_xy): +LFModifier::LFModifier(lfModifier *m, bool swap_xy, int flags): data_(m), - swap_xy_(swap_xy) + swap_xy_(swap_xy), + flags_(flags) { } @@ -86,6 +87,31 @@ void LFModifier::processVignetteLine3Channels(int width, int y, float *line) con } +Glib::ustring LFModifier::getDisplayString() const +{ + if (!data_) { + return "NONE"; + } else { + Glib::ustring ret; + Glib::ustring sep = ""; + if (flags_ & LF_MODIFY_DISTORTION) { + ret += "distortion"; + sep = ", "; + } + if (flags_ & LF_MODIFY_VIGNETTING) { + ret += sep; + ret += "vignetting"; + sep = ", "; + } + if (flags_ & LF_MODIFY_SCALE) { + ret += sep; + ret += "autoscaling"; + } + return ret; + } +} + + //----------------------------------------------------------------------------- // LFCamera //----------------------------------------------------------------------------- @@ -158,7 +184,7 @@ bool LFLens::ok() const } -Glib::ustring LFLens::getDisplayString() const +Glib::ustring LFLens::getLens() const { if (data_) { return Glib::ustring::compose("%1 %2", data_->Maker, data_->Model); @@ -251,12 +277,11 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c LFLens ret; if (data_) { const char *lname = name.c_str(); - const lfCamera *cam = nullptr; - if (name.empty() || name.find("Unknown ") == 0) { + bool stdlens = camera.ok() && (name.empty() || name.find("Unknown ") == 0); + if (stdlens) { lname = "Standard"; - cam = camera.data_; } - auto found = data_->FindLenses(cam, nullptr, lname, LF_SEARCH_LOOSE); + auto found = data_->FindLenses(camera.data_, nullptr, lname, LF_SEARCH_LOOSE); if (!found) { // try to split the maker from the model of the lens Glib::ustring make, model; @@ -264,12 +289,14 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c if (i != Glib::ustring::npos) { make = name.substr(0, i); model = name.substr(i+1); - found = data_->FindLenses(cam, make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + found = data_->FindLenses(camera.data_, make.c_str(), model.c_str(), LF_SEARCH_LOOSE); } } if (found) { ret.data_ = found[0]; lf_free(found); + } else if (camera.ok() && !stdlens) { + ret = findLens(LFCamera(), name); } } return ret; @@ -281,11 +308,11 @@ LFModifier *LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, int width, int height, bool swap_xy) const { LFModifier *ret = nullptr; - if (data_) { + if (data_ && focalLen > 0) { if (camera.ok() && lens.ok()) { lfModifier *mod = lfModifier::Create(lens.data_, camera.getCropFactor(), width, height); - mod->Initialize(lens.data_, LF_PF_F32, focalLen, aperture, focusDist > 0 ? focusDist : 1000, 0.0, LF_RECTILINEAR, LF_MODIFY_VIGNETTING | LF_MODIFY_DISTORTION, false); - ret = new LFModifier(mod, swap_xy); + int flags = mod->Initialize(lens.data_, LF_PF_F32, focalLen, aperture, focusDist > 0 ? focusDist : 1000, 0.0, LF_RECTILINEAR, LF_MODIFY_VIGNETTING | LF_MODIFY_DISTORTION | LF_MODIFY_SCALE, false); + ret = new LFModifier(mod, swap_xy, flags); } } return ret; @@ -323,7 +350,8 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image std::cout << "LENSFUN:\n" << " camera: " << c.getDisplayString() << "\n" << " lens: " << l.getDisplayString() << "\n" - << " correction? " << (ret ? "yes" : "no") << std::endl; + << " correction: " + << (ret ? ret->getDisplayString() : "NONE") << std::endl; } return ret; diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index d02535623..4e2064332 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -39,15 +39,18 @@ public: void correctCA(double &x, double &y, int channel) const {} void processVignetteLine(int width, int y, float *line) const; void processVignetteLine3Channels(int width, int y, float *line) const; + + Glib::ustring getDisplayString() const; private: - explicit LFModifier(lfModifier *m, bool rotateXY); + explicit LFModifier(lfModifier *m, bool swap_xy, int flags); LFModifier(const LFModifier &); LFModifier &operator=(const LFModifier &); friend class LFDatabase; lfModifier *data_; bool swap_xy_; + int flags_; }; class LFCamera { @@ -70,8 +73,8 @@ class LFLens { public: LFLens(); bool ok() const; - - Glib::ustring getDisplayString() const; + Glib::ustring getLens() const; + Glib::ustring getDisplayString() const { return getLens(); } private: friend class LFDatabase; const lfLens *data_; From 58ec1e316ba330417b54b3f5c84a0e5ee3758c96 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 8 Sep 2017 23:52:43 +0200 Subject: [PATCH 080/126] show the auto-matched lensfun camera/lens pair in the gui --- rtgui/lensprofile.cc | 98 ++++++++++++++++++++++++++------------------ rtgui/lensprofile.h | 2 + 2 files changed, 61 insertions(+), 39 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 6f901946e..1386469a9 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -174,45 +174,8 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa ckbUseVign->set_active (pp->lensProf.useVign && isRaw); ckbUseCA->set_active (pp->lensProf.useCA && isRaw); - if (!pp->lensProf.lfCameraMake.empty() && !pp->lensProf.lfCameraModel.empty()) { - // search for the active row - for (auto row : lensfunCameraModel->children()) { - if (row[lensfunModelCam.make] == pp->lensProf.lfCameraMake) { - auto &c = row.children(); - for (auto it = c.begin(), end = c.end(); it != end; ++it) { - auto &childrow = *it; - if (childrow[lensfunModelCam.model] == pp->lensProf.lfCameraModel) { - lensfunCameras->set_active(it); - break; - } - } - break; - } - } - } - - if (!pp->lensProf.lfLens.empty()) { - // search for the active row - auto pos = pp->lensProf.lfLens.find_first_of(' '); - Glib::ustring make = "(Unknown)"; - if (pos != Glib::ustring::npos) { - make = pp->lensProf.lfLens.substr(0, pos); - } - - for (auto row : lensfunCameraModel->children()) { - if (row[lensfunModelLens.lens] == make) { - auto &c = row.children(); - for (auto it = c.begin(), end = c.end(); it != end; ++it) { - auto &childrow = *it; - if (childrow[lensfunModelLens.lens] == pp->lensProf.lfLens) { - lensfunLenses->set_active(it); - break; - } - } - break; - } - } - } + setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel); + setLensfunLens(pp->lensProf.lfLens); lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; @@ -224,6 +187,12 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa if (pp->lensProf.lfAutoMatch) { corrLensfunAuto->set_sensitive(false); } + } else if (pp->lensProf.lfAutoMatch) { + const LFDatabase *db = LFDatabase::getInstance(); + LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel()); + LFLens l = db->findLens(c, metadata->getLens()); + setLensfunCamera(c.getMake(), c.getModel()); + setLensfunLens(l.getLens()); } } @@ -394,6 +363,57 @@ void LensProfilePanel::fillLensfunLenses() } +bool LensProfilePanel::setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model) +{ + if (!make.empty() && !model.empty()) { + // search for the active row + for (auto row : lensfunCameraModel->children()) { + if (row[lensfunModelCam.make] == make) { + auto &c = row.children(); + for (auto it = c.begin(), end = c.end(); it != end; ++it) { + auto &childrow = *it; + if (childrow[lensfunModelCam.model] == model) { + lensfunCameras->set_active(it); + return true; + } + } + break; + } + } + } + return false; +} + + +bool LensProfilePanel::setLensfunLens(const Glib::ustring &lens) +{ + if (!lens.empty()) { + // search for the active row + auto pos = lens.find_first_of(' '); + Glib::ustring make = "(Unknown)"; + if (pos != Glib::ustring::npos) { + make = lens.substr(0, pos); + } + + for (auto row : lensfunLensModel->children()) { + if (row[lensfunModelLens.lens] == make) { + auto &c = row.children(); + for (auto it = c.begin(), end = c.end(); it != end; ++it) { + auto &childrow = *it; + if (childrow[lensfunModelLens.lens] == lens) { + lensfunLenses->set_active(it); + return true; + } + } + break; + } + } + } + return false; +} + + + void LensProfilePanel::onLensfunCameraChanged() { auto iter = lensfunCameras->get_active(); diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index 11e3bb219..e1e9b0e5f 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -77,6 +77,8 @@ protected: void fillLensfunCameras(); void fillLensfunLenses(); + bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model); + bool setLensfunLens(const Glib::ustring &lens); public: From 66979d290a6fc66adc556ca19048adcb9ba27915 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 9 Sep 2017 00:54:28 +0200 Subject: [PATCH 081/126] lensfun: further tweaks on the matching logic and the UI --- rtengine/rtlensfun.cc | 10 +++++----- rtgui/lensprofile.cc | 42 ++++++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 4e2216fc0..7a2e94bb3 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -262,7 +262,7 @@ LFCamera LFDatabase::findCamera(const Glib::ustring &make, const Glib::ustring & { LFCamera ret; if (data_) { - auto found = data_->FindCamerasExt(make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + auto found = data_->FindCamerasExt(make.c_str(), model.c_str()); if (found) { ret.data_ = found[0]; lf_free(found); @@ -276,12 +276,12 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c { LFLens ret; if (data_) { - const char *lname = name.c_str(); + Glib::ustring lname = name; bool stdlens = camera.ok() && (name.empty() || name.find("Unknown ") == 0); if (stdlens) { - lname = "Standard"; + lname = camera.getModel(); // "Standard" } - auto found = data_->FindLenses(camera.data_, nullptr, lname, LF_SEARCH_LOOSE); + auto found = data_->FindLenses(camera.data_, nullptr, lname.c_str()); if (!found) { // try to split the maker from the model of the lens Glib::ustring make, model; @@ -289,7 +289,7 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c if (i != Glib::ustring::npos) { make = name.substr(0, i); model = name.substr(i+1); - found = data_->FindLenses(camera.data_, make.c_str(), model.c_str(), LF_SEARCH_LOOSE); + found = data_->FindLenses(camera.data_, make.c_str(), model.c_str()); } } if (found) { diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 1386469a9..5f98ef4af 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -174,25 +174,31 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa ckbUseVign->set_active (pp->lensProf.useVign && isRaw); ckbUseCA->set_active (pp->lensProf.useCA && isRaw); - setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel); - setLensfunLens(pp->lensProf.lfLens); + const LFDatabase *db = LFDatabase::getInstance(); + LFCamera c; + LFLens l; + if (metadata) { + c = db->findCamera(metadata->getMake(), metadata->getModel()); + l = db->findLens(c, metadata->getLens()); + } + + if (!setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel) && pp->lensProf.lfAutoMatch) { + setLensfunCamera(c.getMake(), c.getModel()); + } + if (!setLensfunLens(pp->lensProf.lfLens) && pp->lensProf.lfAutoMatch) { + setLensfunLens(l.getLens()); + } lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; - if (!batchMode && metadata && pp->lensProf.useLensfun) { + if (metadata) { std::unique_ptr mod(LFDatabase::findModifier(pp->lensProf, metadata, 100, 100, pp->coarse, -1)); if (!mod) { - corrOff->set_active(true); - if (pp->lensProf.lfAutoMatch) { - corrLensfunAuto->set_sensitive(false); + if (pp->lensProf.useLensfun) { + corrOff->set_active(true); } - } else if (pp->lensProf.lfAutoMatch) { - const LFDatabase *db = LFDatabase::getInstance(); - LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel()); - LFLens l = db->findLens(c, metadata->getLens()); - setLensfunCamera(c.getMake(), c.getModel()); - setLensfunLens(l.getLens()); + corrLensfunAuto->set_sensitive(false); } } @@ -366,6 +372,11 @@ void LensProfilePanel::fillLensfunLenses() bool LensProfilePanel::setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model) { if (!make.empty() && !model.empty()) { + auto it = lensfunCameras->get_active(); + if (it && (*it)[lensfunModelCam.make] == make && (*it)[lensfunModelCam.model] == model) { + return true; + } + // search for the active row for (auto row : lensfunCameraModel->children()) { if (row[lensfunModelCam.make] == make) { @@ -381,6 +392,7 @@ bool LensProfilePanel::setLensfunCamera(const Glib::ustring &make, const Glib::u } } } + lensfunCameras->set_active(-1); return false; } @@ -388,6 +400,11 @@ bool LensProfilePanel::setLensfunCamera(const Glib::ustring &make, const Glib::u bool LensProfilePanel::setLensfunLens(const Glib::ustring &lens) { if (!lens.empty()) { + auto it = lensfunLenses->get_active(); + if (it && (*it)[lensfunModelLens.lens] == lens) { + return true; + } + // search for the active row auto pos = lens.find_first_of(' '); Glib::ustring make = "(Unknown)"; @@ -409,6 +426,7 @@ bool LensProfilePanel::setLensfunLens(const Glib::ustring &lens) } } } + lensfunLenses->set_active(-1); return false; } From 13c4b0c2849537df7cd399f0bada25d9a3d1811b Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 9 Sep 2017 09:53:57 +0200 Subject: [PATCH 082/126] one more refinement to the lensfun automatching logic hopefully this is the good one :-) --- rtengine/rtlensfun.cc | 4 +--- rtengine/rtlensfun.h | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 7a2e94bb3..78e07d2c9 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -295,8 +295,6 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c if (found) { ret.data_ = found[0]; lf_free(found); - } else if (camera.ok() && !stdlens) { - ret = findLens(LFCamera(), name); } } return ret; @@ -333,7 +331,7 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image lens = lensProf.lfLens; } LFCamera c = db->findCamera(make, model); - LFLens l = db->findLens(c, lens); + LFLens l = db->findLens(lensProf.lfAutoMatch ? c : LFCamera(), lens); bool swap_xy = false; if (rawRotationDeg >= 0) { int rot = (coarse.rotate + rawRotationDeg) % 360; diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index 4e2064332..cb8748eb3 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -91,13 +91,13 @@ public: std::vector getLenses() const; LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const; LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const; - LFModifier *getModifier(const LFCamera &camera, const LFLens &lens, - float focalLen, float aperture, float focusDist, - int width, int height, bool swap_xy) const; static LFModifier *findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg); private: + LFModifier *getModifier(const LFCamera &camera, const LFLens &lens, + float focalLen, float aperture, float focusDist, + int width, int height, bool swap_xy) const; LFDatabase(); LFDatabase(const LFDatabase &); LFDatabase &operator=(const LFDatabase &); From afb503c50f59fcb08d2d250a92cb982c4a324491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sat, 9 Sep 2017 17:43:33 +0200 Subject: [PATCH 083/126] Prevent /0 in dcraw.cc (fixes #4061) Final solution by @heckflosse. Thanks! --- rtengine/dcraw.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index a70c2d2dc..5bda02f86 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -2562,6 +2562,12 @@ void CLASS kodak_radc_load_raw() ((short *)buf)[i] = 2048; for (row=0; row < height; row+=4) { FORC3 mul[c] = getbits(6); + FORC3 { + if (!mul[c]) { + mul[c] = 1; + derror(); + } + } FORC3 { val = ((0x1000000/last[c] + 0x7ff) >> 12) * mul[c]; s = val > 65564 ? 10:12; @@ -9936,4 +9942,4 @@ struct tiff_hdr { /*RT*/#undef CLIP #ifdef __GNUC__ #pragma GCC diagnostic pop -#endif \ No newline at end of file +#endif From 0c0f3d146d00a9bb26d0f385203bc198d5257e0d Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 9 Sep 2017 18:41:47 +0200 Subject: [PATCH 084/126] lensfun: take the focal length from the lens (if a prime) when there is no exif info about it --- rtengine/rtlensfun.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 78e07d2c9..c90de08d9 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -306,10 +306,14 @@ LFModifier *LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, int width, int height, bool swap_xy) const { LFModifier *ret = nullptr; - if (data_ && focalLen > 0) { + if (data_) { if (camera.ok() && lens.ok()) { lfModifier *mod = lfModifier::Create(lens.data_, camera.getCropFactor(), width, height); - int flags = mod->Initialize(lens.data_, LF_PF_F32, focalLen, aperture, focusDist > 0 ? focusDist : 1000, 0.0, LF_RECTILINEAR, LF_MODIFY_VIGNETTING | LF_MODIFY_DISTORTION | LF_MODIFY_SCALE, false); + int flags = LF_MODIFY_DISTORTION | LF_MODIFY_SCALE; + if (aperture > 0) { + flags |= LF_MODIFY_VIGNETTING; + } + flags = mod->Initialize(lens.data_, LF_PF_F32, focalLen, aperture, focusDist > 0 ? focusDist : 1000, 0.0, LF_RECTILINEAR, flags, false); ret = new LFModifier(mod, swap_xy, flags); } } @@ -321,7 +325,11 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image { const LFDatabase *db = getInstance(); Glib::ustring make, model, lens; + float focallen = idata->getFocalLen(); if (lensProf.lfAutoMatch) { + if (focallen <= 0) { + return nullptr; + } make = idata->getMake(); model = idata->getModel(); lens = idata->getLens(); @@ -332,6 +340,12 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image } LFCamera c = db->findCamera(make, model); LFLens l = db->findLens(lensProf.lfAutoMatch ? c : LFCamera(), lens); + if (focallen <= 0 && l.data_ && l.data_->MinFocal == l.data_->MaxFocal) { + focallen = l.data_->MinFocal; + } + if (focallen <= 0) { + return nullptr; + } bool swap_xy = false; if (rawRotationDeg >= 0) { int rot = (coarse.rotate + rawRotationDeg) % 360; @@ -343,7 +357,6 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image LFModifier *ret = db->getModifier(c, l, idata->getFocalLen(), idata->getFNumber(), idata->getFocusDist(), width, height, swap_xy); - if (settings->verbose) { std::cout << "LENSFUN:\n" << " camera: " << c.getDisplayString() << "\n" From 03ec1abca8886a788613e0f0ca1029031aad9cc1 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 9 Sep 2017 18:42:16 +0200 Subject: [PATCH 085/126] properly disable auto-matched lens correction when not available --- rtgui/lensprofile.cc | 39 +++++++++++++++++++++++++++++++-------- rtgui/lensprofile.h | 1 + 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 5f98ef4af..b6af0d8d0 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -183,7 +183,7 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa } if (!setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel) && pp->lensProf.lfAutoMatch) { - setLensfunCamera(c.getMake(), c.getModel()); + setLensfunCamera(c.getMake(), c.getModel()); } if (!setLensfunLens(pp->lensProf.lfLens) && pp->lensProf.lfAutoMatch) { setLensfunLens(l.getLens()); @@ -192,16 +192,26 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; - if (metadata) { - std::unique_ptr mod(LFDatabase::findModifier(pp->lensProf, metadata, 100, 100, pp->coarse, -1)); - if (!mod) { - if (pp->lensProf.useLensfun) { - corrOff->set_active(true); - } - corrLensfunAuto->set_sensitive(false); + if (!checkLensfunCanCorrect(true)) { + if (corrLensfunAuto->get_active()) { + corrOff->set_active(true); } + corrLensfunAuto->set_sensitive(false); } + if (corrLensfunManual->get_active() && !checkLensfunCanCorrect(false)) { + corrOff->set_active(true); + } + // if (metadata) { + // std::unique_ptr mod(LFDatabase::findModifier(pp->lensProf, metadata, 100, 100, pp->coarse, -1)); + // if (!mod) { + // if (pp->lensProf.useLensfun) { + // corrOff->set_active(true); + // } + // corrLensfunAuto->set_sensitive(false); + // } + // } + enableListener (); conUseDist.block(false); } @@ -526,3 +536,16 @@ void LensProfilePanel::onCorrModeChanged() listener->panelChanged(EvLensCorrMode, mode); } } + + +bool LensProfilePanel::checkLensfunCanCorrect(bool automatch) +{ + if (!metadata) { + return false; + } + rtengine::procparams::ProcParams lpp; + write(&lpp); + lpp.lensProf.lfAutoMatch = automatch; + std::unique_ptr mod(LFDatabase::findModifier(lpp.lensProf, metadata, 100, 100, lpp.coarse, -1)); + return mod.get() != nullptr; +} diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index e1e9b0e5f..0894d7a98 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -79,6 +79,7 @@ protected: void fillLensfunLenses(); bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model); bool setLensfunLens(const Glib::ustring &lens); + bool checkLensfunCanCorrect(bool automatch); public: From d442f7a85b09805b4264cb9db214ead873bf9153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sat, 9 Sep 2017 20:19:11 +0200 Subject: [PATCH 086/126] LCP cleanup (#4062) - Removed `using namespace` - Use real `Cache` - Use `std::shared_ptr` - Moved `LCPPersModel` to .cc More could be done... --- rtengine/clutstore.cc | 2 +- rtengine/clutstore.h | 4 +- rtengine/improccoordinator.cc | 2 +- rtengine/iptransform.cc | 4 +- rtengine/lcp.cc | 1618 ++++++++++++++++++--------------- rtengine/lcp.h | 169 ++-- rtengine/rawimagesource.cc | 2 +- rtgui/lensprofile.cc | 8 +- 8 files changed, 1013 insertions(+), 796 deletions(-) diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index ba117a2fd..5731773a4 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -305,7 +305,7 @@ rtengine::CLUTStore& rtengine::CLUTStore::getInstance() return instance; } -std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ustring& filename) +std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ustring& filename) const { std::shared_ptr result; diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index 5e4930fa1..a43526f78 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -57,14 +57,14 @@ class CLUTStore final : public: static CLUTStore& getInstance(); - std::shared_ptr getClut(const Glib::ustring& filename); + std::shared_ptr getClut(const Glib::ustring& filename) const; void clearCache(); private: CLUTStore(); - Cache> cache; + mutable Cache> cache; }; } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index d5032cd46..9bbd9b48b 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1121,7 +1121,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { - LCPProfile *pLCPProf = lcpStore->getProfile (params.lensProf.lcpFile); + const std::shared_ptr pLCPProf = LCPStore::getInstance()->getProfile (params.lensProf.lcpFile); if (pLCPProf) pLCPMap = new LCPMapper (pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), 0, false, params.lensProf.useDist, fullw, fullh, params.coarse, imgsrc->getRotateDegree()); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index ee14c80c2..c46176365 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -313,7 +313,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, LCPMapper *pLCPMap = nullptr; if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip - LCPProfile *pLCPProf = lcpStore->getProfile (params->lensProf.lcpFile); + const std::shared_ptr pLCPProf = LCPStore::getInstance()->getProfile (params->lensProf.lcpFile); if (pLCPProf) { pLCPMap = new LCPMapper (pLCPProf, focalLen, focalLen35mm, @@ -784,7 +784,7 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, true /*fullImage*/ ? pLCPMap : nullptr) : 1.0; // smaller crop images are a problem, so only when processing fully - bool enableLCPCA = pLCPMap && params->lensProf.useCA && fullImage && pLCPMap->enableCA; + bool enableLCPCA = pLCPMap && params->lensProf.useCA && fullImage && pLCPMap->isCACorrectionAvailable(); bool enableLCPDist = pLCPMap && params->lensProf.useDist; // && fullImage; if (enableLCPCA) { diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index 048ba9dcf..d95d3a32e 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -20,27 +20,43 @@ #include #include -#include "lcp.h" #include #ifdef WIN32 -#include #include +#include #endif +#include "lcp.h" + #include "settings.h" -using namespace std; -using namespace rtengine; - - -namespace rtengine { +namespace rtengine +{ extern const Settings* settings; } -LCPModelCommon::LCPModelCommon() : +class rtengine::LCPProfile::LCPPersModel +{ +public: + LCPPersModel(); + bool hasModeData(LCPCorrectionMode mode) const; + void print() const; + + float focLen; + float focDist; + float aperture; // this is what it refers to + + LCPModelCommon base; // base perspective correction + LCPModelCommon chromRG; + LCPModelCommon chromG; + LCPModelCommon chromBG; // red/green, green, blue/green (may be empty) + LCPModelCommon vignette; // vignette (may be empty) +}; + +rtengine::LCPModelCommon::LCPModelCommon() : foc_len_x(-1.0f), foc_len_y(-1.0f), img_center_x(0.5f), @@ -59,20 +75,23 @@ LCPModelCommon::LCPModelCommon() : { } -bool LCPModelCommon::empty() const +bool rtengine::LCPModelCommon::empty() const { - return param[0] == 0.0f && param[1] == 0.0f && param[2] == 0.0f; + return + param[0] == 0.0f + && param[1] == 0.0f + && param[2] == 0.0f; } -void LCPModelCommon::print() const +void rtengine::LCPModelCommon::print() const { - printf("focLen %g/%g; imgCenter %g/%g; scale %g; err %g\n", foc_len_x, foc_len_y, img_center_x, img_center_y, scale_factor, mean_error); - printf("xy0 %g/%g fxy %g/%g\n", x0, y0, fx, fy); - printf("param: %g/%g/%g/%g/%g\n", param[0], param[1], param[2], param[3], param[4]); + std::printf("focLen %g/%g; imgCenter %g/%g; scale %g; err %g\n", foc_len_x, foc_len_y, img_center_x, img_center_y, scale_factor, mean_error); + std::printf("xy0 %g/%g fxy %g/%g\n", x0, y0, fx, fy); + std::printf("param: %g/%g/%g/%g/%g\n", param[0], param[1], param[2], param[3], param[4]); } // weighted merge two parameters -void LCPModelCommon::merge(const LCPModelCommon& a, const LCPModelCommon& b, float facA) +void rtengine::LCPModelCommon::merge(const LCPModelCommon& a, const LCPModelCommon& b, float facA) { const float facB = 1.0f - facA; @@ -83,7 +102,7 @@ void LCPModelCommon::merge(const LCPModelCommon& a, const LCPModelCommon& b, flo scale_factor = facA * a.scale_factor + facB * b.scale_factor; mean_error = facA * a.mean_error + facB * b.mean_error; - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 5; ++i) { param[i] = facA * a.param[i] + facB * b.param[i]; } @@ -96,7 +115,16 @@ void LCPModelCommon::merge(const LCPModelCommon& a, const LCPModelCommon& b, flo } -void LCPModelCommon::prepareParams(int fullWidth, int fullHeight, float focalLength, float focalLength35mm, float sensorFormatFactor, bool swapXY, bool mirrorX, bool mirrorY) +void rtengine::LCPModelCommon::prepareParams( + int fullWidth, + int fullHeight, + float focalLength, + float focalLength35mm, + float sensorFormatFactor, + bool swapXY, + bool mirrorX, + bool mirrorY +) { // Mention that the Adobe technical paper has a bug here, the DMAX is handled differently for focLen and imgCenter const int Dmax = std::max(fullWidth, fullHeight); @@ -125,69 +153,842 @@ void LCPModelCommon::prepareParams(int fullWidth, int fullHeight, float focalLen rfx = 1.0f / fx; rfy = 1.0f / fy; - //printf("FW %i /X0 %g FH %i /Y0 %g %g\n",fullWidth,x0,fullHeight,y0, imgYCenter); + //std::printf("FW %i /X0 %g FH %i /Y0 %g %g\n",fullWidth,x0,fullHeight,y0, imgYCenter); } -LCPPersModel::LCPPersModel() +rtengine::LCPProfile::LCPPersModel::LCPPersModel() : + focLen(0.f), + focDist(0.f), + aperture(0.f) { - focLen = focDist = aperture = 0; } -// mode: 0=distortion, 1=vignette, 2=CA -bool LCPPersModel::hasModeData(LCPCorrectionMode mode) const +bool rtengine::LCPProfile::LCPPersModel::hasModeData(LCPCorrectionMode mode) const { switch (mode) { - case LCP_MODE_VIGNETTE: - return !vignette.empty() && !vignette.bad_error; - case LCP_MODE_DISTORTION: - return !base.empty() && !base.bad_error; - case LCP_MODE_CA: - return !chromRG.empty() && !chromG.empty() && !chromBG.empty() && - !chromRG.bad_error && !chromG.bad_error && !chromBG.bad_error; - default: - assert(false); - return false; + case LCPCorrectionMode::VIGNETTE: { + return !vignette.empty() && !vignette.bad_error; + } + + case LCPCorrectionMode::DISTORTION: { + return !base.empty() && !base.bad_error; + } + + case LCPCorrectionMode::CA: { + return + !chromRG.empty() + && !chromG.empty() + && !chromBG.empty() + && !chromRG.bad_error + && !chromG.bad_error + && !chromBG.bad_error; + } } + + assert(false); + return false; } -void LCPPersModel::print() const +void rtengine::LCPProfile::LCPPersModel::print() const { - printf("--- PersModel focLen %g; focDist %g; aperture %g\n", focLen, focDist, aperture); - printf("Base:\n"); + std::printf("--- PersModel focLen %g; focDist %g; aperture %g\n", focLen, focDist, aperture); + std::printf("Base:\n"); base.print(); if (!chromRG.empty()) { - printf("ChromRG:\n"); + std::printf("ChromRG:\n"); chromRG.print(); } if (!chromG.empty()) { - printf("ChromG:\n"); + std::printf("ChromG:\n"); chromG.print(); } if (!chromBG.empty()) { - printf("ChromBG:\n"); + std::printf("ChromBG:\n"); chromBG.print(); } if (!vignette.empty()) { - printf("Vignette:\n"); + std::printf("Vignette:\n"); vignette.print(); } - printf("\n"); + std::printf("\n"); } -// if !vignette then geometric and CA -LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, - int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg) :useCADist(false), swapXY(false), isFisheye(false), enableCA(false) +rtengine::LCPProfile::LCPProfile(const Glib::ustring& fname) : + isFisheye(false), + sensorFormatFactor(1.f), + persModelCount(0), + inCamProfiles(false), + firstLIDone(false), + inPerspect(false), + inAlternateLensID(false), + inAlternateLensNames(false), + lastTag{}, + inInvalidTag{}, + pCurPersModel(nullptr), + pCurCommon(nullptr), + aPersModel{} { - if (pProf == nullptr) { + const int BufferSize = 8192; + char buf[BufferSize]; + + XML_Parser parser = XML_ParserCreate(nullptr); + + if (!parser) { + throw "Couldn't allocate memory for XML parser"; + } + + XML_SetElementHandler(parser, XmlStartHandler, XmlEndHandler); + XML_SetCharacterDataHandler(parser, XmlTextHandler); + XML_SetUserData(parser, static_cast(this)); + + FILE* const pFile = g_fopen(fname.c_str (), "rb"); + + if (pFile) { + bool done; + + do { + int bytesRead = fread(buf, 1, BufferSize, pFile); + done = feof(pFile); + + if (XML_Parse(parser, buf, bytesRead, done) == XML_STATUS_ERROR) { + XML_ParserFree(parser); + throw "Invalid XML in LCP file"; + } + } while (!done); + + fclose(pFile); + } + + XML_ParserFree(parser); + + if (settings->verbose) { + std::printf("Parsing %s\n", fname.c_str()); + } + // Two phase filter: first filter out the very rough ones, that distord the average a lot + // force it, even if there are few frames (community profiles) + filterBadFrames(LCPCorrectionMode::VIGNETTE, 2.0, 0); + filterBadFrames(LCPCorrectionMode::CA, 2.0, 0); + // from the non-distorded, filter again on new average basis, but only if there are enough frames left + filterBadFrames(LCPCorrectionMode::VIGNETTE, 1.5, 50); + filterBadFrames(LCPCorrectionMode::CA, 1.5, 50); +} + +rtengine::LCPProfile::~LCPProfile() +{ + delete pCurPersModel; + + for (int i = 0; i < MaxPersModelCount; ++i) { + delete aPersModel[i]; + } +} + +void rtengine::LCPProfile::calcParams( + LCPCorrectionMode mode, + float focalLength, + float focusDist, + float aperture, + LCPModelCommon* pCorr1, + LCPModelCommon* pCorr2, + LCPModelCommon* pCorr3 +) const +{ + const float euler = std::exp(1.0); + + // find the frames with the least distance, focal length wise + LCPPersModel* pLow = nullptr; + LCPPersModel* pHigh = nullptr; + + const float focalLengthLog = std::log(focalLength); //, apertureLog=aperture>0 ? std::log(aperture) : 0; + const float focusDistLog = focusDist > 0 ? std::log(focusDist) + euler : 0; + + // Pass 1: determining best focal length, if possible different focusDistances (for the focDist is not given case) + for (int pm = 0; pm < persModelCount; ++pm) { + const float f = aPersModel[pm]->focLen; + + if (aPersModel[pm]->hasModeData(mode)) { + if ( + f <= focalLength + && ( + pLow == nullptr + || f > pLow->focLen + || ( + focusDist == 0 + && f == pLow->focLen + && pLow->focDist > aPersModel[pm]->focDist + ) + ) + ) { + pLow = aPersModel[pm]; + } + + if ( + f >= focalLength + && ( + pHigh == nullptr + || f < pHigh->focLen + || ( + focusDist == 0 + && f == pHigh->focLen + && pHigh->focDist < aPersModel[pm]->focDist + ) + ) + ) { + pHigh = aPersModel[pm]; + } + } + } + + if (!pLow) { + pLow = pHigh; + } + else if (!pHigh) { + pHigh = pLow; + } + else { + // Pass 2: We have some, so take the best aperture for vignette and best focus for CA and distortion + // there are usually several frame per focal length. In the end pLow will have both flen and apterure/focdis below the target, + // and vice versa pHigh + const float bestFocLenLow = pLow->focLen; + const float bestFocLenHigh = pHigh->focLen; + + for (int pm = 0; pm < persModelCount; ++pm) { + const float aper = aPersModel[pm]->aperture; // float aperLog=std::log(aper); + const float focDist = aPersModel[pm]->focDist; + const float focDistLog = std::log(focDist) + euler; + + double meanErr; + + if (aPersModel[pm]->hasModeData(mode)) { + double lowMeanErr = 0.0; + double highMeanErr = 0.0; + + switch (mode) { + case LCPCorrectionMode::VIGNETTE: { + meanErr = aPersModel[pm]->vignette.mean_error; + lowMeanErr = pLow->vignette.mean_error; + highMeanErr = pHigh->vignette.mean_error; + break; + } + + case LCPCorrectionMode::DISTORTION: { + meanErr = aPersModel[pm]->base.mean_error; + lowMeanErr = pLow->base.mean_error; + highMeanErr = pHigh->base.mean_error; + break; + } + + case LCPCorrectionMode::CA: { + meanErr = aPersModel[pm]->chromG.mean_error; + lowMeanErr = pLow->chromG.mean_error; + highMeanErr = pHigh->chromG.mean_error; + break; + } + } + + if (aperture > 0 && mode != LCPCorrectionMode::CA) { + if ( + aPersModel[pm]->focLen == bestFocLenLow + && ( + ( + aper == aperture + && lowMeanErr > meanErr + ) + || ( + aper >= aperture + && aper < pLow->aperture + && pLow->aperture > aperture + ) + || ( + aper <= aperture + && ( + pLow->aperture > aperture + || fabs(aperture - aper) < fabs(aperture - pLow->aperture) + ) + ) + ) + ) { + pLow = aPersModel[pm]; + } + + if ( + aPersModel[pm]->focLen == bestFocLenHigh + && ( + ( + aper == aperture + && highMeanErr > meanErr + ) + || ( + aper <= aperture + && aper > pHigh->aperture + && pHigh->aperture < aperture + ) + || ( + aper >= aperture + && ( + pHigh->aperture < aperture + || fabs(aperture - aper) < fabs(aperture - pHigh->aperture) + ) + ) + ) + ) { + pHigh = aPersModel[pm]; + } + } + else if (focusDist > 0 && mode != LCPCorrectionMode::VIGNETTE) { + // by focus distance + if ( + aPersModel[pm]->focLen == bestFocLenLow + && ( + ( + focDist == focusDist + && lowMeanErr > meanErr + ) + || ( + focDist >= focusDist + && focDist < pLow->focDist + && pLow->focDist > focusDist + ) + || ( + focDist <= focusDist + && ( + pLow->focDist > focusDist + || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (std::log(pLow->focDist) + euler)) + ) + ) + ) + ) { + pLow = aPersModel[pm]; + } + + if ( + aPersModel[pm]->focLen == bestFocLenHigh + && ( + ( + focDist == focusDist + && highMeanErr > meanErr + ) + || ( + focDist <= focusDist + && focDist > pHigh->focDist + && pHigh->focDist < focusDist + ) + || ( + focDist >= focusDist + && ( + pHigh->focDist < focusDist + || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (std::log(pHigh->focDist) + euler)) + ) + ) + ) + ) { + pHigh = aPersModel[pm]; + } + } + else { + // no focus distance available, just error + if (aPersModel[pm]->focLen == bestFocLenLow && lowMeanErr > meanErr) { + pLow = aPersModel[pm]; + } + + if (aPersModel[pm]->focLen == bestFocLenHigh && highMeanErr > meanErr) { + pHigh = aPersModel[pm]; + } + } + + } + } + } + + if (pLow != nullptr && pHigh != nullptr) { + // average out the factors, linear interpolation in logarithmic scale + float facLow = 0.5f; + bool focLenOnSpot = false; // pretty often, since max/min are often as frames in LCP + + // There is as foclen range, take that as basis + if (pLow->focLen < pHigh->focLen) { + facLow = (std::log(pHigh->focLen) - focalLengthLog) / (std::log(pHigh->focLen) - std::log(pLow->focLen)); + } else { + focLenOnSpot = pLow->focLen == pHigh->focLen && pLow->focLen == focalLength; + } + + // and average the other factor if available + if ( + mode == LCPCorrectionMode::VIGNETTE + && pLow->aperture < aperture + && pHigh->aperture > aperture + ) { + // Mix in aperture + const float facAperLow = (pHigh->aperture - aperture) / (pHigh->aperture - pLow->aperture); + facLow = focLenOnSpot ? facAperLow : (0.5 * facLow + 0.5 * facAperLow); + } + else if ( + mode != LCPCorrectionMode::VIGNETTE + && focusDist > 0 + && pLow->focDist < focusDist + && pHigh->focDist > focusDist + ) { + // focus distance for all else (if focus distance is given) + const float facDistLow = (std::log(pHigh->focDist) + euler - focusDistLog) / (std::log(pHigh->focDist) - std::log(pLow->focDist)); + facLow = focLenOnSpot ? facDistLow : (0.8 * facLow + 0.2 * facDistLow); + } + + switch (mode) { + case LCPCorrectionMode::VIGNETTE: { + pCorr1->merge(pLow->vignette, pHigh->vignette, facLow); + break; + } + + case LCPCorrectionMode::DISTORTION: { + pCorr1->merge(pLow->base, pHigh->base, facLow); + break; + } + + case LCPCorrectionMode::CA: { + pCorr1->merge(pLow->chromRG, pHigh->chromRG, facLow); + pCorr2->merge(pLow->chromG, pHigh->chromG, facLow); + pCorr3->merge(pLow->chromBG, pHigh->chromBG, facLow); + break; + } + } + + if (settings->verbose) { + std::printf("LCP mode=%i, dist: %g found frames: Fno %g-%g; FocLen %g-%g; Dist %g-%g with weight %g\n", toUnderlying(mode), focusDist, pLow->aperture, pHigh->aperture, pLow->focLen, pHigh->focLen, pLow->focDist, pHigh->focDist, facLow); + } + } else { + if (settings->verbose) { + std::printf("Error: LCP file contained no %s parameters\n", mode == LCPCorrectionMode::VIGNETTE ? "vignette" : mode == LCPCorrectionMode::DISTORTION ? "distortion" : "CA" ); + } + } +} + +void rtengine::LCPProfile::print() const +{ + std::printf("=== Profile %s\n", profileName.c_str()); + std::printf("Frames: %i, RAW: %i; Fisheye: %i; Sensorformat: %f\n", persModelCount, isRaw, isFisheye, sensorFormatFactor); + + for (int pm = 0; pm < persModelCount; ++pm) { + aPersModel[pm]->print(); + } +} + +// from all frames not marked as bad already, take average and filter out frames with higher deviation than this if there are enough values +int rtengine::LCPProfile::filterBadFrames(LCPCorrectionMode mode, double maxAvgDevFac, int minFramesLeft) +{ + // take average error, then calculated the maximum deviation allowed + double err = 0.0; + int count = 0; + + for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; ++pm) { + if (aPersModel[pm]->hasModeData(mode)) { + ++count; + switch (mode) { + case LCPCorrectionMode::VIGNETTE: { + err += aPersModel[pm]->vignette.mean_error; + break; + } + + case LCPCorrectionMode::DISTORTION: { + err += aPersModel[pm]->base.mean_error; + break; + } + + case LCPCorrectionMode::CA: { + err += rtengine::max(aPersModel[pm]->chromRG.mean_error, aPersModel[pm]->chromG.mean_error, aPersModel[pm]->chromBG.mean_error); + break; + } + } + } + } + + // Only if we have enough frames, filter out errors + int filtered = 0; + + if (count >= minFramesLeft) { + if (count > 0) { + err /= count; + } + + // Now mark all the bad ones as bad, and hasModeData will return false; + for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; ++pm) { + if (aPersModel[pm]->hasModeData(mode)) { + switch (mode) { + case LCPCorrectionMode::VIGNETTE: { + if (aPersModel[pm]->vignette.mean_error > maxAvgDevFac * err) { + aPersModel[pm]->vignette.bad_error = true; + filtered++; + } + break; + } + + case LCPCorrectionMode::DISTORTION: { + if (aPersModel[pm]->base.mean_error > maxAvgDevFac * err) { + aPersModel[pm]->base.bad_error = true; + filtered++; + } + break; + } + + case LCPCorrectionMode::CA: { + if ( + aPersModel[pm]->chromRG.mean_error > maxAvgDevFac * err + || aPersModel[pm]->chromG.mean_error > maxAvgDevFac * err + || aPersModel[pm]->chromBG.mean_error > maxAvgDevFac * err + ) { + aPersModel[pm]->chromRG.bad_error = true; + aPersModel[pm]->chromG.bad_error = true; + aPersModel[pm]->chromBG.bad_error = true; + ++filtered; + } + break; + } + } + } + } + + if (settings->verbose) { + std::printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered *100.f / count, maxAvgDevFac, count - filtered); + } + } + + return filtered; +} + +void rtengine::LCPProfile::handle_text(const std::string& text) +{ + // Check if it contains non-whitespaces (there are several calls to this for one tag unfortunately) + bool onlyWhiteSpace = true; + for (auto c : text) { + if (!std::isspace(c)) { + onlyWhiteSpace = false; + break; + } + } + + if (onlyWhiteSpace) { return; } - useCADist = useCADistP; + LCPProfile* const pProf = this; + + // convert to null terminated + const std::string tag = pProf->lastTag; + + // Common data section + if (!pProf->firstLIDone) { + // Generic tags are the same for all + if (tag == "ProfileName") { + pProf->profileName = text; + } else if (tag == "Model") { + pProf->camera = text; + } else if (tag == "Lens") { + pProf->lens = text; + } else if (tag == "CameraPrettyName") { + pProf->cameraPrettyName = text; + } else if (tag == "LensPrettyName") { + pProf->lensPrettyName = text; + } else if (tag == "CameraRawProfile") { + pProf->isRaw = text == "True"; + } + } + + // Locale should be already set + assert(std::atof("1.2345") == 1.2345); + + if (!pProf->firstLIDone) { + if (tag == "SensorFormatFactor") { + pProf->sensorFormatFactor = std::atof(text.c_str()); + } + } + + // Perspective model base data + if (tag == "FocalLength") { + pProf->pCurPersModel->focLen = std::atof(text.c_str()); + } else if (tag == "FocusDistance") { + double focDist = std::atof(text.c_str()); + pProf->pCurPersModel->focDist = focDist < 10000 ? focDist : 10000; + } else if (tag == "ApertureValue") { + pProf->pCurPersModel->aperture = std::atof(text.c_str()); + } + + // Section depended + if (tag == "FocalLengthX") { + pProf->pCurCommon->foc_len_x = std::atof(text.c_str()); + } else if (tag == "FocalLengthY") { + pProf->pCurCommon->foc_len_y = std::atof(text.c_str()); + } else if (tag == "ImageXCenter") { + pProf->pCurCommon->img_center_x = std::atof(text.c_str()); + } else if (tag == "ImageYCenter") { + pProf->pCurCommon->img_center_y = std::atof(text.c_str()); + } else if (tag == "ScaleFactor") { + pProf->pCurCommon->scale_factor = std::atof(text.c_str()); + } else if (tag == "ResidualMeanError") { + pProf->pCurCommon->mean_error = std::atof(text.c_str()); + } else if (tag == "RadialDistortParam1" || tag == "VignetteModelParam1") { + pProf->pCurCommon->param[0] = std::atof(text.c_str()); + } else if (tag == "RadialDistortParam2" || tag == "VignetteModelParam2") { + pProf->pCurCommon->param[1] = std::atof(text.c_str()); + } else if (tag == "RadialDistortParam3" || tag == "VignetteModelParam3") { + pProf->pCurCommon->param[2] = std::atof(text.c_str()); + } else if (tag == "RadialDistortParam4" || tag == "TangentialDistortParam1") { + pProf->pCurCommon->param[3] = std::atof(text.c_str()); + } else if (tag == "RadialDistortParam5" || tag == "TangentialDistortParam2") { + pProf->pCurCommon->param[4] = std::atof(text.c_str()); + } +} + +void XMLCALL rtengine::LCPProfile::XmlStartHandler(void* pLCPProfile, const char* el, const char** attr) +{ + LCPProfile* const pProf = static_cast(pLCPProfile); + + bool parseAttr = false; + + if (*pProf->inInvalidTag) { + return; // We ignore everything in dirty tag till it's gone + } + + // clean up tagname + const char* src = strrchr(el, ':'); + + if (src == nullptr) { + src = el; + } else { + ++src; + } + + strcpy(pProf->lastTag, src); + + const std::string src_str = src; + + if (src_str == "VignetteModelPiecewiseParam") { + strcpy(pProf->inInvalidTag, src); + } + + if (src_str == "CameraProfiles") { + pProf->inCamProfiles = true; + } + + if (src_str == "AlternateLensIDs") { + pProf->inAlternateLensID = true; + } + + if (src_str == "AlternateLensNames") { + pProf->inAlternateLensNames = true; + } + + if ( + !pProf->inCamProfiles + || pProf->inAlternateLensID + || pProf->inAlternateLensNames + ) { + return; + } + + if (src_str == "li") { + pProf->pCurPersModel = new LCPPersModel(); + pProf->pCurCommon = &pProf->pCurPersModel->base; // iterated to next tags within persModel + return; + } + + if (src_str == "PerspectiveModel") { + pProf->firstLIDone = true; + pProf->inPerspect = true; + return; + } else if (src_str == "FisheyeModel") { + pProf->firstLIDone = true; + pProf->inPerspect = true; + pProf->isFisheye = true; // just misses third param, and different path, rest is the same + return; + } else if (src_str == "Description") { + parseAttr = true; + } + + // Move pointer to general section + if (pProf->inPerspect) { + if (src_str == "ChromaticRedGreenModel") { + pProf->pCurCommon = &pProf->pCurPersModel->chromRG; + parseAttr = true; + } else if (src_str == "ChromaticGreenModel") { + pProf->pCurCommon = &pProf->pCurPersModel->chromG; + parseAttr = true; + } else if (src_str == "ChromaticBlueGreenModel") { + pProf->pCurCommon = &pProf->pCurPersModel->chromBG; + parseAttr = true; + } else if (src_str == "VignetteModel") { + pProf->pCurCommon = &pProf->pCurPersModel->vignette; + parseAttr = true; + } + } + + // some profiles (espc. Pentax) have a different structure that is attributes based + // simulate tags by feeding them in + if (parseAttr && attr != nullptr) { + for (int i = 0; attr[i]; i += 2) { + const char* nameStart = strrchr(attr[i], ':'); + + if (nameStart == nullptr) { + nameStart = attr[i]; + } else { + ++nameStart; + } + + strncpy(pProf->lastTag, nameStart, 255); + + pProf->handle_text(attr[i + 1]); + } + } +} + +void XMLCALL rtengine::LCPProfile::XmlTextHandler(void* pLCPProfile, const XML_Char* s, int len) +{ + LCPProfile* const pProf = static_cast(pLCPProfile); + + if ( + !pProf->inCamProfiles + || pProf->inAlternateLensID + || pProf->inAlternateLensNames + || *pProf->inInvalidTag + ) { + return; + } + + for (int i = 0; i < len; ++i) { + pProf->textbuf << s[i]; + } +} + +void XMLCALL rtengine::LCPProfile::XmlEndHandler(void* pLCPProfile, const char* el) +{ + LCPProfile* const pProf = static_cast(pLCPProfile); + + pProf->handle_text(pProf->textbuf.str()); + pProf->textbuf.str(""); + + // We ignore everything in dirty tag till it's gone + if (*pProf->inInvalidTag) { + if (std::strstr(el, pProf->inInvalidTag)) { + *pProf->inInvalidTag = 0; + } + + return; + } + + if (std::strstr(el, ":CameraProfiles")) { + pProf->inCamProfiles = false; + } + + if (std::strstr(el, ":AlternateLensIDs")) { + pProf->inAlternateLensID = false; + } + + if (std::strstr(el, ":AlternateLensNames")) { + pProf->inAlternateLensNames = false; + } + + if ( + !pProf->inCamProfiles + || pProf->inAlternateLensID + || pProf->inAlternateLensNames + ) { + return; + } + + if (std::strstr(el, ":PerspectiveModel") || std::strstr(el, ":FisheyeModel")) { + pProf->inPerspect = false; + } else if (std::strstr(el, ":li")) { + pProf->aPersModel[pProf->persModelCount] = pProf->pCurPersModel; + pProf->pCurPersModel = nullptr; + ++pProf->persModelCount; + } +} + +// Generates as singleton +rtengine::LCPStore* rtengine::LCPStore::getInstance() +{ + static LCPStore instance_; + return &instance_; +} + +bool rtengine::LCPStore::isValidLCPFileName(const Glib::ustring& filename) const +{ + if (!Glib::file_test(filename, Glib::FILE_TEST_EXISTS) || Glib::file_test (filename, Glib::FILE_TEST_IS_DIR)) { + return false; + } + + const size_t pos = filename.find_last_of ('.'); + return pos > 0 && !filename.casefold().compare(pos, 4, ".lcp"); +} + +std::shared_ptr rtengine::LCPStore::getProfile(const Glib::ustring& filename) const +{ + if (filename.length() == 0 || !isValidLCPFileName(filename)) { + return nullptr; + } + + std::shared_ptr res; + if (!cache.get(filename, res)) { + res.reset(new LCPProfile(filename)); + cache.set(filename, res); + } + + return res; +} + +Glib::ustring rtengine::LCPStore::getDefaultCommonDirectory() const +{ + Glib::ustring dir; + +#ifdef WIN32 + WCHAR pathW[MAX_PATH] = {0}; + + if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_COMMON_APPDATA, false)) { + char pathA[MAX_PATH]; + WideCharToMultiByte(CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); + Glib::ustring fullDir = Glib::ustring(pathA) + Glib::ustring("\\Adobe\\CameraRaw\\LensProfiles\\1.0"); + + if (Glib::file_test (fullDir, Glib::FILE_TEST_IS_DIR)) { + dir = fullDir; + } + } + +#endif + + // TODO: Add Mac paths here + + return dir; +} + +rtengine::LCPStore::LCPStore(unsigned int _cache_size) : + cache(_cache_size) +{ +} + +// if !vignette then geometric and CA +rtengine::LCPMapper::LCPMapper( + const std::shared_ptr& pProf, + float focalLength, + float focalLength35mm, + float focusDist, + float aperture, + bool vignette, + bool useCADistP, + int fullWidth, + int fullHeight, + const CoarseTransformParams& coarse, + int rawRotationDeg +) : + enableCA(false), + useCADist(useCADistP), + swapXY(false), + isFisheye(false) +{ + if (!pProf) { + return; + } // determine in what the image with the RAW landscape in comparison (calibration target) // in vignetting, the rotation has not taken place yet @@ -197,84 +998,91 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm rot = (coarse.rotate + rawRotationDeg) % 360; } - swapXY = (rot == 90 || rot == 270); - bool mirrorX = (rot == 90 || rot == 180); - bool mirrorY = (rot == 180 || rot == 270); + swapXY = (rot == 90 || rot == 270); + + const bool mirrorX = (rot == 90 || rot == 180); + const bool mirrorY = (rot == 180 || rot == 270); if (settings->verbose) { - printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); + std::printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); } - pProf->calcParams(vignette ? LCP_MODE_VIGNETTE : LCP_MODE_DISTORTION, focalLength, focusDist, aperture, &mc, nullptr, nullptr); + pProf->calcParams(vignette ? LCPCorrectionMode::VIGNETTE : LCPCorrectionMode::DISTORTION, focalLength, focusDist, aperture, &mc, nullptr, nullptr); mc.prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); if (!vignette) { - pProf->calcParams(LCP_MODE_CA, focalLength, focusDist, aperture, &chrom[0], &chrom[1], &chrom[2]); + pProf->calcParams(LCPCorrectionMode::CA, focalLength, focusDist, aperture, &chrom[0], &chrom[1], &chrom[2]); - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 3; ++i) { chrom[i].prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); } } - enableCA = !vignette && focusDist > 0; + enableCA = !vignette && focusDist > 0.f; isFisheye = pProf->isFisheye; } -void LCPMapper::correctDistortion(double& x, double& y, double scale) const +bool rtengine::LCPMapper::isCACorrectionAvailable() const +{ + return enableCA; +} + +void rtengine::LCPMapper::correctDistortion(double& x, double& y, double scale) const { if (isFisheye) { - double u = x * scale; - double v = y * scale; - double u0 = mc.x0 * scale; - double v0 = mc.y0 * scale; - double du = (u - u0); - double dv = (v - v0); - double fx = mc.fx; - double fy = mc.fy; - double k1 = mc.param[0]; - double k2 = mc.param[1]; - double r = sqrt(du * du + dv * dv); - double f = sqrt(fx*fy / (scale * scale)); - double th = atan2(r, f); - double th2 = th * th; - double cfact = (((k2 * th2 + k1) * th2 + 1) * th) / r; - double ud = cfact * fx * du + u0; - double vd = cfact * fy * dv + v0; + const double u = x * scale; + const double v = y * scale; + const double u0 = mc.x0 * scale; + const double v0 = mc.y0 * scale; + const double du = (u - u0); + const double dv = (v - v0); + const double fx = mc.fx; + const double fy = mc.fy; + const double k1 = mc.param[0]; + const double k2 = mc.param[1]; + const double r = sqrt(du * du + dv * dv); + const double f = sqrt(fx*fy / (scale * scale)); + const double th = atan2(r, f); + const double th2 = th * th; + const double cfact = (((k2 * th2 + k1) * th2 + 1) * th) / r; + const double ud = cfact * fx * du + u0; + const double vd = cfact * fy * dv + v0; x = ud; y = vd; } else { x *= scale; y *= scale; - double x0 = mc.x0 * scale; - double y0 = mc.y0 * scale; - double xd = (x - x0) / mc.fx, yd = (y - y0) / mc.fy; + const double x0 = mc.x0 * scale; + const double y0 = mc.y0 * scale; + const double xd = (x - x0) / mc.fx, yd = (y - y0) / mc.fy; const LCPModelCommon::Param aDist = mc.param; - double rsqr = xd * xd + yd * yd; - double xfac = aDist[swapXY ? 3 : 4], yfac = aDist[swapXY ? 4 : 3]; + const double rsqr = xd * xd + yd * yd; + const double xfac = aDist[swapXY ? 3 : 4], yfac = aDist[swapXY ? 4 : 3]; - double commonFac = (((aDist[2] * rsqr + aDist[1]) * rsqr + aDist[0]) * rsqr + 1.) + const double commonFac = (((aDist[2] * rsqr + aDist[1]) * rsqr + aDist[0]) * rsqr + 1.) + 2. * (yfac * yd + xfac * xd); - double xnew = xd * commonFac + xfac * rsqr; - double ynew = yd * commonFac + yfac * rsqr; + const double xnew = xd * commonFac + xfac * rsqr; + const double ynew = yd * commonFac + yfac * rsqr; x = xnew * mc.fx + x0; y = ynew * mc.fy + y0; } } -void LCPMapper::correctCA(double& x, double& y, int channel) const +void rtengine::LCPMapper::correctCA(double& x, double& y, int channel) const { if (!enableCA) { return; } - double rsqr, xgreen, ygreen; + double xgreen, ygreen; // First calc the green channel like normal distortion // the other are just deviations from it - double xd = (x - chrom[1].x0) / chrom[1].fx, yd = (y - chrom[1].y0) / chrom[1].fy; + double xd = (x - chrom[1].x0) / chrom[1].fx; + double yd = (y - chrom[1].y0) / chrom[1].fy; // Green contains main distortion, just like base if (useCADist) { @@ -300,18 +1108,18 @@ void LCPMapper::correctCA(double& x, double& y, int channel) const // others are diffs from green xd = xgreen; yd = ygreen; - rsqr = xd * xd + yd * yd; + const double rsqr = xd * xd + yd * yd; const LCPModelCommon::Param aCA = chrom[channel].param; - double xfac = aCA[swapXY ? 3 : 4], yfac = aCA[swapXY ? 4 : 3]; - double commonSum = 1. + rsqr * (aCA[0] + rsqr * (aCA[1] + aCA[2] * rsqr)) + 2. * (yfac * yd + xfac * xd); + const double xfac = aCA[swapXY ? 3 : 4], yfac = aCA[swapXY ? 4 : 3]; + const double commonSum = 1. + rsqr * (aCA[0] + rsqr * (aCA[1] + aCA[2] * rsqr)) + 2. * (yfac * yd + xfac * xd); x = (chrom[channel].scale_factor * ( xd * commonSum + xfac * rsqr )) * chrom[channel].fx + chrom[channel].x0; y = (chrom[channel].scale_factor * ( yd * commonSum + yfac * rsqr )) * chrom[channel].fy + chrom[channel].y0; } } -SSEFUNCTION void LCPMapper::processVignetteLine(int width, int y, float *line) const +SSEFUNCTION void rtengine::LCPMapper::processVignetteLine(int width, int y, float* line) const { // No need for swapXY, since vignette is in RAW and always before rotation float yd = ((float)y - mc.y0) * mc.rfy; @@ -330,9 +1138,9 @@ SSEFUNCTION void LCPMapper::processVignetteLine(int width, int y, float *line) c vfloat xv = _mm_setr_ps(0.f, 1.f, 2.f, 3.f); for (; x < width-3; x+=4) { - vfloat xdv = (xv - x0v) * rfxv; - vfloat rsqr = xdv * xdv + ydv; - vfloat vignFactorv = rsqr * (p0 + rsqr * (p1 - p2 * rsqr + p3 * rsqr * rsqr)); + const vfloat xdv = (xv - x0v) * rfxv; + const vfloat rsqr = xdv * xdv + ydv; + const vfloat vignFactorv = rsqr * (p0 + rsqr * (p1 - p2 * rsqr + p3 * rsqr * rsqr)); vfloat valv = LVFU(line[x]); valv += valv * vselfzero(vmaskf_gt(valv, zerov), vignFactorv); STVFU(line[x], valv); @@ -341,24 +1149,24 @@ SSEFUNCTION void LCPMapper::processVignetteLine(int width, int y, float *line) c #endif // __SSE2__ for (; x < width; x++) { if (line[x] > 0) { - float xd = ((float)x - mc.x0) * mc.rfx; + const float xd = ((float)x - mc.x0) * mc.rfx; const LCPModelCommon::VignParam vignParam = mc.vign_param; - float rsqr = xd * xd + yd; + const float rsqr = xd * xd + yd; line[x] += line[x] * rsqr * (vignParam[0] + rsqr * ((vignParam[1]) - (vignParam[2]) * rsqr + (vignParam[3]) * rsqr * rsqr)); } } } -SSEFUNCTION void LCPMapper::processVignetteLine3Channels(int width, int y, float *line) const +SSEFUNCTION void rtengine::LCPMapper::processVignetteLine3Channels(int width, int y, float* line) const { // No need for swapXY, since vignette is in RAW and always before rotation float yd = ((float)y - mc.y0) * mc.rfy; yd *= yd; const LCPModelCommon::VignParam vignParam = mc.vign_param; for (int x = 0; x < width; x++) { - float xd = ((float)x - mc.x0) * mc.rfx; - float rsqr = xd * xd + yd; - float vignetteFactor = rsqr * (vignParam[0] + rsqr * ((vignParam[1]) - (vignParam[2]) * rsqr + (vignParam[3]) * rsqr * rsqr)); + const float xd = ((float)x - mc.x0) * mc.rfx; + const float rsqr = xd * xd + yd; + const float vignetteFactor = rsqr * (vignParam[0] + rsqr * ((vignParam[1]) - (vignParam[2]) * rsqr + (vignParam[3]) * rsqr * rsqr)); for(int c = 0;c < 3; ++c) { if (line[3*x+c] > 0) { line[3*x+c] += line[3*x+c] * vignetteFactor; @@ -366,623 +1174,3 @@ SSEFUNCTION void LCPMapper::processVignetteLine3Channels(int width, int y, float } } } - - -LCPProfile::LCPProfile(const Glib::ustring &fname) -{ - for (int i = 0; i < MaxPersModelCount; i++) { - aPersModel[i] = nullptr; - } - pCurPersModel = nullptr; - - const int BufferSize = 8192; - char buf[BufferSize]; - - XML_Parser parser = XML_ParserCreate(nullptr); - - if (!parser) { - throw "Couldn't allocate memory for XML parser"; - } - - XML_SetElementHandler(parser, XmlStartHandler, XmlEndHandler); - XML_SetCharacterDataHandler(parser, XmlTextHandler); - XML_SetUserData(parser, (void *)this); - - - isFisheye = inCamProfiles = firstLIDone = inPerspect = inAlternateLensID = inAlternateLensNames = false; - sensorFormatFactor = 1; - - persModelCount = 0; - *inInvalidTag = 0; - - FILE *pFile = g_fopen(fname.c_str (), "rb"); - - if(pFile) { - bool done; - - do { - int bytesRead = (int)fread(buf, 1, BufferSize, pFile); - done = feof(pFile); - - if (XML_Parse(parser, buf, bytesRead, done) == XML_STATUS_ERROR) { - throw "Invalid XML in LCP file"; - } - } while (!done); - - fclose(pFile); - } - - XML_ParserFree(parser); - - if (settings->verbose) { - printf("Parsing %s\n", fname.c_str()); - } - // Two phase filter: first filter out the very rough ones, that distord the average a lot - // force it, even if there are few frames (community profiles) - filterBadFrames(LCP_MODE_VIGNETTE, 2.0, 0); - filterBadFrames(LCP_MODE_CA, 2.0, 0); - // from the non-distorded, filter again on new average basis, but only if there are enough frames left - filterBadFrames(LCP_MODE_VIGNETTE, 1.5, 50); - filterBadFrames(LCP_MODE_CA, 1.5, 50); -} - - -LCPProfile::~LCPProfile() -{ - if (pCurPersModel) { - delete pCurPersModel; - } - for (int i = 0; i < MaxPersModelCount; i++) { - if (aPersModel[i]) { - delete aPersModel[i]; - } - } -} - -// from all frames not marked as bad already, take average and filter out frames with higher deviation than this if there are enough values -int LCPProfile::filterBadFrames(LCPCorrectionMode mode, double maxAvgDevFac, int minFramesLeft) -{ - // take average error, then calculated the maximum deviation allowed - double err = 0; - int count = 0; - - for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; pm++) { - if (aPersModel[pm]->hasModeData(mode)) { - count++; - switch (mode) { - case LCP_MODE_VIGNETTE: - err += aPersModel[pm]->vignette.mean_error; - break; - case LCP_MODE_DISTORTION: - err += aPersModel[pm]->base.mean_error; - break; - case LCP_MODE_CA: - err += rtengine::max(aPersModel[pm]->chromRG.mean_error, aPersModel[pm]->chromG.mean_error, aPersModel[pm]->chromBG.mean_error); - break; - } - } - } - - // Only if we have enough frames, filter out errors - int filtered = 0; - - if (count >= minFramesLeft) { - if (count > 0) { - err /= (double)count; - } - - // Now mark all the bad ones as bad, and hasModeData will return false; - for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; pm++) { - if (aPersModel[pm]->hasModeData(mode)) { - switch (mode) { - case LCP_MODE_VIGNETTE: - if (aPersModel[pm]->vignette.mean_error > maxAvgDevFac * err) { - aPersModel[pm]->vignette.bad_error = true; - filtered++; - } - break; - case LCP_MODE_DISTORTION: - if (aPersModel[pm]->base.mean_error > maxAvgDevFac * err) { - aPersModel[pm]->base.bad_error = true; - filtered++; - } - break; - case LCP_MODE_CA: - if ((aPersModel[pm]->chromRG.mean_error > maxAvgDevFac * err || aPersModel[pm]->chromG.mean_error > maxAvgDevFac * err - || aPersModel[pm]->chromBG.mean_error > maxAvgDevFac * err)) { - aPersModel[pm]->chromRG.bad_error = aPersModel[pm]->chromG.bad_error = aPersModel[pm]->chromBG.bad_error = true; - filtered++; - } - break; - } - } - } - - if (settings->verbose) { - printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered*100./count, maxAvgDevFac, count-filtered); - } - } - - return filtered; -} - - -void LCPProfile::calcParams(LCPCorrectionMode mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const -{ - float euler = exp(1.0); - - // find the frames with the least distance, focal length wise - LCPPersModel *pLow = nullptr, *pHigh = nullptr; - - float focalLengthLog = log(focalLength); //, apertureLog=aperture>0 ? log(aperture) : 0; - float focusDistLog = focusDist > 0 ? log(focusDist) + euler : 0; - - // Pass 1: determining best focal length, if possible different focusDistances (for the focDist is not given case) - for (int pm = 0; pm < persModelCount; pm++) { - float f = aPersModel[pm]->focLen; - - if (aPersModel[pm]->hasModeData(mode)) { - if (f <= focalLength && (pLow == nullptr || f > pLow->focLen || (focusDist == 0 && f == pLow->focLen && pLow->focDist > aPersModel[pm]->focDist))) { - pLow = aPersModel[pm]; - } - - if (f >= focalLength && (pHigh == nullptr || f < pHigh->focLen || (focusDist == 0 && f == pHigh->focLen && pHigh->focDist < aPersModel[pm]->focDist))) { - pHigh = aPersModel[pm]; - } - } - } - - if (!pLow) { - pLow = pHigh; - } else if (!pHigh) { - pHigh = pLow; - } else { - // Pass 2: We have some, so take the best aperture for vignette and best focus for CA and distortion - // there are usually several frame per focal length. In the end pLow will have both flen and apterure/focdis below the target, - // and vice versa pHigh - float bestFocLenLow = pLow->focLen, bestFocLenHigh = pHigh->focLen; - - for (int pm = 0; pm < persModelCount; pm++) { - float aper = aPersModel[pm]->aperture; // float aperLog=log(aper); - float focDist = aPersModel[pm]->focDist; - float focDistLog = log(focDist) + euler; - double meanErr; - if (aPersModel[pm]->hasModeData(mode)) { - double lowMeanErr, highMeanErr; - switch (mode) { - case LCP_MODE_VIGNETTE: - meanErr = aPersModel[pm]->vignette.mean_error; - lowMeanErr = pLow->vignette.mean_error; - highMeanErr = pHigh->vignette.mean_error; - break; - case LCP_MODE_DISTORTION: - meanErr = aPersModel[pm]->base.mean_error; - lowMeanErr = pLow->base.mean_error; - highMeanErr = pHigh->base.mean_error; - break; - default: // LCP_MODE_CA - meanErr = aPersModel[pm]->chromG.mean_error; - lowMeanErr = pLow->chromG.mean_error; - highMeanErr = pHigh->chromG.mean_error; - break; - } - - if (aperture > 0 && mode != LCP_MODE_CA) { - if (aPersModel[pm]->focLen == bestFocLenLow && ( - (aper == aperture && lowMeanErr > meanErr) - || (aper >= aperture && aper < pLow->aperture && pLow->aperture > aperture) - || (aper <= aperture && (pLow->aperture > aperture || fabs(aperture - aper) < fabs(aperture - pLow->aperture))))) { - pLow = aPersModel[pm]; - } - - if (aPersModel[pm]->focLen == bestFocLenHigh && ( - (aper == aperture && highMeanErr > meanErr) - || (aper <= aperture && aper > pHigh->aperture && pHigh->aperture < aperture) - || (aper >= aperture && (pHigh->aperture < aperture || fabs(aperture - aper) < fabs(aperture - pHigh->aperture))))) { - pHigh = aPersModel[pm]; - } - } else if (focusDist > 0 && mode != LCP_MODE_VIGNETTE) { - // by focus distance - if (aPersModel[pm]->focLen == bestFocLenLow && ( - (focDist == focusDist && lowMeanErr > meanErr) - || (focDist >= focusDist && focDist < pLow->focDist && pLow->focDist > focusDist) - || (focDist <= focusDist && (pLow->focDist > focusDist || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (log(pLow->focDist) + euler)))))) { - pLow = aPersModel[pm]; - } - - if (aPersModel[pm]->focLen == bestFocLenHigh && ( - (focDist == focusDist && highMeanErr > meanErr) - || (focDist <= focusDist && focDist > pHigh->focDist && pHigh->focDist < focusDist) - || (focDist >= focusDist && (pHigh->focDist < focusDist || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (log(pHigh->focDist) + euler)))))) { - pHigh = aPersModel[pm]; - } - } else { - // no focus distance available, just error - if (aPersModel[pm]->focLen == bestFocLenLow && lowMeanErr > meanErr) { - pLow = aPersModel[pm]; - } - - if (aPersModel[pm]->focLen == bestFocLenHigh && highMeanErr > meanErr) { - pHigh = aPersModel[pm]; - } - } - - } - } - } - - if (pLow != nullptr && pHigh != nullptr) { - // average out the factors, linear interpolation in logarithmic scale - float facLow = 0.5; - bool focLenOnSpot = false; // pretty often, since max/min are often as frames in LCP - - // There is as foclen range, take that as basis - if (pLow->focLen < pHigh->focLen) { - facLow = (log(pHigh->focLen) - focalLengthLog) / (log(pHigh->focLen) - log(pLow->focLen)); - } else { - focLenOnSpot = pLow->focLen == pHigh->focLen && pLow->focLen == focalLength; - } - - // and average the other factor if available - if (mode == LCP_MODE_VIGNETTE && pLow->aperture < aperture && pHigh->aperture > aperture) { - // Mix in aperture - float facAperLow = (pHigh->aperture - aperture) / (pHigh->aperture - pLow->aperture); - facLow = focLenOnSpot ? facAperLow : (0.5 * facLow + 0.5 * facAperLow); - } else if (mode != LCP_MODE_VIGNETTE && focusDist > 0 && pLow->focDist < focusDist && pHigh->focDist > focusDist) { - // focus distance for all else (if focus distance is given) - float facDistLow = (log(pHigh->focDist) + euler - focusDistLog) / (log(pHigh->focDist) - log(pLow->focDist)); - facLow = focLenOnSpot ? facDistLow : (0.8 * facLow + 0.2 * facDistLow); - } - - switch (mode) { - case LCP_MODE_VIGNETTE: - pCorr1->merge(pLow->vignette, pHigh->vignette, facLow); - break; - - case LCP_MODE_DISTORTION: - pCorr1->merge(pLow->base, pHigh->base, facLow); - break; - - case LCP_MODE_CA: - pCorr1->merge(pLow->chromRG, pHigh->chromRG, facLow); - pCorr2->merge(pLow->chromG, pHigh->chromG, facLow); - pCorr3->merge(pLow->chromBG, pHigh->chromBG, facLow); - break; - } - - if (settings->verbose) { - printf("LCP mode=%i, dist: %g found frames: Fno %g-%g; FocLen %g-%g; Dist %g-%g with weight %g\n", mode, focusDist, pLow->aperture, pHigh->aperture, pLow->focLen, pHigh->focLen, pLow->focDist, pHigh->focDist, facLow); - } - } else { - if (settings->verbose) { - printf("Error: LCP file contained no %s parameters\n", mode == LCP_MODE_VIGNETTE ? "vignette" : mode == LCP_MODE_DISTORTION ? "distortion" : "CA" ); - } - } -} - -void LCPProfile::print() const -{ - printf("=== Profile %s\n", profileName.c_str()); - printf("Frames: %i, RAW: %i; Fisheye: %i; Sensorformat: %f\n", persModelCount, isRaw, isFisheye, sensorFormatFactor); - - for (int pm = 0; pm < persModelCount; pm++) { - aPersModel[pm]->print(); - } -} - -void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, const char **attr) -{ - LCPProfile *pProf = static_cast(pLCPProfile); - bool parseAttr = false; - - if (*pProf->inInvalidTag) { - return; // We ignore everything in dirty tag till it's gone - } - - // clean up tagname - const char* src = strrchr(el, ':'); - - if (src == nullptr) { - src = const_cast(el); - } else { - src++; - } - - strcpy(pProf->lastTag, src); - - if (!strcmp("VignetteModelPiecewiseParam", src)) { - strcpy(pProf->inInvalidTag, src); - } - - if (!strcmp("CameraProfiles", src)) { - pProf->inCamProfiles = true; - } - - if (!strcmp("AlternateLensIDs", src)) { - pProf->inAlternateLensID = true; - } - - if (!strcmp("AlternateLensNames", src)) { - pProf->inAlternateLensNames = true; - } - - if (!pProf->inCamProfiles || pProf->inAlternateLensID || pProf->inAlternateLensNames) { - return; - } - - if (!strcmp("li", src)) { - pProf->pCurPersModel = new LCPPersModel(); - pProf->pCurCommon = &pProf->pCurPersModel->base; // iterated to next tags within persModel - return; - } - - if (!strcmp("PerspectiveModel", src)) { - pProf->firstLIDone = true; - pProf->inPerspect = true; - return; - } else if (!strcmp("FisheyeModel", src)) { - pProf->firstLIDone = true; - pProf->inPerspect = true; - pProf->isFisheye = true; // just misses third param, and different path, rest is the same - return; - } else if (!strcmp("Description", src)) { - parseAttr = true; - } - - // Move pointer to general section - if (pProf->inPerspect) { - if (!strcmp("ChromaticRedGreenModel", src)) { - pProf->pCurCommon = &pProf->pCurPersModel->chromRG; - parseAttr = true; - } else if (!strcmp("ChromaticGreenModel", src)) { - pProf->pCurCommon = &pProf->pCurPersModel->chromG; - parseAttr = true; - } else if (!strcmp("ChromaticBlueGreenModel", src)) { - pProf->pCurCommon = &pProf->pCurPersModel->chromBG; - parseAttr = true; - } else if (!strcmp("VignetteModel", src)) { - pProf->pCurCommon = &pProf->pCurPersModel->vignette; - parseAttr = true; - } - } - - // some profiles (espc. Pentax) have a different structure that is attributes based - // simulate tags by feeding them in - if (parseAttr && attr != nullptr) { - for (int i = 0; attr[i]; i += 2) { - const char* nameStart = strrchr(attr[i], ':'); - - if (nameStart == nullptr) { - nameStart = const_cast(attr[i]); - } else { - nameStart++; - } - - strncpy(pProf->lastTag, nameStart, 255); - - pProf->handle_text(attr[i+1]); - //XmlTextHandler(pLCPProfile, attr[i + 1], strlen(attr[i + 1])); - } - } -} - -void XMLCALL LCPProfile::XmlTextHandler(void *pLCPProfile, const XML_Char *s, int len) -{ - LCPProfile *pProf = static_cast(pLCPProfile); - - if (!pProf->inCamProfiles || pProf->inAlternateLensID || pProf->inAlternateLensNames || *pProf->inInvalidTag) { - return; - } - - for (int i = 0; i < len; ++i) { - pProf->textbuf << s[i]; - } -} - - -void LCPProfile::handle_text(std::string text) -{ - // Check if it contains non-whitespaces (there are several calls to this for one tag unfortunately) - bool onlyWhiteSpace = true; - for (size_t i = 0; i < text.size(); ++i) { - if (!isspace(text[i])) { - onlyWhiteSpace = false; - break; - } - } - - if (onlyWhiteSpace) { - return; - } - - LCPProfile *pProf = this; - - // convert to null terminated - char* tag = pProf->lastTag; - - const char* raw = text.c_str(); - - // Common data section - if (!pProf->firstLIDone) { - // Generic tags are the same for all - if (!strcmp("ProfileName", tag)) { - pProf->profileName = Glib::ustring(raw); - } else if (!strcmp("Model", tag)) { - pProf->camera = Glib::ustring(raw); - } else if (!strcmp("Lens", tag)) { - pProf->lens = Glib::ustring(raw); - } else if (!strcmp("CameraPrettyName", tag)) { - pProf->cameraPrettyName = Glib::ustring(raw); - } else if (!strcmp("LensPrettyName", tag)) { - pProf->lensPrettyName = Glib::ustring(raw); - } else if (!strcmp("CameraRawProfile", tag)) { - pProf->isRaw = !strcmp("True", raw); - } - } - - // --- Now all floating points. Must replace local dot characters - // WARNING: called by different threads, that may run on different local settings, - // so don't use system params - if (atof("1,2345") == 1.2345) { - for (size_t i = 0; i < text.size(); ++i) { - if (text[i] == '.') { - text[i] = ','; - } - } - raw = text.c_str(); - } - - if (!pProf->firstLIDone) { - if (!strcmp("SensorFormatFactor", tag)) { - pProf->sensorFormatFactor = atof(raw); - } - } - - // Perspective model base data - if (!strcmp("FocalLength", tag)) { - pProf->pCurPersModel->focLen = atof(raw); - } else if (!strcmp("FocusDistance", tag)) { - double focDist = atof(raw); - pProf->pCurPersModel->focDist = focDist < 10000 ? focDist : 10000; - } else if (!strcmp("ApertureValue", tag)) { - pProf->pCurPersModel->aperture = atof(raw); - } - - // Section depended - if (!strcmp("FocalLengthX", tag)) { - pProf->pCurCommon->foc_len_x = atof(raw); - } else if (!strcmp("FocalLengthY", tag)) { - pProf->pCurCommon->foc_len_y = atof(raw); - } else if (!strcmp("ImageXCenter", tag)) { - pProf->pCurCommon->img_center_x = atof(raw); - } else if (!strcmp("ImageYCenter", tag)) { - pProf->pCurCommon->img_center_y = atof(raw); - } else if (!strcmp("ScaleFactor", tag)) { - pProf->pCurCommon->scale_factor = atof(raw); - } else if (!strcmp("ResidualMeanError", tag)) { - pProf->pCurCommon->mean_error = atof(raw); - } else if (!strcmp("RadialDistortParam1", tag) || !strcmp("VignetteModelParam1", tag)) { - pProf->pCurCommon->param[0] = atof(raw); - } else if (!strcmp("RadialDistortParam2", tag) || !strcmp("VignetteModelParam2", tag)) { - pProf->pCurCommon->param[1] = atof(raw); - } else if (!strcmp("RadialDistortParam3", tag) || !strcmp("VignetteModelParam3", tag)) { - pProf->pCurCommon->param[2] = atof(raw); - } else if (!strcmp("RadialDistortParam4", tag) || !strcmp("TangentialDistortParam1", tag)) { - pProf->pCurCommon->param[3] = atof(raw); - } else if (!strcmp("RadialDistortParam5", tag) || !strcmp("TangentialDistortParam2", tag)) { - pProf->pCurCommon->param[4] = atof(raw); - } -} - -void XMLCALL LCPProfile::XmlEndHandler(void *pLCPProfile, const char *el) -{ - LCPProfile *pProf = static_cast(pLCPProfile); - - pProf->handle_text(pProf->textbuf.str()); - pProf->textbuf.str(""); - - // We ignore everything in dirty tag till it's gone - if (*pProf->inInvalidTag) { - if (strstr(el, pProf->inInvalidTag)) { - *pProf->inInvalidTag = 0; - } - - return; - } - - if (strstr(el, ":CameraProfiles")) { - pProf->inCamProfiles = false; - } - - if (strstr(el, ":AlternateLensIDs")) { - pProf->inAlternateLensID = false; - } - - if (strstr(el, ":AlternateLensNames")) { - pProf->inAlternateLensNames = false; - } - - if (!pProf->inCamProfiles || pProf->inAlternateLensID || pProf->inAlternateLensNames) { - return; - } - - if (strstr(el, ":PerspectiveModel") || strstr(el, ":FisheyeModel")) { - pProf->inPerspect = false; - } else if (strstr(el, ":li")) { - pProf->aPersModel[pProf->persModelCount] = pProf->pCurPersModel; - pProf->pCurPersModel = nullptr; - pProf->persModelCount++; - } -} - -// Generates as singleton -LCPStore* LCPStore::getInstance() -{ - static LCPStore instance_; - return &instance_; -} - - -LCPStore::~LCPStore() -{ - for (auto &p : profileCache) { - delete p.second; - } -} - - -LCPProfile* LCPStore::getProfile (Glib::ustring filename) -{ - if (filename.length() == 0 || !isValidLCPFileName(filename)) { - return nullptr; - } - - MyMutex::MyLock lock(mtx); - - std::map::iterator r = profileCache.find (filename); - - if (r != profileCache.end()) { - return r->second; - } - - // Add profile (if exists) - profileCache[filename] = new LCPProfile(filename); - if (settings->verbose) { - profileCache[filename]->print(); - } - return profileCache[filename]; -} - -bool LCPStore::isValidLCPFileName(Glib::ustring filename) const -{ - if (!Glib::file_test (filename, Glib::FILE_TEST_EXISTS) || Glib::file_test (filename, Glib::FILE_TEST_IS_DIR)) { - return false; - } - - size_t pos = filename.find_last_of ('.'); - return pos > 0 && !filename.casefold().compare (pos, 4, ".lcp"); -} - -Glib::ustring LCPStore::getDefaultCommonDirectory() const -{ - Glib::ustring dir; - -#ifdef WIN32 - WCHAR pathW[MAX_PATH] = {0}; - - if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_COMMON_APPDATA, false)) { - char pathA[MAX_PATH]; - WideCharToMultiByte(CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); - Glib::ustring fullDir = Glib::ustring(pathA) + Glib::ustring("\\Adobe\\CameraRaw\\LensProfiles\\1.0"); - - if (Glib::file_test (fullDir, Glib::FILE_TEST_IS_DIR)) { - dir = fullDir; - } - } - -#endif - - // TODO: Add Mac paths here - - return dir; -} diff --git a/rtengine/lcp.h b/rtengine/lcp.h index 291710c5f..cbeff3259 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -21,22 +21,24 @@ #include #include +#include #include #include #include #include +#include "cache.h" #include "imagefloat.h" #include "opthelper.h" namespace rtengine { -enum LCPCorrectionMode { - LCP_MODE_VIGNETTE = 0, - LCP_MODE_DISTORTION = 1, - LCP_MODE_CA = 2 +enum class LCPCorrectionMode { + VIGNETTE, + DISTORTION, + CA }; // Perspective model common data, also used for Vignette and Fisheye @@ -44,10 +46,20 @@ class LCPModelCommon final { public: LCPModelCommon(); + bool empty() const; // is it empty void print() const; // printf all values void merge(const LCPModelCommon& a, const LCPModelCommon& b, float facA); - void prepareParams(int fullWidth, int fullHeight, float focalLength, float focalLength35mm, float sensorFormatFactor, bool swapXY, bool mirrorX, bool mirrorY); + void prepareParams( + int fullWidth, + int fullHeight, + float focalLength, + float focalLength35mm, + float sensorFormatFactor, + bool swapXY, + bool mirrorX, + bool mirrorY + ); //private: using Param = std::array; @@ -72,97 +84,114 @@ public: VignParam vign_param; }; -class LCPPersModel -{ -public: - float focLen, focDist, aperture; // this is what it refers to - - LCPModelCommon base; // base perspective correction - LCPModelCommon chromRG, chromG, chromBG; // red/green, green, blue/green (may be empty) - LCPModelCommon vignette; // vignette (may be empty) - - LCPPersModel(); - bool hasModeData(LCPCorrectionMode mode) const; - void print() const; -}; - - class LCPProfile { - // Temporary data for parsing - bool inCamProfiles, firstLIDone, inPerspect, inAlternateLensID, inAlternateLensNames; - char lastTag[256], inInvalidTag[256]; - LCPPersModel* pCurPersModel; - LCPModelCommon* pCurCommon; - - static void XMLCALL XmlStartHandler(void *pLCPProfile, const char *el, const char **attr); - static void XMLCALL XmlTextHandler (void *pLCPProfile, const XML_Char *s, int len); - static void XMLCALL XmlEndHandler (void *pLCPProfile, const char *el); - - int filterBadFrames(LCPCorrectionMode mode, double maxAvgDevFac, int minFramesLeft); - - void handle_text(std::string text); - std::ostringstream textbuf; - public: + explicit LCPProfile(const Glib::ustring& fname); + ~LCPProfile(); + + void calcParams( + LCPCorrectionMode mode, + float focalLength, + float focusDist, + float aperture, + LCPModelCommon* pCorr1, + LCPModelCommon* pCorr2, + LCPModelCommon *pCorr3 + ) const; // Interpolates between the persModels frames + + void print() const; + +//private: // Common data - Glib::ustring profileName, lensPrettyName, cameraPrettyName, lens, camera; // lens/camera(=model) can be auto-matched with DNG - bool isRaw, isFisheye; + Glib::ustring profileName; + Glib::ustring lensPrettyName; + Glib::ustring cameraPrettyName; + Glib::ustring lens; + Glib::ustring camera; // lens/camera(=model) can be auto-matched with DNG + bool isRaw; + bool isFisheye; float sensorFormatFactor; int persModelCount; +private: + class LCPPersModel; + + int filterBadFrames(LCPCorrectionMode mode, double maxAvgDevFac, int minFramesLeft); + + void handle_text(const std::string& text); + + static void XMLCALL XmlStartHandler(void* pLCPProfile, const char* el, const char** attr); + static void XMLCALL XmlTextHandler(void* pLCPProfile, const XML_Char* s, int len); + static void XMLCALL XmlEndHandler(void* pLCPProfile, const char* el); + + // Temporary data for parsing + bool inCamProfiles; + bool firstLIDone; + bool inPerspect; + bool inAlternateLensID; + bool inAlternateLensNames; + char lastTag[256]; + char inInvalidTag[256]; + LCPPersModel* pCurPersModel; + LCPModelCommon* pCurCommon; + + std::ostringstream textbuf; + // The correction frames - static const int MaxPersModelCount = 3000; + static constexpr int MaxPersModelCount = 3000; LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC! - - explicit LCPProfile(const Glib::ustring &fname); - ~LCPProfile(); - - void calcParams(LCPCorrectionMode mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames - - void print() const; }; class LCPStore { - MyMutex mtx; +public: + static LCPStore* getInstance(); + + bool isValidLCPFileName(const Glib::ustring& filename) const; + std::shared_ptr getProfile(const Glib::ustring& filename) const; + Glib::ustring getDefaultCommonDirectory() const; + +private: + LCPStore(unsigned int _cache_size = 32); // Maps file name to profile as cache - std::map profileCache; - -public: - ~LCPStore(); - Glib::ustring getDefaultCommonDirectory() const; - bool isValidLCPFileName(Glib::ustring filename) const; - LCPProfile* getProfile(Glib::ustring filename); - - static LCPStore* getInstance(); + mutable Cache> cache; }; -#define lcpStore LCPStore::getInstance() - - // Once precalculated class to correct a point class LCPMapper { +public: + // Precalculates the mapper + LCPMapper( + const std::shared_ptr& pProf, + float focalLength, + float focalLength35mm, + float focusDist, + float aperture, + bool vignette, + bool useCADistP, + int fullWidth, + int fullHeight, + const CoarseTransformParams& coarse, + int rawRotationDeg + ); + bool isCACorrectionAvailable() const; + + void correctDistortion(double& x, double& y, double scale) const; // MUST be the first stage + void correctCA(double& x, double& y, int channel) const; + void processVignetteLine(int width, int y, float* line) const; + void processVignetteLine3Channels(int width, int y, float* line) const; + +private: + bool enableCA; // is the mapper capable if CA correction? bool useCADist; // should the distortion in the CA info be used? bool swapXY; LCPModelCommon mc; LCPModelCommon chrom[3]; // in order RedGreen/Green/BlueGreen bool isFisheye; - -public: - bool enableCA; // is the mapper capable if CA correction? - - // precalculates the mapper. - LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, int fullWidth, int fullHeight, - const CoarseTransformParams& coarse, int rawRotationDeg); - - void correctDistortion(double& x, double& y, double scale) const; // MUST be the first stage - void correctCA(double& x, double& y, int channel) const; - void processVignetteLine(int width, int y, float *line) const; - void processVignetteLine3Channels(int width, int y, float *line) const; }; } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 148d17ee9..718b518ae 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1855,7 +1855,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le // Correct vignetting of lens profile if (!hasFlatField && lensProf.useVign) { - LCPProfile *pLCPProf = lcpStore->getProfile(lensProf.lcpFile); + const std::shared_ptr pLCPProf = LCPStore::getInstance()->getProfile(lensProf.lcpFile); if (pLCPProf) { // don't check focal length to allow distortion correction for lenses without chip, also pass dummy focal length 1 in case of 0 LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 0855ef03f..91fc55687 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -41,7 +41,7 @@ LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("T filterLCP->add_pattern("*.LCP"); fcbLCPFile->add_filter(filterLCP); - Glib::ustring defDir = lcpStore->getDefaultCommonDirectory(); + Glib::ustring defDir = LCPStore::getInstance()->getDefaultCommonDirectory(); if (!defDir.empty()) { #ifdef WIN32 @@ -82,7 +82,7 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa disableListener (); conUseDist.block(true); - if (!pp->lensProf.lcpFile.empty() && lcpStore->isValidLCPFileName(pp->lensProf.lcpFile)) { + if (!pp->lensProf.lcpFile.empty() && LCPStore::getInstance()->isValidLCPFileName(pp->lensProf.lcpFile)) { fcbLCPFile->set_filename (pp->lensProf.lcpFile); updateDisabled(true); } else { @@ -128,7 +128,7 @@ void LensProfilePanel::setRawMeta(bool raw, const rtengine::ImageMetaData* pMeta void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) { - if (lcpStore->isValidLCPFileName(fcbLCPFile->get_filename())) { + if (LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename())) { pp->lensProf.lcpFile = fcbLCPFile->get_filename(); } else { pp->lensProf.lcpFile = ""; @@ -149,7 +149,7 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited void LensProfilePanel::onLCPFileChanged() { lcpFileChanged = true; - updateDisabled(lcpStore->isValidLCPFileName(fcbLCPFile->get_filename())); + updateDisabled(LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename())); if (listener) { listener->panelChanged (EvLCPFile, Glib::path_get_basename(fcbLCPFile->get_filename())); From 099e6e9f678c46b3fd047a3b833f25e12b156445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sat, 9 Sep 2017 20:30:02 +0200 Subject: [PATCH 087/126] Don't use `` for trivial cases (#4056) --- rtgui/rtwindow.cc | 41 +++++++++++++++-------------------------- rtgui/xtransprocess.cc | 28 +++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 9af387567..80e481315 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -18,7 +18,6 @@ */ #include -#include #include "rtwindow.h" #include "options.h" #include "preferences.h" @@ -315,37 +314,27 @@ void RTWindow::on_realize () // Display release notes only if new major version. // Pattern matches "5.1" from "5.1-23-g12345678" - std::string vs[] = {versionString, options.version}; - std::regex pat ("(^[0-9.]+).*"); - std::smatch sm; + const std::string vs[] = {versionString, options.version}; std::vector vMajor; - for (const auto &v : vs) { - if (std::regex_match (v, sm, pat)) { - if (sm.size() == 2) { - std::ssub_match smsub = sm[1]; - vMajor.push_back (smsub.str()); - } - } + for (const auto& v : vs) { + vMajor.emplace_back(v, 0, v.find_first_not_of("0123456789.")); } - if (vMajor.size() == 2) { - if (vMajor[0] != vMajor[1]) { + if (vMajor.size() == 2 && vMajor[0] != vMajor[1]) { + // Update the version parameter with the right value + options.version = versionString; - // Update the version parameter with the right value - options.version = versionString; + splash = new Splash (*this); + splash->set_transient_for (*this); + splash->signal_delete_event().connect ( sigc::mem_fun (*this, &RTWindow::splashClosed) ); - splash = new Splash (*this); - splash->set_transient_for (*this); - splash->signal_delete_event().connect ( sigc::mem_fun (*this, &RTWindow::splashClosed) ); - - if (splash->hasReleaseNotes()) { - splash->showReleaseNotes(); - splash->show (); - } else { - delete splash; - splash = nullptr; - } + if (splash->hasReleaseNotes()) { + splash->showReleaseNotes(); + splash->show (); + } else { + delete splash; + splash = nullptr; } } } diff --git a/rtgui/xtransprocess.cc b/rtgui/xtransprocess.cc index a663ac7c5..453f0a53d 100644 --- a/rtgui/xtransprocess.cc +++ b/rtgui/xtransprocess.cc @@ -19,7 +19,7 @@ #include "xtransprocess.h" #include "options.h" #include "guiutils.h" -#include + using namespace rtengine; using namespace rtengine::procparams; @@ -30,8 +30,30 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP method = Gtk::manage (new MyComboBoxText ()); for( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) { - static const std::regex what ("[() -]"); - const std::string langKey = std::regex_replace (procparams::RAWParams::XTransSensor::methodstring[i], what, ""); + const std::string langKey = + [i]() -> std::string + { + const std::string str(procparams::RAWParams::XTransSensor::methodstring[i]); + + std::string res; + for (const auto& c : str) { + switch (c) { + case '(': + case ')': + case ' ': + case '-': { + continue; + } + + default: { + res += c; + break; + } + } + } + + return res; + }(); method->append(M("TP_RAW_" + Glib::ustring(langKey).uppercase())); } From 0f197bf1a4b1e9660e3f5264cca3d869cf6902ab Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 9 Sep 2017 22:31:59 +0200 Subject: [PATCH 088/126] lensfun: properly group lenses by maker in the UI --- rtengine/rtlensfun.cc | 10 ++++++++++ rtengine/rtlensfun.h | 1 + rtgui/lensprofile.cc | 27 +++++++++++++-------------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index c90de08d9..9b35d038f 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -184,6 +184,16 @@ bool LFLens::ok() const } +Glib::ustring LFLens::getMake() const +{ + if (data_) { + return data_->Maker; + } else { + return ""; + } +} + + Glib::ustring LFLens::getLens() const { if (data_) { diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index cb8748eb3..640b6a18c 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -73,6 +73,7 @@ class LFLens { public: LFLens(); bool ok() const; + Glib::ustring getMake() const; Glib::ustring getLens() const; Glib::ustring getDisplayString() const { return getLens(); } private: diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index b6af0d8d0..1280a3524 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -360,12 +360,8 @@ void LensProfilePanel::fillLensfunLenses() std::map> lenses; auto lenslist = LFDatabase::getInstance()->getLenses(); for (auto &l : lenslist) { - auto name = l.getDisplayString(); - auto pos = name.find_first_of(' '); - Glib::ustring make = "(Unknown)"; - if (pos != Glib::ustring::npos) { - make = name.substr(0, pos); - } + auto name = l.getLens(); + auto make = l.getMake(); lenses[make].insert(name); } for (auto &p : lenses) { @@ -415,15 +411,8 @@ bool LensProfilePanel::setLensfunLens(const Glib::ustring &lens) return true; } - // search for the active row - auto pos = lens.find_first_of(' '); - Glib::ustring make = "(Unknown)"; - if (pos != Glib::ustring::npos) { - make = lens.substr(0, pos); - } - for (auto row : lensfunLensModel->children()) { - if (row[lensfunModelLens.lens] == make) { + if (lens.find(row[lensfunModelLens.lens]) == 0) { auto &c = row.children(); for (auto it = c.begin(), end = c.end(); it != end; ++it) { auto &childrow = *it; @@ -502,6 +491,16 @@ void LensProfilePanel::onCorrModeChanged() ckbUseVign->set_sensitive(true); ckbUseCA->set_sensitive(false); + if (metadata) { + disableListener(); + const LFDatabase *db = LFDatabase::getInstance(); + LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel()); + LFLens l = db->findLens(c, metadata->getLens()); + setLensfunCamera(c.getMake(), c.getModel()); + setLensfunLens(l.getLens()); + enableListener(); + } + mode = M("LENSPROFILE_CORRECTION_AUTOMATCH"); } else if (corrLensfunManual->get_active()) { useLensfunChanged = true; From 07dfda5d73600b7a27ff918e5de3f337142ba262 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 9 Sep 2017 23:15:56 +0200 Subject: [PATCH 089/126] fixed UI deadlock introduced by 0f197bf1a4b1e9660e3f5264cca3d869cf6902ab --- rtgui/lensprofile.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 1280a3524..9688bf013 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -492,13 +492,15 @@ void LensProfilePanel::onCorrModeChanged() ckbUseCA->set_sensitive(false); if (metadata) { - disableListener(); + bool b = disableListener(); const LFDatabase *db = LFDatabase::getInstance(); LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel()); LFLens l = db->findLens(c, metadata->getLens()); setLensfunCamera(c.getMake(), c.getModel()); setLensfunLens(l.getLens()); - enableListener(); + if (b) { + enableListener(); + } } mode = M("LENSPROFILE_CORRECTION_AUTOMATCH"); From 376cb09f067b95c23ef8bce3802f8c01987e823c Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 00:49:06 +0200 Subject: [PATCH 090/126] use a static initialization of the list of lensfun cameras and lenses --- rtgui/lensprofile.cc | 146 ++++++++++++++++++++++++------------------- rtgui/lensprofile.h | 39 +++++++----- 2 files changed, 105 insertions(+), 80 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 9688bf013..28fef16cf 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -29,6 +29,8 @@ using namespace rtengine; using namespace rtengine::procparams; +LensProfilePanel::LFDbHelper *LensProfilePanel::lf(nullptr); + LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")), lcpFileChanged(false), @@ -43,6 +45,10 @@ LensProfilePanel::LensProfilePanel () : lensfunCameraChanged(false), lensfunLensChanged(false) { + if (!lf) { + lf = new LFDbHelper(); + } + corrOff = Gtk::manage(new Gtk::RadioButton(M("LENSPROFILE_CORRECTION_OFF"))); pack_start(*corrOff); @@ -54,30 +60,23 @@ LensProfilePanel::LensProfilePanel () : corrLensfunManual = Gtk::manage(new Gtk::RadioButton(corrGroup, M("LENSPROFILE_CORRECTION_MANUAL"))); pack_start(*corrLensfunManual); - lensfunCameraModel = Gtk::TreeStore::create(lensfunModelCam); - lensfunLensModel = Gtk::TreeStore::create(lensfunModelLens); - lensfunCameras = Gtk::manage(new MyComboBox()); - lensfunCameras->set_model(lensfunCameraModel); - lensfunCameras->pack_start(lensfunModelCam.model); + lensfunCameras->set_model(lf->lensfunCameraModel); + lensfunCameras->pack_start(lf->lensfunModelCam.model); lensfunLenses = Gtk::manage(new MyComboBox()); - lensfunLenses->set_model(lensfunLensModel); - lensfunLenses->pack_start(lensfunModelLens.lens); + lensfunLenses->set_model(lf->lensfunLensModel); + lensfunLenses->pack_start(lf->lensfunModelLens.prettylens); Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("EXIFFILTER_CAMERA"))), Gtk::PACK_SHRINK, 4); hb->pack_start(*lensfunCameras); pack_start(*hb); - fillLensfunCameras(); - hb = Gtk::manage(new Gtk::HBox()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("EXIFFILTER_LENS"))), Gtk::PACK_SHRINK, 4); hb->pack_start(*lensfunLenses); pack_start(*hb); - fillLensfunLenses(); - corrLcpFile = Gtk::manage(new Gtk::RadioButton(corrGroup)); hbLCPFile = Gtk::manage(new Gtk::HBox()); hbLCPFile->pack_start(*corrLcpFile, Gtk::PACK_SHRINK); @@ -249,15 +248,15 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited pp->lensProf.lfAutoMatch = corrLensfunAuto->get_active(); auto itc = lensfunCameras->get_active(); if (itc) { - pp->lensProf.lfCameraMake = (*itc)[lensfunModelCam.make]; - pp->lensProf.lfCameraModel = (*itc)[lensfunModelCam.model]; + pp->lensProf.lfCameraMake = (*itc)[lf->lensfunModelCam.make]; + pp->lensProf.lfCameraModel = (*itc)[lf->lensfunModelCam.model]; } else { pp->lensProf.lfCameraMake = ""; pp->lensProf.lfCameraModel = ""; } auto itl = lensfunLenses->get_active(); if (itl) { - pp->lensProf.lfLens = (*itl)[lensfunModelLens.lens]; + pp->lensProf.lfLens = (*itl)[lf->lensfunModelLens.lens]; } else { pp->lensProf.lfLens = ""; } @@ -335,61 +334,21 @@ void LensProfilePanel::setBatchMode(bool yes) } -void LensProfilePanel::fillLensfunCameras() -{ - std::map> camnames; - auto camlist = LFDatabase::getInstance()->getCameras(); - for (auto &c : camlist) { - camnames[c.getMake()].insert(c.getModel()); - } - for (auto &p : camnames) { - Gtk::TreeModel::Row row = *(lensfunCameraModel->append()); - row[lensfunModelCam.make] = p.first; - row[lensfunModelCam.model] = p.first; - for (auto &c : p.second) { - Gtk::TreeModel::Row child = *(lensfunCameraModel->append(row.children())); - child[lensfunModelCam.make] = p.first; - child[lensfunModelCam.model] = c; - } - } -} - - -void LensProfilePanel::fillLensfunLenses() -{ - std::map> lenses; - auto lenslist = LFDatabase::getInstance()->getLenses(); - for (auto &l : lenslist) { - auto name = l.getLens(); - auto make = l.getMake(); - lenses[make].insert(name); - } - for (auto &p : lenses) { - Gtk::TreeModel::Row row = *(lensfunLensModel->append()); - row[lensfunModelLens.lens] = p.first; - for (auto &c : p.second) { - Gtk::TreeModel::Row child = *(lensfunLensModel->append(row.children())); - child[lensfunModelLens.lens] = c; - } - } -} - - bool LensProfilePanel::setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model) { if (!make.empty() && !model.empty()) { auto it = lensfunCameras->get_active(); - if (it && (*it)[lensfunModelCam.make] == make && (*it)[lensfunModelCam.model] == model) { + if (it && (*it)[lf->lensfunModelCam.make] == make && (*it)[lf->lensfunModelCam.model] == model) { return true; } // search for the active row - for (auto row : lensfunCameraModel->children()) { - if (row[lensfunModelCam.make] == make) { + for (auto row : lf->lensfunCameraModel->children()) { + if (row[lf->lensfunModelCam.make] == make) { auto &c = row.children(); for (auto it = c.begin(), end = c.end(); it != end; ++it) { auto &childrow = *it; - if (childrow[lensfunModelCam.model] == model) { + if (childrow[lf->lensfunModelCam.model] == model) { lensfunCameras->set_active(it); return true; } @@ -407,16 +366,16 @@ bool LensProfilePanel::setLensfunLens(const Glib::ustring &lens) { if (!lens.empty()) { auto it = lensfunLenses->get_active(); - if (it && (*it)[lensfunModelLens.lens] == lens) { + if (it && (*it)[lf->lensfunModelLens.lens] == lens) { return true; } - for (auto row : lensfunLensModel->children()) { - if (lens.find(row[lensfunModelLens.lens]) == 0) { + for (auto row : lf->lensfunLensModel->children()) { + if (lens.find(row[lf->lensfunModelLens.lens]) == 0) { auto &c = row.children(); for (auto it = c.begin(), end = c.end(); it != end; ++it) { auto &childrow = *it; - if (childrow[lensfunModelLens.lens] == lens) { + if (childrow[lf->lensfunModelLens.lens] == lens) { lensfunLenses->set_active(it); return true; } @@ -439,7 +398,7 @@ void LensProfilePanel::onLensfunCameraChanged() lensfunCameraChanged = true; if (listener) { - Glib::ustring name = (*iter)[lensfunModelCam.model]; + Glib::ustring name = (*iter)[lf->lensfunModelCam.model]; listener->panelChanged(EvLensCorrLensfunCamera, name); } } @@ -454,7 +413,7 @@ void LensProfilePanel::onLensfunLensChanged() lensfunLensChanged = true; if (listener) { - Glib::ustring name = (*iter)[lensfunModelLens.lens]; + Glib::ustring name = (*iter)[lf->lensfunModelLens.lens]; listener->panelChanged(EvLensCorrLensfunLens, name); } } @@ -550,3 +509,62 @@ bool LensProfilePanel::checkLensfunCanCorrect(bool automatch) std::unique_ptr mod(LFDatabase::findModifier(lpp.lensProf, metadata, 100, 100, lpp.coarse, -1)); return mod.get() != nullptr; } + + +//----------------------------------------------------------------------------- +// LFDbHelper +//----------------------------------------------------------------------------- + +LensProfilePanel::LFDbHelper::LFDbHelper() +{ + lensfunCameraModel = Gtk::TreeStore::create(lensfunModelCam); + lensfunLensModel = Gtk::TreeStore::create(lensfunModelLens); + + fillLensfunCameras(); + fillLensfunLenses(); +} + +void LensProfilePanel::LFDbHelper::fillLensfunCameras() +{ + std::map> camnames; + auto camlist = LFDatabase::getInstance()->getCameras(); + for (auto &c : camlist) { + camnames[c.getMake()].insert(c.getModel()); + } + for (auto &p : camnames) { + Gtk::TreeModel::Row row = *(lensfunCameraModel->append()); + row[lensfunModelCam.make] = p.first; + row[lensfunModelCam.model] = p.first; + for (auto &c : p.second) { + Gtk::TreeModel::Row child = *(lensfunCameraModel->append(row.children())); + child[lensfunModelCam.make] = p.first; + child[lensfunModelCam.model] = c; + } + } +} + + +void LensProfilePanel::LFDbHelper::fillLensfunLenses() +{ + std::map> lenses; + auto lenslist = LFDatabase::getInstance()->getLenses(); + for (auto &l : lenslist) { + auto name = l.getLens(); + auto make = l.getMake(); + lenses[make].insert(name); + } + for (auto &p : lenses) { + Gtk::TreeModel::Row row = *(lensfunLensModel->append()); + row[lensfunModelLens.lens] = p.first; + row[lensfunModelLens.prettylens] = p.first; + for (auto &c : p.second) { + Gtk::TreeModel::Row child = *(lensfunLensModel->append(row.children())); + child[lensfunModelLens.lens] = c; + if (c.find(p.first, p.first.size()+1) == p.first.size()+1) { + child[lensfunModelLens.prettylens] = c.substr(p.first.size()+1); + } else { + child[lensfunModelLens.prettylens] = c; + } + } + } +} diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index 0894d7a98..feda2a259 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -51,32 +51,39 @@ protected: MyComboBox *lensfunCameras; MyComboBox *lensfunLenses; - class LFModelCam: public Gtk::TreeModel::ColumnRecord { + class LFDbHelper { public: - LFModelCam() { add(make); add(model); } - Gtk::TreeModelColumn make; - Gtk::TreeModelColumn model; - }; + class LFModelCam: public Gtk::TreeModel::ColumnRecord { + public: + LFModelCam() { add(make); add(model); } + Gtk::TreeModelColumn make; + Gtk::TreeModelColumn model; + }; - class LFModelLens: public Gtk::TreeModel::ColumnRecord { - public: - LFModelLens() { add(lens); } - Gtk::TreeModelColumn lens; - }; + class LFModelLens: public Gtk::TreeModel::ColumnRecord { + public: + LFModelLens() { add(lens); add(prettylens); } + Gtk::TreeModelColumn lens; + Gtk::TreeModelColumn prettylens; + }; - LFModelCam lensfunModelCam; - LFModelLens lensfunModelLens; + LFModelCam lensfunModelCam; + LFModelLens lensfunModelLens; - Glib::RefPtr lensfunCameraModel; - Glib::RefPtr lensfunLensModel; + Glib::RefPtr lensfunCameraModel; + Glib::RefPtr lensfunLensModel; + + LFDbHelper(); + void fillLensfunCameras(); + void fillLensfunLenses(); + }; + static LFDbHelper *lf; bool useLensfunChanged; bool lensfunAutoChanged; bool lensfunCameraChanged; bool lensfunLensChanged; - void fillLensfunCameras(); - void fillLensfunLenses(); bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model); bool setLensfunLens(const Glib::ustring &lens); bool checkLensfunCanCorrect(bool automatch); From ff798cdf240ffb48ee3f88e63682559de73841fa Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 00:54:07 +0200 Subject: [PATCH 091/126] print the list of found lensfun cameras and lenses when in verbose mode --- rtgui/lensprofile.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 28fef16cf..31f021819 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -526,10 +526,17 @@ LensProfilePanel::LFDbHelper::LFDbHelper() void LensProfilePanel::LFDbHelper::fillLensfunCameras() { + if (options.rtSettings.verbose) { + std::cout << "LENSFUN, scanning cameras:" << std::endl; + } std::map> camnames; auto camlist = LFDatabase::getInstance()->getCameras(); for (auto &c : camlist) { camnames[c.getMake()].insert(c.getModel()); + + if (options.rtSettings.verbose) { + std::cout << " found: " << c.getDisplayString() << std::endl; + } } for (auto &p : camnames) { Gtk::TreeModel::Row row = *(lensfunCameraModel->append()); @@ -546,12 +553,19 @@ void LensProfilePanel::LFDbHelper::fillLensfunCameras() void LensProfilePanel::LFDbHelper::fillLensfunLenses() { + if (options.rtSettings.verbose) { + std::cout << "LENSFUN, scanning lenses:" << std::endl; + } std::map> lenses; auto lenslist = LFDatabase::getInstance()->getLenses(); for (auto &l : lenslist) { auto name = l.getLens(); auto make = l.getMake(); lenses[make].insert(name); + + if (options.rtSettings.verbose) { + std::cout << " found: " << l.getDisplayString() << std::endl; + } } for (auto &p : lenses) { Gtk::TreeModel::Row row = *(lensfunLensModel->append()); From 6855dd2111a22db033cca3d526611d98ceac45a8 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 12:13:18 +0200 Subject: [PATCH 092/126] show an "(Unchanged)" entry for profiled lens correction in batch mode --- rtdata/languages/default | 1 - rtgui/lensprofile.cc | 31 +++++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 083afc4df..329048d3a 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2152,7 +2152,6 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f ZOOMPANEL_ZOOMFITSCREEN;Fit whole image to screen\nShortcut: f ZOOMPANEL_ZOOMIN;Zoom In\nShortcut: + ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: - -LENSPROFILE_CORRECTION_OFF;None LENSPROFILE_CORRECTION_AUTOMATCH;Auto-matched correction parameters LENSPROFILE_CORRECTION_MANUAL;Manual correction parameters LENSPROFILE_CORRECTION_LCPFILE;LCP File diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 31f021819..4fffbe7df 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -48,11 +48,14 @@ LensProfilePanel::LensProfilePanel () : if (!lf) { lf = new LFDbHelper(); } - - corrOff = Gtk::manage(new Gtk::RadioButton(M("LENSPROFILE_CORRECTION_OFF"))); - pack_start(*corrOff); - corrGroup = corrOff->get_group(); + corrUnchanged = Gtk::manage(new Gtk::RadioButton(M("GENERAL_UNCHANGED"))); + pack_start(*corrUnchanged); + + corrGroup = corrUnchanged->get_group(); + + corrOff = Gtk::manage(new Gtk::RadioButton(corrGroup, M("GENERAL_NONE"))); + pack_start(*corrOff); corrLensfunAuto = Gtk::manage(new Gtk::RadioButton(corrGroup, M("LENSPROFILE_CORRECTION_AUTOMATCH"))); pack_start(*corrLensfunAuto); @@ -132,6 +135,8 @@ LensProfilePanel::LensProfilePanel () : corrLensfunManual->signal_toggled().connect(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged)); corrLcpFile->signal_toggled().connect(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged)); + corrUnchanged->hide(); + allowFocusDep = true; } @@ -140,6 +145,10 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa disableListener (); conUseDist.block(true); + if (!batchMode) { + corrUnchanged->hide(); + } + corrLensfunAuto->set_sensitive(true); if (pp->lensProf.useLensfun) { @@ -331,6 +340,12 @@ void LensProfilePanel::updateDisabled(bool enable) void LensProfilePanel::setBatchMode(bool yes) { FoldableToolPanel::setBatchMode(yes); + if (yes) { + corrUnchanged->show(); + corrUnchanged->set_active(true); + } else { + corrUnchanged->hide(); + } } @@ -490,6 +505,14 @@ void LensProfilePanel::onCorrModeChanged() updateDisabled(true); mode = M("LENSPROFILE_CORRECTION_LCPFILE"); + } else if (corrUnchanged->get_active()) { + useLensfunChanged = false; + lensfunAutoChanged = false; + lcpFileChanged = false; + lensfunCameraChanged = false; + lensfunLensChanged = false; + + mode = M("GENERAL_UNCHANGED"); } if (listener) { From 076149955770491df7847a55ce6009f17c2fe396 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 12:22:36 +0200 Subject: [PATCH 093/126] lensfun: fixed bug in auto-matching of some fixed-lens cameras (e.g. nikon coolpix) --- rtengine/rtlensfun.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 9b35d038f..a758c1872 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -287,7 +287,7 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c LFLens ret; if (data_) { Glib::ustring lname = name; - bool stdlens = camera.ok() && (name.empty() || name.find("Unknown ") == 0); + bool stdlens = camera.ok() && (name.empty() || name.find("Unknown") == 0); if (stdlens) { lname = camera.getModel(); // "Standard" } From 626f8cace385ad608316440dc666cbd171267de8 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 14:02:22 +0200 Subject: [PATCH 094/126] disable 'autofill' setting when using lensfun --- rtgui/lensgeom.h | 2 ++ rtgui/lensprofile.cc | 29 ++++++++++++++++++++--------- rtgui/lensprofile.h | 1 + 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/rtgui/lensgeom.h b/rtgui/lensgeom.h index 29b0c7f20..aa473cb91 100644 --- a/rtgui/lensgeom.h +++ b/rtgui/lensgeom.h @@ -44,6 +44,8 @@ public: return packBox; } + Gtk::CheckButton *getFill() { return fill; } + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 4fffbe7df..5ddfdfa56 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -210,16 +210,8 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa if (corrLensfunManual->get_active() && !checkLensfunCanCorrect(false)) { corrOff->set_active(true); } - // if (metadata) { - // std::unique_ptr mod(LFDatabase::findModifier(pp->lensProf, metadata, 100, 100, pp->coarse, -1)); - // if (!mod) { - // if (pp->lensProf.useLensfun) { - // corrOff->set_active(true); - // } - // corrLensfunAuto->set_sensitive(false); - // } - // } + setAutoFill(); enableListener (); conUseDist.block(false); } @@ -514,6 +506,8 @@ void LensProfilePanel::onCorrModeChanged() mode = M("GENERAL_UNCHANGED"); } + + setAutoFill(); if (listener) { listener->panelChanged(EvLensCorrMode, mode); @@ -534,6 +528,23 @@ bool LensProfilePanel::checkLensfunCanCorrect(bool automatch) } +void LensProfilePanel::setAutoFill() +{ + if (lensgeomLcpFill) { + bool b = lensgeomLcpFill->disableListener(); + if (corrLensfunAuto->get_active() || corrLensfunManual->get_active()) { + lensgeomLcpFill->getFill()->set_active(true); + lensgeomLcpFill->getFill()->set_sensitive(false); + } else { + lensgeomLcpFill->getFill()->set_sensitive(true); + } + if (b) { + lensgeomLcpFill->enableListener(); + } + } +} + + //----------------------------------------------------------------------------- // LFDbHelper //----------------------------------------------------------------------------- diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index feda2a259..9475792ae 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -87,6 +87,7 @@ protected: bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model); bool setLensfunLens(const Glib::ustring &lens); bool checkLensfunCanCorrect(bool automatch); + void setAutoFill(); public: From 7b6343bf5d7e1bee5d1d4543a7d181224609d369 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 14:08:40 +0200 Subject: [PATCH 095/126] changed PARTIALPASTE_LENSPROFILE from "Lens correction profile" to "Profiled lens correction" --- rtdata/languages/default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 329048d3a..3cadd09db 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -887,7 +887,7 @@ PARTIALPASTE_IMPULSEDENOISE;Impulse noise reduction PARTIALPASTE_IPTCINFO;IPTC PARTIALPASTE_LABCURVE;L*a*b* adjustments PARTIALPASTE_LENSGROUP;Lens Related Settings -PARTIALPASTE_LENSPROFILE;Lens correction profile +PARTIALPASTE_LENSPROFILE;Profiled lens correction PARTIALPASTE_METAGROUP;Metadata PARTIALPASTE_PCVIGNETTE;Vignette filter PARTIALPASTE_PERSPECTIVE;Perspective From 489b641c8b8e0ddeff0b4a4ecd1ccea32e5b9519 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sun, 10 Sep 2017 15:13:21 +0200 Subject: [PATCH 096/126] Width of LensProfilePanel's lens and camera combobox fixed (see #4070) --- rtgui/lensprofile.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 5ddfdfa56..12d220271 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -66,9 +66,18 @@ LensProfilePanel::LensProfilePanel () : lensfunCameras = Gtk::manage(new MyComboBox()); lensfunCameras->set_model(lf->lensfunCameraModel); lensfunCameras->pack_start(lf->lensfunModelCam.model); + Gtk::CellRendererText* cellRenderer = dynamic_cast(lensfunCameras->get_first_cell()); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; + cellRenderer->property_ellipsize_set() = true; + lensfunCameras->setPreferredWidth(50, 120); + lensfunLenses = Gtk::manage(new MyComboBox()); lensfunLenses->set_model(lf->lensfunLensModel); lensfunLenses->pack_start(lf->lensfunModelLens.prettylens); + cellRenderer = dynamic_cast(lensfunLenses->get_first_cell()); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; + cellRenderer->property_ellipsize_set() = true; + lensfunLenses->setPreferredWidth(50, 120); Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("EXIFFILTER_CAMERA"))), Gtk::PACK_SHRINK, 4); From e4ba4d19f5e425b461e4031d1ff200a0f976d70e Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 22:02:43 +0200 Subject: [PATCH 097/126] made lensfun-based correction compatible with auto fill mode --- rtengine/iptransform.cc | 4 ---- rtengine/lcp.h | 2 -- rtengine/rtlensfun.cc | 2 ++ rtengine/rtlensfun.h | 1 - rtgui/lensprofile.cc | 21 --------------------- rtgui/lensprofile.h | 6 ------ rtgui/toolpanelcoord.cc | 1 - 7 files changed, 2 insertions(+), 35 deletions(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 2226c493b..77da87e4c 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -969,10 +969,6 @@ double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LensCorrecti return 1; } - if (pLCPMap && !pLCPMap->supportsAutoFill()) { - return 1; - } - double scaleU = 2, scaleL = 0.001; // upper and lower border, iterate inbetween do { diff --git a/rtengine/lcp.h b/rtengine/lcp.h index 1a4b677d3..f3aca09cd 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -140,7 +140,6 @@ class LensCorrection { public: virtual ~LensCorrection() {} virtual void correctDistortion(double &x, double &y, int cx, int cy, double scale) const = 0; - virtual bool supportsAutoFill() const = 0; virtual bool supportsCA() const = 0; virtual void correctCA(double &x, double &y, int channel) const = 0; virtual void processVignetteLine(int width, int y, float *line) const = 0; @@ -167,7 +166,6 @@ public: void correctDistortion(double &x, double &y, int cx, int cy, double scale) const; // MUST be the first stage bool supportsCA() const { return enableCA; } - bool supportsAutoFill() const { return true; } void correctCA(double& x, double& y, int channel) const; void processVignetteLine(int width, int y, float *line) const; void processVignetteLine3Channels(int width, int y, float *line) const; diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index a758c1872..15ec001eb 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -72,6 +72,8 @@ void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double x -= cx; y -= cy; } + x *= scale; + y *= scale; } diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index 640b6a18c..fce7d3a18 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -34,7 +34,6 @@ public: bool ok() const; void correctDistortion(double &x, double &y, int cx, int cy, double scale) const; - bool supportsAutoFill() const { return false; } bool supportsCA() const { return false; } void correctCA(double &x, double &y, int channel) const {} void processVignetteLine(int width, int y, float *line) const; diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 12d220271..9eb41aa25 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -39,7 +39,6 @@ LensProfilePanel::LensProfilePanel () : useCAChanged(false), isRaw(true), metadata(nullptr), - lensgeomLcpFill(nullptr), useLensfunChanged(false), lensfunAutoChanged(false), lensfunCameraChanged(false), @@ -220,7 +219,6 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa corrOff->set_active(true); } - setAutoFill(); enableListener (); conUseDist.block(false); } @@ -516,8 +514,6 @@ void LensProfilePanel::onCorrModeChanged() mode = M("GENERAL_UNCHANGED"); } - setAutoFill(); - if (listener) { listener->panelChanged(EvLensCorrMode, mode); } @@ -537,23 +533,6 @@ bool LensProfilePanel::checkLensfunCanCorrect(bool automatch) } -void LensProfilePanel::setAutoFill() -{ - if (lensgeomLcpFill) { - bool b = lensgeomLcpFill->disableListener(); - if (corrLensfunAuto->get_active() || corrLensfunManual->get_active()) { - lensgeomLcpFill->getFill()->set_active(true); - lensgeomLcpFill->getFill()->set_sensitive(false); - } else { - lensgeomLcpFill->getFill()->set_sensitive(true); - } - if (b) { - lensgeomLcpFill->enableListener(); - } - } -} - - //----------------------------------------------------------------------------- // LFDbHelper //----------------------------------------------------------------------------- diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index 9475792ae..5e2a5b484 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -40,7 +40,6 @@ protected: bool allowFocusDep; bool isRaw; const rtengine::ImageMetaData* metadata; - LensGeometry *lensgeomLcpFill; Gtk::RadioButton::Group corrGroup; Gtk::RadioButton *corrOff; @@ -87,7 +86,6 @@ protected: bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model); bool setLensfunLens(const Glib::ustring &lens); bool checkLensfunCanCorrect(bool automatch); - void setAutoFill(); public: @@ -102,10 +100,6 @@ public: void onUseDistChanged(); void onUseVignChanged(); void onUseCAChanged(); - void setLensGeomRef( LensGeometry *foo) - { - lensgeomLcpFill = foo ; - }; void setBatchMode(bool yes); diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index e30309fdf..0052e35ca 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -53,7 +53,6 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc (nullptr), hasChanged (false colortoning = Gtk::manage (new ColorToning ()); lensgeom = Gtk::manage (new LensGeometry ()); lensProf = Gtk::manage (new LensProfilePanel ()); - lensProf->setLensGeomRef (lensgeom); distortion = Gtk::manage (new Distortion ()); rotate = Gtk::manage (new Rotate ()); vibrance = Gtk::manage (new Vibrance ()); From 2611adf4e4bdfe4a0bd5831711b549d01dab4e03 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 10 Sep 2017 22:26:35 +0200 Subject: [PATCH 098/126] lens correction: do not disable stuff in batch mode --- rtgui/lensprofile.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 9eb41aa25..e56863948 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -208,7 +208,7 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; - if (!checkLensfunCanCorrect(true)) { + if (!batchMode && !checkLensfunCanCorrect(true)) { if (corrLensfunAuto->get_active()) { corrOff->set_active(true); } @@ -510,6 +510,12 @@ void LensProfilePanel::onCorrModeChanged() lcpFileChanged = false; lensfunCameraChanged = false; lensfunLensChanged = false; + + lensfunCameras->set_sensitive(true); + lensfunLenses->set_sensitive(true); + ckbUseDist->set_sensitive(true); + ckbUseVign->set_sensitive(true); + ckbUseCA->set_sensitive(true); mode = M("GENERAL_UNCHANGED"); } From 736d0e8612f05ceee375648055aa282966a17dfc Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Mon, 11 Sep 2017 17:37:11 +0200 Subject: [PATCH 099/126] added history messages for lens correction modes --- rtdata/languages/default | 11 +++++++---- rtgui/lensprofile.cc | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 3cadd09db..49ec00878 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -281,9 +281,9 @@ HISTORY_MSG_30;RLD - Radius HISTORY_MSG_31;RLD - Amount HISTORY_MSG_32;RLD - Damping HISTORY_MSG_33;RLD - Iterations -HISTORY_MSG_34;LCP distortion correction -HISTORY_MSG_35;LCP vignetting correction -HISTORY_MSG_36;LCP CA correction +HISTORY_MSG_34;Lens Correction - Distortion +HISTORY_MSG_35;Lens Correction - Vignetting +HISTORY_MSG_36;Lens Correction - CA HISTORY_MSG_37;Exposure - Auto levels HISTORY_MSG_38;White Balance - Method HISTORY_MSG_39;WB - Temperature @@ -332,7 +332,7 @@ HISTORY_MSG_81;Resize HISTORY_MSG_82;Profile changed HISTORY_MSG_83;S/H - Sharp mask HISTORY_MSG_84;Perspective correction -HISTORY_MSG_85;LCP +HISTORY_MSG_85;Lens Correction - LCP file HISTORY_MSG_86;RGB Curves - Luminosity mode HISTORY_MSG_87;Impulse Noise Reduction HISTORY_MSG_88;Impulse NR threshold @@ -715,6 +715,9 @@ HISTORY_MSG_481;CAM02 - Temp scene HISTORY_MSG_482;CAM02 - Green scene HISTORY_MSG_483;CAM02 - Yb scene HISTORY_MSG_484;CAM02 - Auto Yb scene +HISTORY_MSG_485;Lens Correction +HISTORY_MSG_486;Lens Correction - Camera +HISTORY_MSG_487;Lens Correction - Lens HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 0fbb08c85..d3b5490d6 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -449,7 +449,7 @@ void LensProfilePanel::onCorrModeChanged() ckbUseVign->set_sensitive(false); ckbUseCA->set_sensitive(false); - mode = M("LENSPROFILE_CORRECTION_OFF"); + mode = M("GENERAL_NONE"); } else if (corrLensfunAuto->get_active()) { useLensfunChanged = true; lensfunAutoChanged = true; From 84984422c757bf3e965c6bb4ad3c74e074315284 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 12 Sep 2017 08:19:20 +0200 Subject: [PATCH 100/126] improved responsiveness of UI for profiled lens correction --- rtgui/lensprofile.cc | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index d3b5490d6..b402cdfe3 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -285,9 +285,15 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited void LensProfilePanel::onLCPFileChanged() { lcpFileChanged = true; - updateDisabled(LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename())); + bool valid = LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename()); + updateDisabled(valid); if (listener) { + if (valid) { + disableListener(); + corrLcpFile->set_active(true); + enableListener(); + } listener->panelChanged (EvLCPFile, Glib::path_get_basename(fcbLCPFile->get_filename())); } } @@ -299,7 +305,11 @@ void LensProfilePanel::onLCPFileReset() fcbLCPFile->unselect_filename(fcbLCPFile->get_filename()); updateDisabled(false); + if (listener) { + disableListener(); + corrOff->set_active(true); + enableListener(); listener->panelChanged (EvLCPFile, M("GENERAL_NONE")); } } @@ -412,6 +422,10 @@ void LensProfilePanel::onLensfunCameraChanged() lensfunCameraChanged = true; if (listener) { + disableListener(); + corrLensfunManual->set_active(true); + enableListener(); + Glib::ustring name = (*iter)[lf->lensfunModelCam.model]; listener->panelChanged(EvLensCorrLensfunCamera, name); } @@ -427,7 +441,11 @@ void LensProfilePanel::onLensfunLensChanged() lensfunLensChanged = true; if (listener) { - Glib::ustring name = (*iter)[lf->lensfunModelLens.lens]; + disableListener(); + corrLensfunManual->set_active(true); + enableListener(); + + Glib::ustring name = (*iter)[lf->lensfunModelLens.prettylens]; listener->panelChanged(EvLensCorrLensfunLens, name); } } @@ -443,8 +461,6 @@ void LensProfilePanel::onCorrModeChanged() lensfunAutoChanged = true; lcpFileChanged = true; - lensfunCameras->set_sensitive(false); - lensfunLenses->set_sensitive(false); ckbUseDist->set_sensitive(false); ckbUseVign->set_sensitive(false); ckbUseCA->set_sensitive(false); @@ -457,9 +473,6 @@ void LensProfilePanel::onCorrModeChanged() useDistChanged = true; useVignChanged = true; - lensfunCameras->set_sensitive(false); - lensfunLenses->set_sensitive(false); - ckbUseDist->set_sensitive(true); ckbUseVign->set_sensitive(true); ckbUseCA->set_sensitive(false); @@ -484,9 +497,6 @@ void LensProfilePanel::onCorrModeChanged() useDistChanged = true; useVignChanged = true; - lensfunCameras->set_sensitive(true); - lensfunLenses->set_sensitive(true); - ckbUseDist->set_sensitive(true); ckbUseVign->set_sensitive(true); ckbUseCA->set_sensitive(false); @@ -499,8 +509,6 @@ void LensProfilePanel::onCorrModeChanged() useDistChanged = true; useVignChanged = true; - lensfunCameras->set_sensitive(false); - lensfunLenses->set_sensitive(false); updateDisabled(true); mode = M("LENSPROFILE_CORRECTION_LCPFILE"); @@ -511,8 +519,6 @@ void LensProfilePanel::onCorrModeChanged() lensfunCameraChanged = false; lensfunLensChanged = false; - lensfunCameras->set_sensitive(true); - lensfunLenses->set_sensitive(true); ckbUseDist->set_sensitive(true); ckbUseVign->set_sensitive(true); ckbUseCA->set_sensitive(true); From ea5f8c3bebba933c15b70246e0a119307501fb1f Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 12 Sep 2017 08:25:45 +0200 Subject: [PATCH 101/126] profile lens correction: show a warning if the lens profile has a crop factor greater than the selected camera --- rtdata/languages/default | 1 + rtengine/rtlensfun.cc | 10 ++++++++++ rtengine/rtlensfun.h | 1 + rtgui/lensprofile.cc | 36 ++++++++++++++++++++++++++++++++++++ rtgui/lensprofile.h | 2 ++ 5 files changed, 50 insertions(+) diff --git a/rtdata/languages/default b/rtdata/languages/default index 49ec00878..412aad101 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2158,3 +2158,4 @@ ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: - LENSPROFILE_CORRECTION_AUTOMATCH;Auto-matched correction parameters LENSPROFILE_CORRECTION_MANUAL;Manual correction parameters LENSPROFILE_CORRECTION_LCPFILE;LCP File +LENSPROFILE_LENS_WARNING;Warning: the crop factor used for lens profiling is larger than the crop factor of the camera, the results might be wrong. \ No newline at end of file diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 15ec001eb..2f70aabac 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -206,6 +206,16 @@ Glib::ustring LFLens::getLens() const } +float LFLens::getCropFactor() const +{ + if (data_) { + return data_->CropFactor; + } else { + return 0; + } +} + + //----------------------------------------------------------------------------- // LFDatabase //----------------------------------------------------------------------------- diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index 2ea893302..a862c7b2a 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -75,6 +75,7 @@ public: Glib::ustring getMake() const; Glib::ustring getLens() const; Glib::ustring getDisplayString() const { return getLens(); } + float getCropFactor() const; private: friend class LFDatabase; const lfLens *data_; diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index b402cdfe3..3927ef225 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -86,6 +86,11 @@ LensProfilePanel::LensProfilePanel () : hb = Gtk::manage(new Gtk::HBox()); hb->pack_start(*Gtk::manage(new Gtk::Label(M("EXIFFILTER_LENS"))), Gtk::PACK_SHRINK, 4); hb->pack_start(*lensfunLenses); + warning = Gtk::manage(new Gtk::Image()); + warning->set_from_icon_name("dialog-warning", Gtk::ICON_SIZE_LARGE_TOOLBAR); + warning->set_tooltip_text(M("LENSPROFILE_LENS_WARNING")); + warning->hide(); + hb->pack_start(*warning, Gtk::PACK_SHRINK, 4); pack_start(*hb); corrLcpFile = Gtk::manage(new Gtk::RadioButton(corrGroup)); @@ -219,10 +224,35 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa corrOff->set_active(true); } + updateLensfunWarning(); + enableListener (); conUseDist.block(false); } + +void LensProfilePanel::updateLensfunWarning() +{ + warning->hide(); + if (corrLensfunManual->get_active()) { + const LFDatabase *db = LFDatabase::getInstance(); + + auto itc = lensfunCameras->get_active(); + if (!itc) { + return; + } + LFCamera c = db->findCamera((*itc)[lf->lensfunModelCam.make], (*itc)[lf->lensfunModelCam.model]); + auto itl = lensfunLenses->get_active(); + if (!itl) { + return; + } + LFLens l = db->findLens(LFCamera(), (*itl)[lf->lensfunModelLens.lens]); + if (l.getCropFactor() - c.getCropFactor() >= 0.01) { + warning->show(); + } + } +} + void LensProfilePanel::setRawMeta(bool raw, const rtengine::ImageMetaData* pMeta) { if (!raw || pMeta->getFocusDist() <= 0) { @@ -430,6 +460,8 @@ void LensProfilePanel::onLensfunCameraChanged() listener->panelChanged(EvLensCorrLensfunCamera, name); } } + + updateLensfunWarning(); } @@ -449,6 +481,8 @@ void LensProfilePanel::onLensfunLensChanged() listener->panelChanged(EvLensCorrLensfunLens, name); } } + + updateLensfunWarning(); } @@ -526,6 +560,8 @@ void LensProfilePanel::onCorrModeChanged() mode = M("GENERAL_UNCHANGED"); } + updateLensfunWarning(); + if (listener) { listener->panelChanged(EvLensCorrMode, mode); } diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index 5e2a5b484..aca8f16ef 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -49,6 +49,7 @@ protected: Gtk::RadioButton *corrUnchanged; MyComboBox *lensfunCameras; MyComboBox *lensfunLenses; + Gtk::Image *warning; class LFDbHelper { public: @@ -86,6 +87,7 @@ protected: bool setLensfunCamera(const Glib::ustring &make, const Glib::ustring &model); bool setLensfunLens(const Glib::ustring &lens); bool checkLensfunCanCorrect(bool automatch); + void updateLensfunWarning(); public: From 88b343d1b39cb93d81703f155c2b11d1c02cc952 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 12 Sep 2017 15:29:41 +0200 Subject: [PATCH 102/126] update AboutThisBuild.txt with lensfun info --- AboutThisBuild.txt.in | 1 + CMakeLists.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AboutThisBuild.txt.in b/AboutThisBuild.txt.in index ea3269c09..f48d39b50 100644 --- a/AboutThisBuild.txt.in +++ b/AboutThisBuild.txt.in @@ -7,6 +7,7 @@ Processor: ${PROC_LABEL} System: ${SYSTEM} Bit depth: ${PROC_BIT_DEPTH} Gtkmm: V${GTKMM_VERSION} +Lensfun: V${LENSFUN_VERSION} Build type: ${BUILD_TYPE} Build flags: ${CXX_FLAGS} Link flags: ${LFLAGS} diff --git a/CMakeLists.txt b/CMakeLists.txt index e506499b9..333e292f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -390,7 +390,8 @@ set(ABOUT_COMMAND_WITH_ARGS ${CMAKE_COMMAND} -DBUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DGTKMM_VERSION:STRING=${GTKMM_VERSION} -DOPTION_OMP:STRING=${OPTION_OMP} - -DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}) + -DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP} + -DLENSFUN_VERSION:STRING=${LENSFUN_VERSION}) if(WIN32) list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Windows From fea0fbe776dc7c7e94b9755fa81942f52fe73b49 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 12 Sep 2017 16:38:01 +0200 Subject: [PATCH 103/126] show lensfun version info when invoked with '-v' (patch by heckflosse) --- rtgui/main.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtgui/main.cc b/rtgui/main.cc index 3ebd894df..f5e134b5a 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -33,6 +33,7 @@ #include #include #include +#include #include "options.h" #include "soundman.h" #include "rtimage.h" @@ -138,6 +139,7 @@ int processLineParams ( int argc, char **argv ) #endif case 'v': + std::cout << "Using lensfun " << LF_VERSION_MAJOR << "." << LF_VERSION_MINOR << "." << LF_VERSION_MICRO << "." << LF_VERSION_BUGFIX << std::endl; return 0; #ifndef __APPLE__ // TODO agriggio - there seems to be already some "single instance app" support for OSX in rtwindow. Disabling it here until I understand how to merge the two From 2d1cca8cbb50085a3731e10ebe9f03e0da5bd9ef Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 12 Sep 2017 16:41:25 +0200 Subject: [PATCH 104/126] disable vignetting or distortion correction checkboxes if the selected lensfun profile doesn't support them Patch by heckflosse --- rtengine/rtlensfun.cc | 18 ++++++++++++++++++ rtengine/rtlensfun.h | 2 ++ rtgui/lensprofile.cc | 2 ++ 3 files changed, 22 insertions(+) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 2f70aabac..626d333aa 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -215,6 +215,24 @@ float LFLens::getCropFactor() const } } +bool LFLens::hasVignettingCorrection() const +{ + if (data_) { + return data_->CalibVignetting; + } else { + return false; + } +} + +bool LFLens::hasDistortionCorrection() const +{ + if (data_) { + return data_->CalibDistortion; + } else { + return false; + } +} + //----------------------------------------------------------------------------- // LFDatabase diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index a862c7b2a..1d54d9444 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -76,6 +76,8 @@ public: Glib::ustring getLens() const; Glib::ustring getDisplayString() const { return getLens(); } float getCropFactor() const; + bool hasVignettingCorrection() const; + bool hasDistortionCorrection() const; private: friend class LFDatabase; const lfLens *data_; diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 3927ef225..c2dde09b5 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -250,6 +250,8 @@ void LensProfilePanel::updateLensfunWarning() if (l.getCropFactor() - c.getCropFactor() >= 0.01) { warning->show(); } + ckbUseVign->set_sensitive(l.hasVignettingCorrection()); + ckbUseDist->set_sensitive(l.hasDistortionCorrection()); } } From f2853d8742f9b36e60f064f3d6d8baac8d348757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 12 Sep 2017 20:58:20 +0200 Subject: [PATCH 105/126] Some little cleanups to `rtlensfun.*` - Sanitize `std::unique_ptr<>` handling - Use `NonCopyable` - Employ `explicit operator bool()` - Correct use of `std::vector::emplace_back()` - Cleanup includes - Streamline implementation order --- rtengine/iptransform.cc | 21 ++++++------ rtengine/rawimagesource.cc | 2 +- rtengine/rtlensfun.cc | 62 ++++++++++++++++++++-------------- rtengine/rtlensfun.h | 69 ++++++++++++++++++++++---------------- 4 files changed, 89 insertions(+), 65 deletions(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 84464af97..e5f3a7af1 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -319,18 +319,21 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, float focusDist = metadata->getFocusDist(); double fNumber = metadata->getFNumber(); - LensCorrection *pLCPMap = nullptr; + std::unique_ptr pLCPMap; if (needsLensfun()) { - pLCPMap = LFDatabase::findModifier(params->lensProf, metadata, oW, oH, params->coarse, rawRotationDeg); + pLCPMap = std::move(LFDatabase::findModifier(params->lensProf, metadata, oW, oH, params->coarse, rawRotationDeg)); } else if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip const std::shared_ptr pLCPProf = LCPStore::getInstance()->getProfile (params->lensProf.lcpFile); if (pLCPProf) { - pLCPMap = new LCPMapper (pLCPProf, focalLen, focalLen35mm, - focusDist, fNumber, false, - params->lensProf.useDist, - oW, oH, params->coarse, rawRotationDeg); + pLCPMap.reset( + new LCPMapper (pLCPProf, focalLen, focalLen35mm, + focusDist, fNumber, false, + params->lensProf.useDist, + oW, oH, params->coarse, rawRotationDeg + ) + ); } } @@ -345,11 +348,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, } else { mode = TRANSFORM_HIGH_QUALITY_FULLIMAGE; } - transformGeneral(mode, original, transformed, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap); - } - - if (pLCPMap) { - delete pLCPMap; + transformGeneral(mode, original, transformed, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap.get()); } } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 131fc354c..1dd63339c 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1858,7 +1858,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le if (!hasFlatField && lensProf.useVign) { std::unique_ptr pmap; if (lensProf.useLensfun) { - pmap.reset(LFDatabase::findModifier(lensProf, idata, W, H, coarse, -1)); + pmap = std::move(LFDatabase::findModifier(lensProf, idata, W, H, coarse, -1)); } else { const std::shared_ptr pLCPProf = LCPStore::getInstance()->getProfile(lensProf.lcpFile); diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 626d333aa..87a7272e9 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -1,5 +1,5 @@ /* -*- C++ -*- - * + * * This file is part of RawTherapee. * * Copyright (c) 2017 Alberto Griggio @@ -30,14 +30,6 @@ extern const Settings *settings; // LFModifier //----------------------------------------------------------------------------- -LFModifier::LFModifier(lfModifier *m, bool swap_xy, int flags): - data_(m), - swap_xy_(swap_xy), - flags_(flags) -{ -} - - LFModifier::~LFModifier() { if (data_) { @@ -45,7 +37,8 @@ LFModifier::~LFModifier() } } -bool LFModifier::ok() const + +LFModifier::operator bool() const { return data_; } @@ -53,7 +46,7 @@ bool LFModifier::ok() const void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double scale) const { - if (!ok()) { + if (!data_) { return; } @@ -77,6 +70,17 @@ void LFModifier::correctDistortion(double &x, double &y, int cx, int cy, double } +bool LFModifier::isCACorrectionAvailable() const +{ + return false; +} + + +void LFModifier::correctCA(double &x, double &y, int channel) const +{ +} + + void LFModifier::processVignetteLine(int width, int y, float *line) const { data_->ApplyColorModification(line, 0, y, width, 1, LF_CR_1(INTENSITY), 0); @@ -114,6 +118,14 @@ Glib::ustring LFModifier::getDisplayString() const } +LFModifier::LFModifier(lfModifier *m, bool swap_xy, int flags): + data_(m), + swap_xy_(swap_xy), + flags_(flags) +{ +} + + //----------------------------------------------------------------------------- // LFCamera //----------------------------------------------------------------------------- @@ -124,7 +136,7 @@ LFCamera::LFCamera(): } -bool LFCamera::ok() const +LFCamera::operator bool() const { return data_; } @@ -180,7 +192,7 @@ LFLens::LFLens(): } -bool LFLens::ok() const +LFLens::operator bool() const { return data_; } @@ -274,11 +286,11 @@ std::vector LFDatabase::getCameras() const if (data_) { auto cams = data_->GetCameras(); while (*cams) { - ret.emplace_back(LFCamera()); + ret.emplace_back(); ret.back().data_ = *cams; ++cams; } - } + } return ret; } @@ -289,7 +301,7 @@ std::vector LFDatabase::getLenses() const if (data_) { auto lenses = data_->GetLenses(); while (*lenses) { - ret.emplace_back(LFLens()); + ret.emplace_back(); ret.back().data_ = *lenses; ++lenses; } @@ -317,7 +329,7 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c LFLens ret; if (data_) { Glib::ustring lname = name; - bool stdlens = camera.ok() && (name.empty() || name.find("Unknown") == 0); + bool stdlens = camera && (name.empty() || name.find("Unknown") == 0); if (stdlens) { lname = camera.getModel(); // "Standard" } @@ -341,27 +353,27 @@ LFLens LFDatabase::findLens(const LFCamera &camera, const Glib::ustring &name) c } -LFModifier *LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, +std::unique_ptr LFDatabase::getModifier(const LFCamera &camera, const LFLens &lens, float focalLen, float aperture, float focusDist, int width, int height, bool swap_xy) const { - LFModifier *ret = nullptr; + std::unique_ptr ret; if (data_) { - if (camera.ok() && lens.ok()) { + if (camera && lens) { lfModifier *mod = lfModifier::Create(lens.data_, camera.getCropFactor(), width, height); int flags = LF_MODIFY_DISTORTION | LF_MODIFY_SCALE; if (aperture > 0) { flags |= LF_MODIFY_VIGNETTING; } flags = mod->Initialize(lens.data_, LF_PF_F32, focalLen, aperture, focusDist > 0 ? focusDist : 1000, 0.0, LF_RECTILINEAR, flags, false); - ret = new LFModifier(mod, swap_xy, flags); + ret.reset(new LFModifier(mod, swap_xy, flags)); } } return ret; } -LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg) +std::unique_ptr LFDatabase::findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg) { const LFDatabase *db = getInstance(); Glib::ustring make, model, lens; @@ -394,8 +406,8 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image std::swap(width, height); } } - - LFModifier *ret = db->getModifier(c, l, idata->getFocalLen(), idata->getFNumber(), idata->getFocusDist(), width, height, swap_xy); + + std::unique_ptr ret = db->getModifier(c, l, idata->getFocalLen(), idata->getFNumber(), idata->getFocusDist(), width, height, swap_xy); if (settings->verbose) { std::cout << "LENSFUN:\n" @@ -407,6 +419,6 @@ LFModifier *LFDatabase::findModifier(const LensProfParams &lensProf, const Image return ret; } - + } // namespace rtengine diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index 1d54d9444..5774968ee 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -1,5 +1,5 @@ /* -*- C++ -*- - * + * * This file is part of RawTherapee. * * Copyright (c) 2017 Alberto Griggio @@ -20,43 +20,52 @@ #pragma once -#include -#include #include +#include + +#include + +#include + #include "lcp.h" +#include "noncopyable.h" #include "procparams.h" namespace rtengine { -class LFModifier: public LensCorrection { +class LFModifier final : + public LensCorrection, + public NonCopyable +{ public: ~LFModifier(); - bool ok() const; - - void correctDistortion(double &x, double &y, int cx, int cy, double scale) const; - bool isCACorrectionAvailable() const { return false; } - void correctCA(double &x, double &y, int channel) const {} - void processVignetteLine(int width, int y, float *line) const; + + explicit operator bool() const; + + void correctDistortion(double &x, double &y, int cx, int cy, double scale) const override; + bool isCACorrectionAvailable() const override; + void correctCA(double &x, double &y, int channel) const override; + void processVignetteLine(int width, int y, float *line) const override; void processVignetteLine3Channels(int width, int y, float *line) const; Glib::ustring getDisplayString() const; - + private: - explicit LFModifier(lfModifier *m, bool swap_xy, int flags); - LFModifier(const LFModifier &); - LFModifier &operator=(const LFModifier &); - + LFModifier(lfModifier *m, bool swap_xy, int flags); + friend class LFDatabase; lfModifier *data_; bool swap_xy_; int flags_; }; -class LFCamera { +class LFCamera final +{ public: LFCamera(); - bool ok() const; - + + explicit operator bool() const; + Glib::ustring getMake() const; Glib::ustring getModel() const; float getCropFactor() const; @@ -68,42 +77,46 @@ private: const lfCamera *data_; }; -class LFLens { +class LFLens final +{ public: LFLens(); - bool ok() const; + + explicit operator bool() const; + Glib::ustring getMake() const; Glib::ustring getLens() const; Glib::ustring getDisplayString() const { return getLens(); } float getCropFactor() const; bool hasVignettingCorrection() const; bool hasDistortionCorrection() const; + private: friend class LFDatabase; const lfLens *data_; }; -class LFDatabase { +class LFDatabase final : + public NonCopyable +{ public: static bool init(); static const LFDatabase *getInstance(); ~LFDatabase(); - + std::vector getCameras() const; std::vector getLenses() const; LFCamera findCamera(const Glib::ustring &make, const Glib::ustring &model) const; LFLens findLens(const LFCamera &camera, const Glib::ustring &name) const; - static LFModifier *findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg); + static std::unique_ptr findModifier(const LensProfParams &lensProf, const ImageMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg); private: - LFModifier *getModifier(const LFCamera &camera, const LFLens &lens, - float focalLen, float aperture, float focusDist, - int width, int height, bool swap_xy) const; + std::unique_ptr getModifier(const LFCamera &camera, const LFLens &lens, + float focalLen, float aperture, float focusDist, + int width, int height, bool swap_xy) const; LFDatabase(); - LFDatabase(const LFDatabase &); - LFDatabase &operator=(const LFDatabase &); static LFDatabase instance_; lfDatabase *data_; }; From c9c02c137bc6d542882ae4dd895b4dd29f6d864b Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 13 Sep 2017 08:49:56 +0200 Subject: [PATCH 106/126] change calculation in curve brightness CIECAM --- rtengine/improcfun.cc | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 6d6fccc88..c8faa4ce0 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1681,10 +1681,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } } - if (alg >= 2 && la < 200.f) { - la = 200.f; - } - + /* + if (alg >= 2 && la < 200.f) { + la = 200.f; + } + */ const float la2 = float (params->colorappearance.adaplum); // level of adaptation @@ -1775,6 +1776,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } float sum = 0.f; + float sumQ = 0.f; #ifdef _OPENMP const int numThreads = min (max (width * height / 65536, 1), omp_get_max_threads()); @@ -1794,7 +1796,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int hist16Qthr.clear(); } - #pragma omp for reduction(+:sum) + #pragma omp for reduction(+:sum,sumQ) for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) { //rough correspondence between L and J @@ -1839,11 +1841,26 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int hist16Jthr[ (int) ((koef * lab->L[i][j]))]++; //evaluate histogram luminance L # J } + //estimation of wh only with La + float whestim = 500.f; + + if (la < 200.f) { + whestim = 200.f; + } else if (la < 2500.f) { + whestim = 350.f; + } else { + whestim = 500.f; + } + if (needQ) { - hist16Qthr[ (int) (sqrtf ((koef * (lab->L[i][j])) * 32768.f))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L + hist16Qthr[CLIP ((int) (32768.f * sqrt ((koef * (lab->L[i][j])) / 32768.f)))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L + //perhaps needs to introduce whestim ?? + // hist16Qthr[ (int) (sqrtf ((koef * (lab->L[i][j])) * 32768.f))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L } sum += koef * lab->L[i][j]; //evaluate mean J to calculate Yb + sumQ += whestim * sqrt ((koef * (lab->L[i][j])) / 32768.f); + //can be used in case of... } #pragma omp critical @@ -1857,14 +1874,16 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } } + float meanQ; if (std::isnan (mean)) { mean = (sum / ((height) * width)) / 327.68f; //for Yb for all image...if one day "pipette" we can adapt Yb for each zone + meanQ = (sumQ / ((height) * width));//in case of + } } - //evaluate lightness, contrast } @@ -1937,6 +1956,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float cz, wh, pfl; Ciecam02::initcam1float (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); + //printf ("wh=%f \n", wh); + const float pow1 = pow_F ( 1.64f - pow_F ( 0.29f, n ), 0.73f ); float nj, nbbj, ncbj, czj, awj, flj; Ciecam02::initcam2float (gamu, yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); @@ -1954,7 +1975,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const bool LabPassOne = ! ((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) || (params->dirpyrequalizer.enabled && settings->autocielab) || (params->defringe.enabled && settings->autocielab) || (params->sharpenMicro.enabled && settings->autocielab) || (params->impulseDenoise.enabled && settings->autocielab) || (params->colorappearance.badpixsl > 0 && settings->autocielab)); - + //printf("coQ=%f\n", coefQ); if (needJ) { if (!CAMBrightCurveJ) { From 5bd82a5c88b46bea55598497be9a8f100430d8a3 Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 13 Sep 2017 09:23:06 +0200 Subject: [PATCH 107/126] add la < 200 --- rtengine/improcfun.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index c8faa4ce0..236805f6c 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1681,11 +1681,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } } - /* + if (alg >= 2 && la < 200.f) { la = 200.f; } - */ + const float la2 = float (params->colorappearance.adaplum); // level of adaptation From de9c742d27404828e90a458365c13d6e87d6c460 Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 13 Sep 2017 13:48:24 +0200 Subject: [PATCH 108/126] Fixed another mistake in curve brigthness ciecam --- rtengine/ciecam02.cc | 4 ++++ rtengine/improcfun.cc | 29 ++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index 488093060..625b77f05 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -178,6 +178,8 @@ void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & for (int i = 0; i < (db * 32768); i++) { outCurve[i] = db * 32768.0 * dcurve[i]; } +// printf("double out500=%f out15000=%f\n", outCurve[500], outCurve[15000]); + } void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve) @@ -268,6 +270,8 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf } outCurve *= 32767.f; + //printf("out500=%f out15000=%f\n", outCurve[500], outCurve[15000]); + //outCurve.dump("brig"); } /** diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 236805f6c..625f93bb1 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1681,11 +1681,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } } - + /* if (alg >= 2 && la < 200.f) { la = 200.f; } - + */ const float la2 = float (params->colorappearance.adaplum); // level of adaptation @@ -1996,7 +1996,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int if (CAMBrightCurveQ.dirty) { Ciecam02::curveJfloat (params->colorappearance.qbright, params->colorappearance.qcontrast, hist16Q, CAMBrightCurveQ);//brightness and contrast Q - CAMBrightCurveQ /= coefQ; + // CAMBrightCurveQ /= coefQ; CAMBrightCurveQ.dirty = false; } } @@ -2146,7 +2146,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qpro = QproFactor * sqrtf (Jpro); Cpro = (spro * spro * Qpro) / (10000.0f); } else if (alg == 2) { - Qpro = CAMBrightCurveQ[ (float) (Qpro * coefQ)]; //brightness and contrast + //printf("Qp0=%f ", Qpro); + + Qpro = CAMBrightCurveQ[ (float) (Qpro * coefQ)] / coefQ; //brightness and contrast + //printf("Qpaf=%f ", Qpro); + float Mp, sres; Mp = Mpro / 100.0f; Ciecam02::curvecolorfloat (mchr, Mp, sres, 2.5f); @@ -2160,7 +2164,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qpro = (Qpro == 0.f ? epsil : Qpro); // avoid division by zero spro = 100.0f * sqrtf ( Mpro / Qpro ); } else { /*if(alg == 3) */ - Qpro = CAMBrightCurveQ[ (float) (Qpro * coefQ)]; //brightness and contrast + Qpro = CAMBrightCurveQ[ (float) (Qpro * coefQ)] / coefQ; //brightness and contrast float Mp, sres; Mp = Mpro / 100.0f; @@ -2237,6 +2241,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } else if (curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { //attention! Brightness curves are open - unlike Lightness or Lab or RGB==> rendering and algoritms will be different float coef = ((aw + 4.f) * (4.f / c)) / 100.f; + float Qanc = Qpro; float Qq = (float) Qpro * 327.68f * (1.f / coef); float Qold100 = (float) Qpro / coef; @@ -2262,8 +2267,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (float) (Qq * (coef) / 327.68f); - Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); + Qpro = Qanc * (Qq / Qold); + // Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); + Jpro = Jpro * SQR (Qq / Qold); if (Jpro < 1.f) { Jpro = 1.f; @@ -2311,6 +2317,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } } else if (curveMode2 == ColorAppearanceParams::TC_MODE_BRIGHT) { // + float Qanc = Qpro; + float coef = ((aw + 4.f) * (4.f / c)) / 100.f; float Qq = (float) Qpro * 327.68f * (1.f / coef); float Qold100 = (float) Qpro / coef; @@ -2337,8 +2345,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (float) (Qq * (coef) / 327.68f); - Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); + // Qpro = (float) (Qq * (coef) / 327.68f); + Qpro = Qanc * (Qq / Qold); + Jpro = Jpro * SQR (Qq / Qold); + + // Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); if (t1L) { //to workaround the problem if we modify curve1-lightnees after curve2 brightness(the cat that bites its own tail!) in fact it's another type of curve only for this case coef = 2.f; //adapt Q to J approximation From b5c1293bf3b5ad77c0f2a8f3a3cbbcd556ab8b85 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Wed, 13 Sep 2017 14:51:16 +0200 Subject: [PATCH 109/126] updated logic for displaying lens correction crop factor warning --- rtgui/lensprofile.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index c2dde09b5..bb9138461 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -247,7 +247,9 @@ void LensProfilePanel::updateLensfunWarning() return; } LFLens l = db->findLens(LFCamera(), (*itl)[lf->lensfunModelLens.lens]); - if (l.getCropFactor() - c.getCropFactor() >= 0.01) { + float lenscrop = l.getCropFactor(); + float camcrop = c.getCropFactor(); + if (lenscrop <= 0 || camcrop <= 0 || lenscrop / camcrop >= 1.01f) { warning->show(); } ckbUseVign->set_sensitive(l.hasVignettingCorrection()); From c2960caab52804eaf7eb691bdf62502f73987f4c Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Wed, 13 Sep 2017 15:06:47 +0200 Subject: [PATCH 110/126] some (minor) code cleanup --- rtengine/dcrop.cc | 3 --- rtengine/improccoordinator.cc | 9 ++------- rtengine/improcfun.h | 2 -- rtengine/iptransform.cc | 19 ++----------------- rtengine/rtthumbnail.cc | 8 -------- rtengine/rtthumbnail.h | 2 -- rtengine/simpleprocess.cc | 6 +----- rtgui/cacheimagedata.h | 5 ----- rtgui/lensgeom.h | 2 -- 9 files changed, 5 insertions(+), 51 deletions(-) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 92416917d..25710205f 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -699,9 +699,6 @@ void Crop::update (int todo) if (needstransform) parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, skips (parent->fw, skip), skips (parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), parent->imgsrc->getMetaData(), - // parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), - // parent->imgsrc->getMetaData()->getFocusDist(), - // parent->imgsrc->getMetaData()->getFNumber(), parent->imgsrc->getRotateDegree(), false); else { baseCrop->copyData (transCrop); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 8a3b979ae..2b9edc3d6 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -401,10 +401,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) if (needstransform) ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, - imgsrc->getMetaData(), - // imgsrc->getMetaData()->getFocalLen(), - // imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), - imgsrc->getRotateDegree(), false); + imgsrc->getMetaData(), imgsrc->getRotateDegree(), false); else { orig_prev->copyData (oprevi); } @@ -1223,9 +1220,7 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool if (ipf.needsTransform()) { Imagefloat* trImg = new Imagefloat (fW, fH); ipf.transform (im, trImg, 0, 0, 0, 0, fW, fH, fW, fH, - imgsrc->getMetaData(), - // imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), - imgsrc->getRotateDegree(), true); + imgsrc->getMetaData(), imgsrc->getRotateDegree(), true); delete im; im = trImg; } diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 1bcca4d37..e48ec3c7f 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -240,8 +240,6 @@ public: void colorCurve (LabImage* lold, LabImage* lnew); void sharpening (LabImage* lab, float** buffer, SharpeningParams &sharpenParam); void sharpeningcam (CieImage* ncie, float** buffer); - /* void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, */ - /* double focalLen, double focalLen35mm, float focusDist, double fNumber, int rawRotationDeg, bool fullImage); */ void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const ImageMetaData *metadata, int rawRotationDeg, bool fullImage); float resizeScale (const ProcParams* params, int fw, int fh, int &imw, int &imh); void lab2monitorRgb (LabImage* lab, Image8* image); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index e5f3a7af1..3f7472f6f 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -87,20 +87,6 @@ float normn (float a, float b, int n) } -inline void correct_distortion(const rtengine::LensCorrection *lcp, double &x, double &y, - int cx, int cy, double scale) -{ - assert (lcp); - - // x += cx; - // y += cy; - // std::cout << "DIST: x=" << x << ", y=" << y; - lcp->correctDistortion(x, y, cx, cy, scale); - // std::cout << " --> pos[0]=" << x << ", pos[1]=" << y << std::endl; - // x -= (cx * scale); - // y -= (cy * scale); -} - } namespace rtengine @@ -160,7 +146,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, double x_d = src[i].x, y_d = src[i].y; if (pLCPMap && params->lensProf.useDist) { - correct_distortion (pLCPMap, x_d, y_d, 0, 0, ascale); + pLCPMap->correctDistortion(x_d, y_d, 0, 0, ascale); } else { x_d *= ascale; y_d *= ascale; @@ -311,7 +297,6 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const ImageMetaData *metadata, - //double focalLen, double focalLen35mm, float focusDist, double fNumber, int rawRotationDeg, bool fullImage) { double focalLen = metadata->getFocalLen(); @@ -831,7 +816,7 @@ void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imag double x_d = x, y_d = y; if (enableLCPDist) { - correct_distortion(pLCPMap, x_d, y_d, cx, cy, ascale); // must be first transform + pLCPMap->correctDistortion(x_d, y_d, cx, cy, ascale); // must be first transform } else { x_d *= ascale; y_d *= ascale; diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index a5d951de2..065d4640c 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -954,8 +954,6 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int } // Full thumbnail processing, second stage if complete profile exists -// IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, std::string camName, -// double focalLen, double focalLen35mm, float focusDist, float shutter, float fnumber, float iso, std::string expcomp_, double& myscale) IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, const ImageMetaData *metadata, double& myscale) { std::string camName = metadata->getCamera(); @@ -1086,7 +1084,6 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei int origFH; double tscale = 0.0; getDimensions (origFW, origFH, tscale); - // ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, fnumber, 0, true); // Raw rotate degree not detectable here ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, metadata, 0, true); // Raw rotate degree not detectable here delete baseImg; baseImg = trImg; @@ -1286,11 +1283,6 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei float fnum = fnumber;// F number float fiso = iso;// ISO float fspeed = shutter;//speed - // char * writ = new char[expcomp_.size() + 1];//convert expcomp_ to char - // std::copy (expcomp_.begin(), expcomp_.end(), writ); - // writ[expcomp_.size()] = '\0'; - // float fcomp = atof (writ); //compensation + - - // delete[] writ; float adap; if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index 4fc3466c8..3610a530f 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -71,8 +71,6 @@ public: void init (); - // IImage8* processImage (const procparams::ProcParams& pparams, int rheight, TypeInterpolation interp, std::string camName, - // double focalLen, double focalLen35mm, float focusDist, float shutter, float fnumber, float iso, std::string expcomp_, double& scale); IImage8* processImage (const procparams::ProcParams& pparams, int rheight, TypeInterpolation interp, const ImageMetaData *metadata, double& scale); IImage8* quickProcessImage (const procparams::ProcParams& pparams, int rheight, TypeInterpolation interp, double& scale); int getImageWidth (const procparams::ProcParams& pparams, int rheight, float &ratio); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index fabcf2158..fd0a67411 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -814,11 +814,7 @@ private: if (ipf.needsTransform()) { Imagefloat* trImg = new Imagefloat (fw, fh); ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh, - imgsrc->getMetaData(), - // imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), - // imgsrc->getMetaData()->getFocusDist(), - // imgsrc->getMetaData()->getFNumber(), - imgsrc->getRotateDegree(), true); + imgsrc->getMetaData(), imgsrc->getRotateDegree(), true); delete baseImg; baseImg = trImg; } diff --git a/rtgui/cacheimagedata.h b/rtgui/cacheimagedata.h index 0af6d4fcf..e1c317508 100644 --- a/rtgui/cacheimagedata.h +++ b/rtgui/cacheimagedata.h @@ -77,11 +77,6 @@ public: int load (const Glib::ustring& fname); int save (const Glib::ustring& fname); - // Glib::ustring getCamera() const - // { - // return Glib::ustring(camMake + " " + camModel); - // } - //------------------------------------------------------------------------- // ImageMetaData interface //------------------------------------------------------------------------- diff --git a/rtgui/lensgeom.h b/rtgui/lensgeom.h index aa473cb91..29b0c7f20 100644 --- a/rtgui/lensgeom.h +++ b/rtgui/lensgeom.h @@ -44,8 +44,6 @@ public: return packBox; } - Gtk::CheckButton *getFill() { return fill; } - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); From c465655cb471966117b5098396c407605e1044ff Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 13 Sep 2017 17:28:11 +0200 Subject: [PATCH 111/126] Fix two issues detected by coverity --- rtengine/green_equil_RT.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rtengine/green_equil_RT.cc b/rtengine/green_equil_RT.cc index 91093550d..90c412871 100644 --- a/rtengine/green_equil_RT.cc +++ b/rtengine/green_equil_RT.cc @@ -62,6 +62,16 @@ void RawImageSource::green_equilibrate_global(array2D &rawData) } } + // Avoid division by zero + if(ng1 == 0 || avgg1 == 0.0) { + ng1 = 1; + avgg1 = 1.0; + } + if(ng2 == 0 || avgg2 == 0.0) { + ng2 = 1; + avgg2 = 1.0; + } + double corrg1 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg1 / ng1); double corrg2 = (avgg1 / ng1 + avgg2 / ng2) / 2.0 / (avgg2 / ng2); From 71e6a063269b79c14b2e1d2822adccc87649293d Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 13 Sep 2017 19:34:25 +0200 Subject: [PATCH 112/126] same modification for double --- rtengine/improcfun.cc | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 625f93bb1..3bc154446 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -846,6 +846,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } else if (curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { //attention! Brightness curves are open - unlike Lightness or Lab or RGB==> rendering and algoritms will be different float coef = ((aw + 4.f) * (4.f / c)) / 100.f; + float Qanc = Qpro; float Qq = (float) Qpro * 327.68f * (1.f / coef); float Qold100 = (float) Qpro / coef; @@ -871,8 +872,15 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (double) (Qq * (coef) / 327.68f); - Jpro = 100.* (Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); + if (Qold == 0.f) { + Qold = 0.001f; + } + + Qpro = Qanc * (Qq / Qold); + Jpro = Jpro * SQR (Qq / Qold); + +// Qpro = (double) (Qq * (coef) / 327.68f); +// Jpro = 100.* (Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); t1B = true; if (Jpro < 1.) { @@ -927,6 +935,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } } else if (curveMode2 == ColorAppearanceParams::TC_MODE_BRIGHT) { // + float Qanc = Qpro; float coef = ((aw + 4.f) * (4.f / c)) / 100.f; float Qq = (float) Qpro * 327.68f * (1.f / coef); float Qold100 = (float) Qpro / coef; @@ -953,8 +962,16 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (double) (Qq * (coef) / 327.68f); - Jpro = 100.* (Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); + if (Qold == 0.f) { + Qold = 0.001f; + } + + // Qpro = (float) (Qq * (coef) / 327.68f); + Qpro = Qanc * (Qq / Qold); + Jpro = Jpro * SQR (Qq / Qold); + + // Qpro = (double) (Qq * (coef) / 327.68f); + // Jpro = 100.* (Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); t2B = true; if (t1L) { //to workaround the problem if we modify curve1-lightnees after curve2 brightness(the cat that bites its own tail!) in fact it's another type of curve only for this case @@ -2267,6 +2284,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } + if (Qold == 0.f) { + Qold = 0.001f; + } + Qpro = Qanc * (Qq / Qold); // Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); Jpro = Jpro * SQR (Qq / Qold); @@ -2345,6 +2366,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } + if (Qold == 0.f) { + Qold = 0.001f; + } + // Qpro = (float) (Qq * (coef) / 327.68f); Qpro = Qanc * (Qq / Qold); Jpro = Jpro * SQR (Qq / Qold); From 05b97f5c5086add6293437d892311f6e06015eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 13 Sep 2017 19:58:48 +0200 Subject: [PATCH 113/126] Fix some new Coverity warnings --- rtengine/iptransform.cc | 29 ++++++++++++++++++----------- rtengine/lcp.cc | 6 +++--- rtgui/cacheimagedata.h | 2 +- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 3f7472f6f..bfd01b301 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -789,18 +789,25 @@ void ImProcFunctions::transformGeneral(ImProcFunctions::TransformMode mode, Imag bool enableCA = false; switch (mode) { - case ImProcFunctions::TRANSFORM_HIGH_QUALITY_FULLIMAGE: - enableLCPCA = pLCPMap && params->lensProf.useCA && pLCPMap->isCACorrectionAvailable(); - // no break on purpose - case ImProcFunctions::TRANSFORM_HIGH_QUALITY: - enableLCPDist = pLCPMap && params->lensProf.useDist; - if (enableLCPCA) { - enableLCPDist = false; + case ImProcFunctions::TRANSFORM_HIGH_QUALITY_FULLIMAGE: { + enableLCPCA = pLCPMap && params->lensProf.useCA && pLCPMap->isCACorrectionAvailable(); + } + //no break on purpose + + case ImProcFunctions::TRANSFORM_HIGH_QUALITY: { + enableLCPDist = pLCPMap && params->lensProf.useDist; + if (enableLCPCA) { + enableLCPDist = false; + } + enableCA = enableLCPCA || needsCA(); + } + //no break on purpose + + default: + case ImProcFunctions::TRANSFORM_PREVIEW: { + enableLCPDist = pLCPMap && params->lensProf.useDist; + break; } - enableCA = enableLCPCA || needsCA(); - default: // ImProcFunctions::TRANSFORM_PREVIEW - enableLCPDist = pLCPMap && params->lensProf.useDist; - break; } if (!enableCA) { diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index 3a7c44000..3824d2b2f 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -650,8 +650,8 @@ int rtengine::LCPProfile::filterBadFrames(LCPCorrectionMode mode, double maxAvgD } } - if (settings->verbose) { - std::printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered *100.f / count, maxAvgDevFac, count - filtered); + if (settings->verbose && count) { + std::printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered * 100.f / count, maxAvgDevFac, count - filtered); } } @@ -1030,7 +1030,7 @@ void rtengine::LCPMapper::correctDistortion(double &x, double &y, int cx, int cy { x += cx; y += cy; - + if (isFisheye) { const double u = x * scale; const double v = y * scale; diff --git a/rtgui/cacheimagedata.h b/rtgui/cacheimagedata.h index e1c317508..63eebf25c 100644 --- a/rtgui/cacheimagedata.h +++ b/rtgui/cacheimagedata.h @@ -85,7 +85,7 @@ public: const rtexif::TagDirectory *getExifData() const { return NULL; } bool hasIPTC() const { return false; } const rtengine::procparams::IPTCPairs getIPTCData () const { return rtengine::procparams::IPTCPairs(); } - struct tm getDateTime () const { struct tm ret; return ret; } + tm getDateTime () const { return tm{}; } time_t getDateTimeAsTS() const { return time_t(-1); } int getISOSpeed() const { return iso; } double getFNumber() const { return fnumber; } From 5b3d60bf56e14442eede054473e8457d2d2fc606 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 14 Sep 2017 10:42:01 +0200 Subject: [PATCH 114/126] lensfun: applied Floessie's workaround for locale conversion issues --- rtengine/rtlensfun.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 87a7272e9..b42be9424 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -175,7 +175,7 @@ float LFCamera::getCropFactor() const Glib::ustring LFCamera::getDisplayString() const { if (data_) { - return Glib::ustring::compose("%1 %2", getMake(), getModel()); + return getMake() + ' ' + getModel(); } else { return "---"; } @@ -211,7 +211,7 @@ Glib::ustring LFLens::getMake() const Glib::ustring LFLens::getLens() const { if (data_) { - return Glib::ustring::compose("%1 %2", data_->Maker, data_->Model); + return Glib::ustring(data_->Maker) + ' ' + data_->Model; } else { return "---"; } From 008f280e2918cce406c270161f825c96b7421eba Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Thu, 14 Sep 2017 11:34:41 +0200 Subject: [PATCH 115/126] lensfun: added possibility to use a private copy of the LF database --- CMakeLists.txt | 4 ++++ rtengine/init.cc | 2 +- rtengine/rtlensfun.cc | 21 +++++++++++++++++++-- rtengine/rtlensfun.h | 2 +- rtengine/settings.h | 3 +++ rtgui/config.h.in | 1 + rtgui/options.cc | 11 +++++++++++ 7 files changed, 40 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 333e292f0..13ba209bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,6 +231,10 @@ if(NOT DEFINED APPDATADIR) endif() endif() +if(DEFINED LENSFUNDBDIR AND NOT IS_ABSOLUTE "${LENSFUNDBDIR}") + set(LENSFUNDBDIR "${DATADIR}/${LENSFUNDBDIR}") +endif() + # Enforce absolute paths for non-bundle builds: if(NOT BUILD_BUNDLE) foreach(path BINDIR DATADIR LIBDIR DOCDIR CREDITSDIR LICENCEDIR) diff --git a/rtengine/init.cc b/rtengine/init.cc index 7ef40f43a..7ac4ca35b 100644 --- a/rtengine/init.cc +++ b/rtengine/init.cc @@ -51,7 +51,7 @@ int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDi Color::init (); PerceptualToneCurve::init (); RawImageSource::init (); - LFDatabase::init(); + LFDatabase::init(s->lensfunDbDirectory); delete lcmsMutex; lcmsMutex = new MyMutex; dfm.init( s->darkFramesPath ); diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index b42be9424..06c01f975 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -253,10 +253,27 @@ bool LFLens::hasDistortionCorrection() const LFDatabase LFDatabase::instance_; -bool LFDatabase::init() +bool LFDatabase::init(const Glib::ustring &dbdir) { instance_.data_ = lfDatabase::Create(); - return instance_.data_->Load() != LF_NO_ERROR; + + if (settings->verbose) { + std::cout << "Loading lensfun database from "; + if (dbdir.empty()) { + std::cout << "the default directories"; + } else { + std::cout << "'" << dbdir << "'"; + } + std::cout << "..." << std::flush; + } + + bool ok = instance_.data_->Load(dbdir.empty() ? nullptr : dbdir.c_str()) == LF_NO_ERROR; + + if (settings->verbose) { + std::cout << (ok ? "OK" : "FAIL") << std::endl; + } + + return ok; } diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index 5774968ee..a4ff17ae9 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -100,7 +100,7 @@ class LFDatabase final : public NonCopyable { public: - static bool init(); + static bool init(const Glib::ustring &dbdir); static const LFDatabase *getInstance(); ~LFDatabase(); diff --git a/rtengine/settings.h b/rtengine/settings.h index ada63400a..225503777 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -92,6 +92,9 @@ public: double ed_low; double ed_lipinfl; double ed_lipampl; + + Glib::ustring lensfunDbDirectory; ///< The directory containing the lensfun database. If empty, the system defaults will be used (as described in http://lensfun.sourceforge.net/manual/dbsearch.html) + /** Creates a new instance of Settings. * @return a pointer to the new Settings instance. */ static Settings* create (); diff --git a/rtgui/config.h.in b/rtgui/config.h.in index cab481278..fdf64b73c 100644 --- a/rtgui/config.h.in +++ b/rtgui/config.h.in @@ -25,5 +25,6 @@ #define DOC_SEARCH_PATH "${DOCDIR}" #define CREDITS_SEARCH_PATH "${CREDITSDIR}" #define LICENCE_SEARCH_PATH "${LICENCEDIR}" +#define LENSFUN_DB_PATH "${LENSFUNDBDIR}" #endif diff --git a/rtgui/options.cc b/rtgui/options.cc index 2b504a2de..c2e2b586b 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -24,6 +24,7 @@ #include "addsetids.h" #include "guiutils.h" #include "version.h" +#include "config.h" #ifdef _OPENMP #include @@ -727,6 +728,8 @@ void Options::setDefaults () lastLensProfileDir = ""; gimpPluginShowInfoDialog = true; maxRecentFolders = 15; + + rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; } Options* Options::copyFrom (Options* other) @@ -1868,6 +1871,12 @@ void Options::readFromFile (Glib::ustring fname) } } + if (keyFile.has_group ("Lensfun")) { + if (keyFile.has_key ("Lensfun", "DBDirectory")) { + rtSettings.lensfunDbDirectory = keyFile.get_string ("Lensfun", "DBDirectory"); + } + } + // -------------------------------------------------------------------------------------------------------- filterOutParsedExtensions (); @@ -2239,6 +2248,8 @@ void Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir); keyFile.set_boolean ("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog); + keyFile.set_string ("Lensfun", "DBDirectory", rtSettings.lensfunDbDirectory); + keyData = keyFile.to_data (); } catch (Glib::KeyFileError &e) { From a515329bac47f968ff3988b888d6eae14713255c Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 14 Sep 2017 13:24:19 +0200 Subject: [PATCH 116/126] Don't pass nullptr to lensfun Load() --- rtengine/rtlensfun.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 06c01f975..32d498589 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -267,7 +267,7 @@ bool LFDatabase::init(const Glib::ustring &dbdir) std::cout << "..." << std::flush; } - bool ok = instance_.data_->Load(dbdir.empty() ? nullptr : dbdir.c_str()) == LF_NO_ERROR; + bool ok = dbdir.empty() ? instance_.data_->Load() : instance_.data_->Load(dbdir.c_str()) == LF_NO_ERROR; if (settings->verbose) { std::cout << (ok ? "OK" : "FAIL") << std::endl; From be2b1ed04395802584dd444dee26b40161c3f715 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 14 Sep 2017 13:53:03 +0200 Subject: [PATCH 117/126] Use LoadDirectory() instead of Load() when dbdir is not empty --- rtengine/rtlensfun.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index 32d498589..a352613ab 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -267,7 +267,7 @@ bool LFDatabase::init(const Glib::ustring &dbdir) std::cout << "..." << std::flush; } - bool ok = dbdir.empty() ? instance_.data_->Load() : instance_.data_->Load(dbdir.c_str()) == LF_NO_ERROR; + bool ok = dbdir.empty() ? (instance_.data_->Load() == LF_NO_ERROR) : instance_.data_->LoadDirectory(dbdir.c_str()); if (settings->verbose) { std::cout << (ok ? "OK" : "FAIL") << std::endl; From 952ada554ae86a3df376a23477b8f616006bb8dd Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 14 Sep 2017 17:13:45 +0200 Subject: [PATCH 118/126] Preview not updating properly when going back in history with LCP vignetting correction, fixes #4073 --- rtgui/paramsedited.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 7c32265d9..aa3c21256 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -3053,7 +3053,7 @@ bool RAWParamsEdited::isUnchanged() const bool LensProfParamsEdited::isUnchanged() const { - return lcpFile; + return lcpFile && useVign && lfLens; } bool RetinexParamsEdited::isUnchanged() const From 95040fba98929b8ab503dcfdb13f24caba75e598 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Fri, 15 Sep 2017 10:38:37 +0200 Subject: [PATCH 119/126] fix bug in opening a directory when the -R switch is not given --- rtgui/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/main.cc b/rtgui/main.cc index f5e134b5a..f85cb6084 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -640,7 +640,7 @@ int main (int argc, char **argv) printf ("Error: -gimp requires two arguments\n"); return 1; } - } else if (!remote && Glib::file_test (argv1, Glib::FILE_TEST_EXISTS)) { + } else if (!remote && Glib::file_test(argv1, Glib::FILE_TEST_EXISTS) && !Glib::file_test(argv1, Glib::FILE_TEST_IS_DIR)) { simpleEditor = true; } From 818200522a0501395e2e48bdeff69152cbc7bb61 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 15 Sep 2017 20:11:49 +0200 Subject: [PATCH 120/126] Fix some inconsistencies in Profiled Lens Correction gui --- rtengine/dcrop.cc | 4 +- rtengine/improccoordinator.cc | 2 +- rtengine/iptransform.cc | 4 +- rtengine/procparams.cc | 43 +- rtengine/procparams.h | 46 +- rtengine/rawimagesource.cc | 2 +- rtengine/rtlensfun.cc | 4 +- rtgui/lensprofile.cc | 85 +- rtgui/lensprofile.h | 4 +- rtgui/options.cc.save-failed | 2508 +++++++++++++++++++++++++++++++++ rtgui/paramsedited.cc | 20 +- rtgui/paramsedited.h | 1 + rtgui/ppversion.h | 4 +- 13 files changed, 2627 insertions(+), 100 deletions(-) create mode 100644 rtgui/options.cc.save-failed diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 25710205f..0738e48b0 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -1083,9 +1083,7 @@ bool check_need_larger_crop_for_lcp_distortion (int fw, int fh, int x, int y, in return false; } - return (params.lensProf.useDist && - (params.lensProf.useLensfun || - params.lensProf.lcpFile.length() > 0)); + return (params.lensProf.useDist && (params.lensProf.useLensfun() || params.lensProf.useLcp())); } } // namespace diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 2b9edc3d6..7e03ac909 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1120,7 +1120,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & LensCorrection *pLCPMap = nullptr; - if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { + if (params.lensProf.useLcp() && imgsrc->getMetaData()->getFocalLen() > 0) { const std::shared_ptr pLCPProf = LCPStore::getInstance()->getProfile (params.lensProf.lcpFile); if (pLCPProf) pLCPMap = new LCPMapper (pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index bfd01b301..1cafac7a9 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -1015,12 +1015,12 @@ bool ImProcFunctions::needsVignetting () bool ImProcFunctions::needsLCP () { - return params->lensProf.lcpFile.length() > 0 && !needsLensfun(); + return params->lensProf.useLcp(); } bool ImProcFunctions::needsLensfun() { - return params->lensProf.useLensfun; + return params->lensProf.useLensfun(); } bool ImProcFunctions::needsTransform () diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 29b2cce84..a18982325 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -52,6 +52,7 @@ const int br = (int) options.rtSettings.bot_right; const int tl = (int) options.rtSettings.top_left; const int bl = (int) options.rtSettings.bot_left; +const char *LensProfParams::methodstring[static_cast(LensProfParams::eLcMode::lcp) + 1u] = {"none", "lfauto", "lfmanual", "lcp"}; const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods] = {"amaze", "igv", "lmmse", "eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none", "pixelshift" }; const char *RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::numMethods] = {"3-pass (best)", "1-pass (medium)", "fast", "mono", "none" }; @@ -919,11 +920,10 @@ void ToneCurveParams::setDefaults() void LensProfParams::setDefaults() { + lcMode = eLcMode::none; lcpFile = ""; useDist = useVign = true; useCA = false; - useLensfun = false; - lfAutoMatch = true; lfCameraMake = ""; lfCameraModel = ""; lfLens = ""; @@ -2554,6 +2554,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } // lens profile + if (!pedited || pedited->lensProf.lcMode) { + keyFile.set_string ("LensProfile", "LcMode", lensProf.getMethodString (lensProf.lcMode)); + } + if (!pedited || pedited->lensProf.lcpFile) { keyFile.set_string ("LensProfile", "LCPFile", relativePathIfInside (fname, fnameAbsolute, lensProf.lcpFile)); } @@ -2570,12 +2574,6 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("LensProfile", "UseCA", lensProf.useCA); } - if (!pedited || pedited->lensProf.useLensfun) { - keyFile.set_boolean("LensProfile", "UseLensfun", lensProf.useLensfun); - } - if (!pedited || pedited->lensProf.lfAutoMatch) { - keyFile.set_boolean("LensProfile", "LFAutoMatch", lensProf.lfAutoMatch); - } if (!pedited || pedited->lensProf.lfCameraMake) { keyFile.set_string("LensProfile", "LFCameraMake", lensProf.lfCameraMake); } @@ -5822,12 +5820,24 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) // lens profile if (keyFile.has_group ("LensProfile")) { + if (keyFile.has_key ("LensProfile", "LcMode")) { + lensProf.lcMode = lensProf.getMethodNumber (keyFile.get_string ("LensProfile", "LcMode")); + + if (pedited) { + pedited->lensProf.lcMode = true; + } + } + if (keyFile.has_key ("LensProfile", "LCPFile")) { lensProf.lcpFile = expandRelativePath (fname, "", keyFile.get_string ("LensProfile", "LCPFile")); if (pedited) { pedited->lensProf.lcpFile = true; } + + if(ppVersion < 327 && !lensProf.lcpFile.empty()) { + lensProf.lcMode = LensProfParams::eLcMode::lcp; + } } if (keyFile.has_key ("LensProfile", "UseDistortion")) { @@ -5854,20 +5864,6 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key("LensProfile", "UseLensfun")) { - lensProf.useLensfun = keyFile.get_boolean("LensProfile", "UseLensfun"); - if (pedited) { - pedited->lensProf.useLensfun = true; - } - } - - if (keyFile.has_key("LensProfile", "LFAutoMatch")) { - lensProf.lfAutoMatch = keyFile.get_boolean("LensProfile", "LFAutoMatch"); - if (pedited) { - pedited->lensProf.lfAutoMatch = true; - } - } - if (keyFile.has_key("LensProfile", "LFCameraMake")) { lensProf.lfCameraMake = keyFile.get_string("LensProfile", "LFCameraMake"); if (pedited) { @@ -8484,12 +8480,11 @@ bool ProcParams::operator== (const ProcParams& other) && rotate.degree == other.rotate.degree && commonTrans.autofill == other.commonTrans.autofill && distortion.amount == other.distortion.amount + && lensProf.lcMode == other.lensProf.lcMode && lensProf.lcpFile == other.lensProf.lcpFile && lensProf.useDist == other.lensProf.useDist && lensProf.useVign == other.lensProf.useVign && lensProf.useCA == other.lensProf.useCA - && lensProf.useLensfun == other.lensProf.useLensfun - && lensProf.lfAutoMatch == other.lensProf.lfAutoMatch && lensProf.lfCameraMake == other.lensProf.lfCameraMake && lensProf.lfCameraModel == other.lensProf.lfCameraModel && lensProf.lfLens == other.lensProf.lfLens diff --git a/rtengine/procparams.h b/rtengine/procparams.h index c7bedf611..9e7b728eb 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -829,10 +829,17 @@ class LensProfParams { public: + enum class eLcMode { + none, // No lens correction + lensfunAutoMatch, // Lens correction using auto matched lensfun database entry + lensfunManual, // Lens correction using manually selected lensfun database entry + lcp // Lens correction using lcp file + }; + + static const char *methodstring[static_cast(eLcMode::lcp) + 1u]; + eLcMode lcMode; Glib::ustring lcpFile; bool useDist, useVign, useCA; - bool useLensfun; - bool lfAutoMatch; Glib::ustring lfCameraMake; Glib::ustring lfCameraModel; Glib::ustring lfLens; @@ -842,6 +849,41 @@ public: setDefaults(); } void setDefaults(); + + bool useLensfun() const + { + return lcMode == eLcMode::lensfunAutoMatch || lcMode == eLcMode::lensfunManual; + } + + bool lfAutoMatch() const + { + return lcMode == eLcMode::lensfunAutoMatch; + } + + bool useLcp() const + { + return lcMode == eLcMode::lcp && lcpFile.length() > 0; + } + + bool lfManual() const + { + return lcMode == eLcMode::lensfunManual; + } + + Glib::ustring getMethodString(eLcMode mode) const + { + return methodstring[static_cast(mode)]; + } + + eLcMode getMethodNumber(const Glib::ustring &mode) const + { + for(size_t i = 0; i < static_cast(eLcMode::lcp); ++i) { + if(methodstring[i] == mode) { + return static_cast(i); + } + } + return eLcMode::none; + } }; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index fdf5b6bc8..1b29b352a 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1857,7 +1857,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le // Correct vignetting of lens profile if (!hasFlatField && lensProf.useVign) { std::unique_ptr pmap; - if (lensProf.useLensfun) { + if (lensProf.useLensfun()) { pmap = std::move(LFDatabase::findModifier(lensProf, idata, W, H, coarse, -1)); } else { const std::shared_ptr pLCPProf = LCPStore::getInstance()->getProfile(lensProf.lcpFile); diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index a352613ab..1e1da319f 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -395,7 +395,7 @@ std::unique_ptr LFDatabase::findModifier(const LensProfParams &lensP const LFDatabase *db = getInstance(); Glib::ustring make, model, lens; float focallen = idata->getFocalLen(); - if (lensProf.lfAutoMatch) { + if (lensProf.lfAutoMatch()) { if (focallen <= 0) { return nullptr; } @@ -408,7 +408,7 @@ std::unique_ptr LFDatabase::findModifier(const LensProfParams &lensP lens = lensProf.lfLens; } LFCamera c = db->findCamera(make, model); - LFLens l = db->findLens(lensProf.lfAutoMatch ? c : LFCamera(), lens); + LFLens l = db->findLens(lensProf.lfAutoMatch() ? c : LFCamera(), lens); if (focallen <= 0 && l.data_ && l.data_->MinFocal == l.data_->MaxFocal) { focallen = l.data_->MinFocal; } diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index bb9138461..b6cef05fc 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -33,6 +33,7 @@ LensProfilePanel::LFDbHelper *LensProfilePanel::lf(nullptr); LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")), + lcModeChanged(false), lcpFileChanged(false), useDistChanged(false), useVignChanged(false), @@ -122,10 +123,6 @@ LensProfilePanel::LensProfilePanel () : hbLCPFile->pack_start(*fcbLCPFile); - btnReset = Gtk::manage(new Gtk::Button()); - btnReset->set_image (*Gtk::manage(new RTImage ("gtk-cancel.png"))); - hbLCPFile->pack_start(*btnReset, Gtk::PACK_SHRINK, 4); - pack_start(*hbLCPFile, Gtk::PACK_SHRINK, 4); ckbUseDist = Gtk::manage (new Gtk::CheckButton (M("TP_LENSPROFILE_USEDIST"))); @@ -136,7 +133,6 @@ LensProfilePanel::LensProfilePanel () : pack_start (*ckbUseCA, Gtk::PACK_SHRINK, 4); conLCPFile = fcbLCPFile->signal_file_set().connect( sigc::mem_fun(*this, &LensProfilePanel::onLCPFileChanged), true); - btnReset->signal_clicked().connect( sigc::mem_fun(*this, &LensProfilePanel::onLCPFileReset), true); conUseDist = ckbUseDist->signal_toggled().connect( sigc::mem_fun(*this, &LensProfilePanel::onUseDistChanged) ); ckbUseVign->signal_toggled().connect( sigc::mem_fun(*this, &LensProfilePanel::onUseVignChanged) ); ckbUseCA->signal_toggled().connect( sigc::mem_fun(*this, &LensProfilePanel::onUseCAChanged) ); @@ -163,32 +159,29 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa } corrLensfunAuto->set_sensitive(true); - - if (pp->lensProf.useLensfun) { - if (pp->lensProf.lfAutoMatch) { - corrLensfunAuto->set_active(true); - } else { - corrLensfunManual->set_active(true); - } - } else if (!pp->lensProf.lcpFile.empty() && LCPStore::getInstance()->isValidLCPFileName(pp->lensProf.lcpFile)) { + + if(pp->lensProf.lcMode == procparams::LensProfParams::eLcMode::lcp) { corrLcpFile->set_active(true); + } else if(pp->lensProf.lcMode == procparams::LensProfParams::eLcMode::lensfunAutoMatch) { + corrLensfunAuto->set_active(true); + } else if(pp->lensProf.lcMode == procparams::LensProfParams::eLcMode::lensfunManual) { + corrLensfunManual->set_active(true); + } else { + corrOff->set_active(true); + } + + if (pp->lensProf.lcpFile.empty()) { + Glib::ustring lastFolder = fcbLCPFile->get_current_folder(); + fcbLCPFile->set_current_folder(lastFolder); + fcbLCPFile->set_filename(lastFolder + "/."); + bindCurrentFolder(*fcbLCPFile, options.lastLensProfileDir); + updateDisabled(false); + } else if (LCPStore::getInstance()->isValidLCPFileName(pp->lensProf.lcpFile)) { fcbLCPFile->set_filename (pp->lensProf.lcpFile); updateDisabled(true); } else { - Glib::ustring fname = fcbLCPFile->get_filename(); - - if (!pp->lensProf.lcpFile.empty()) { - fcbLCPFile->unselect_filename(fname); - } else { - Glib::ustring lastFolder = fcbLCPFile->get_current_folder(); - fcbLCPFile->set_current_folder(lastFolder); - fcbLCPFile->set_filename(lastFolder + "/."); - bindCurrentFolder(*fcbLCPFile, options.lastLensProfileDir); - } - + fcbLCPFile->unselect_filename(fcbLCPFile->get_filename()); updateDisabled(false); - - corrOff->set_active(true); } ckbUseDist->set_active (pp->lensProf.useDist); @@ -203,14 +196,14 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa l = db->findLens(c, metadata->getLens()); } - if (!setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel) && pp->lensProf.lfAutoMatch) { + if (!setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel) && !pp->lensProf.lfManual()) { setLensfunCamera(c.getMake(), c.getModel()); } - if (!setLensfunLens(pp->lensProf.lfLens) && pp->lensProf.lfAutoMatch) { + if (!setLensfunLens(pp->lensProf.lfLens) && !pp->lensProf.lfManual()) { setLensfunLens(l.getLens()); } - lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; + lcModeChanged = lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; if (!batchMode && !checkLensfunCanCorrect(true)) { @@ -276,7 +269,17 @@ void LensProfilePanel::setRawMeta(bool raw, const rtengine::ImageMetaData* pMeta void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) { - if (corrLcpFile->get_active() && LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename())) { + if (corrLcpFile->get_active()) { + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::lcp; + } else if(corrLensfunManual->get_active()) { + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::lensfunManual; + } else if(corrLensfunAuto->get_active()) { + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::lensfunAutoMatch; + } else if(corrOff->get_active()) { + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::none; + } + + if (LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename())) { pp->lensProf.lcpFile = fcbLCPFile->get_filename(); } else { pp->lensProf.lcpFile = ""; @@ -286,8 +289,6 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited pp->lensProf.useVign = ckbUseVign->get_active(); pp->lensProf.useCA = ckbUseCA->get_active(); - pp->lensProf.useLensfun = corrLensfunAuto->get_active() || corrLensfunManual->get_active(); - pp->lensProf.lfAutoMatch = corrLensfunAuto->get_active(); auto itc = lensfunCameras->get_active(); if (itc) { pp->lensProf.lfCameraMake = (*itc)[lf->lensfunModelCam.make]; @@ -304,6 +305,7 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited } if (pedited) { + pedited->lensProf.lcMode = lcModeChanged; pedited->lensProf.lcpFile = lcpFileChanged; pedited->lensProf.useDist = useDistChanged; pedited->lensProf.useVign = useVignChanged; @@ -332,22 +334,6 @@ void LensProfilePanel::onLCPFileChanged() } } -void LensProfilePanel::onLCPFileReset() -{ - lcpFileChanged = true; - - fcbLCPFile->unselect_filename(fcbLCPFile->get_filename()); - updateDisabled(false); - - - if (listener) { - disableListener(); - corrOff->set_active(true); - enableListener(); - listener->panelChanged (EvLCPFile, M("GENERAL_NONE")); - } -} - void LensProfilePanel::onUseDistChanged() { useDistChanged = true; @@ -563,7 +549,7 @@ void LensProfilePanel::onCorrModeChanged() mode = M("GENERAL_UNCHANGED"); } - + lcModeChanged = true; updateLensfunWarning(); if (listener) { @@ -579,7 +565,6 @@ bool LensProfilePanel::checkLensfunCanCorrect(bool automatch) } rtengine::procparams::ProcParams lpp; write(&lpp); - lpp.lensProf.lfAutoMatch = automatch; std::unique_ptr mod(LFDatabase::findModifier(lpp.lensProf, metadata, 100, 100, lpp.coarse, -1)); return mod.get() != nullptr; } diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index aca8f16ef..1b1554cab 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -32,9 +32,8 @@ protected: MyFileChooserButton *fcbLCPFile; Gtk::CheckButton *ckbUseDist, *ckbUseVign, *ckbUseCA; Gtk::HBox *hbLCPFile; - Gtk::Button *btnReset; Gtk::Label *lLCPFileHead; - bool lcpFileChanged, useDistChanged, useVignChanged, useCAChanged; + bool lcModeChanged, lcpFileChanged, useDistChanged, useVignChanged, useCAChanged; sigc::connection conLCPFile, conUseDist, conUseVign, conUseCA; void updateDisabled(bool enable); bool allowFocusDep; @@ -98,7 +97,6 @@ public: void setRawMeta (bool raw, const rtengine::ImageMetaData* pMeta); void onLCPFileChanged (); - void onLCPFileReset (); void onUseDistChanged(); void onUseVignChanged(); void onUseCAChanged(); diff --git a/rtgui/options.cc.save-failed b/rtgui/options.cc.save-failed new file mode 100644 index 000000000..d03ece485 --- /dev/null +++ b/rtgui/options.cc.save-failed @@ -0,0 +1,2508 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * 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 . + */ +#include "options.h" +#include +#include +#include +#include "multilangmgr.h" +#include "addsetids.h" +#include "guiutils.h" +#include "version.h" +#include "config.h" +#include +#ifdef _OPENMP +#include +#endif + + + +#ifdef WIN32 +#include +// for GCC32 +#ifndef _WIN32_IE +#define _WIN32_IE 0x0600 +#endif +#include +#endif + +// User's settings directory, including images' profiles if used +Glib::ustring Options::rtdir; +// User's cached datas' directory +Glib::ustring Options::cacheBaseDir; + +Options options; +Glib::ustring versionString = RTVERSION; +Glib::ustring paramFileExtension = ".pp3"; + +Options::Options () +{ + + defProfRawMissing = false; + defProfImgMissing = false; + setDefaults (); +} + +const char *DefaultLanguage = "English (US)"; + +inline bool Options::checkProfilePath (Glib::ustring &path) +{ + if (path.empty()) { + return false; + } + + Glib::ustring p = getUserProfilePath(); + + if (!p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS)) { + return true; + } + + p = getGlobalProfilePath(); + + return !p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS); +} + +bool Options::checkDirPath (Glib::ustring &path, Glib::ustring errString) +{ + if (Glib::file_test (path, Glib::FILE_TEST_EXISTS) && Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) { + return true; + } else { + if (!errString.empty()) { + printf ("%s\n", errString.c_str()); + } + + return false; + } +} + +void Options::updatePaths() +{ + + Glib::ustring tmpPath; + + userProfilePath = ""; + globalProfilePath = ""; + + if (Glib::path_is_absolute (profilePath)) { + // absolute path + if (!checkDirPath (profilePath, "")) { + g_mkdir_with_parents (profilePath.c_str (), 511); + + if (!checkDirPath (profilePath, "")) { // had problems with mkdir_with_parents return value on OS X, just check dir again + printf ("Error: user's profiles' directory \"%s\" creation failed\n", profilePath.c_str()); + } + } + + if (checkDirPath (profilePath, "Error: the specified user's profiles' path doesn't point to a directory or doesn't exist!\n")) { + if (multiUser) { + userProfilePath = profilePath; + tmpPath = Glib::build_filename (argv0, "profiles"); + + if (checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { + if (userProfilePath != tmpPath) { + globalProfilePath = tmpPath; + } + } + } else { + globalProfilePath = profilePath; + } + } else { + tmpPath = Glib::build_filename (argv0, "profiles"); + + if (checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { + globalProfilePath = tmpPath; + } + } + } else { + // relative paths + if (multiUser) { + tmpPath = Glib::build_filename (rtdir, profilePath); + + if (!checkDirPath (tmpPath, "")) { + g_mkdir_with_parents (tmpPath.c_str (), 511); + + if (!checkDirPath (tmpPath, "")) { + printf ("Error: user's profiles' directory \"%s\" creation failed\n", tmpPath.c_str()); + } + } + + if (checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory!\n")) { + userProfilePath = tmpPath; + } + + tmpPath = Glib::build_filename (argv0, "profiles"); + + if (checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory or doesn't exist!\n")) { + globalProfilePath = tmpPath; + } + } else { + // common directory + // directory name set in options is ignored, we use the default directory name + tmpPath = Glib::build_filename (argv0, "profiles"); + + if (checkDirPath (tmpPath, "Error: no global profiles' directory found!\n")) { + globalProfilePath = tmpPath; + } + } + } + + Glib::ustring preferredPath = getPreferredProfilePath(); + + // Paths are updated only if the user or global profile path is set + if (lastRgbCurvesDir.empty() || !Glib::file_test (lastRgbCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastRgbCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastRgbCurvesDir = preferredPath; + } + + if (lastLabCurvesDir.empty() || !Glib::file_test (lastLabCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastLabCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastLabCurvesDir = preferredPath; + } + + if (lastRetinexDir.empty() || !Glib::file_test (lastRetinexDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastLabCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastRetinexDir = preferredPath; + } + + if (lastDenoiseCurvesDir.empty() || !Glib::file_test (lastDenoiseCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastDenoiseCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastDenoiseCurvesDir = preferredPath; + } + + if (lastWaveletCurvesDir.empty() || !Glib::file_test (lastWaveletCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastWaveletCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastWaveletCurvesDir = preferredPath; + } + + if (lastPFCurvesDir.empty() || !Glib::file_test (lastPFCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastPFCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastPFCurvesDir = preferredPath; + } + + if (lastHsvCurvesDir.empty() || !Glib::file_test (lastHsvCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastHsvCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastHsvCurvesDir = preferredPath; + } + + if (lastToneCurvesDir.empty() || !Glib::file_test (lastToneCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastToneCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastToneCurvesDir = preferredPath; + } + + if (lastProfilingReferenceDir.empty() || !Glib::file_test (lastProfilingReferenceDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastProfilingReferenceDir, Glib::FILE_TEST_IS_DIR)) { + lastProfilingReferenceDir = preferredPath; + } + + if (lastVibranceCurvesDir.empty() || !Glib::file_test (lastVibranceCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastVibranceCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastVibranceCurvesDir = preferredPath; + } + + if (loadSaveProfilePath.empty() || !Glib::file_test (loadSaveProfilePath, Glib::FILE_TEST_EXISTS) || !Glib::file_test (loadSaveProfilePath, Glib::FILE_TEST_IS_DIR)) { + loadSaveProfilePath = preferredPath; + } + + if (lastBWCurvesDir.empty() || !Glib::file_test (lastBWCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastBWCurvesDir, Glib::FILE_TEST_IS_DIR)) { + lastBWCurvesDir = preferredPath; + } + +} + +Glib::ustring Options::getPreferredProfilePath() +{ + if (!userProfilePath.empty()) { + return userProfilePath; + } else if (!globalProfilePath.empty()) { + return globalProfilePath; + } else { + return ""; + } +} + +/** @brief Get the absolute path of the given filename or the "Neutral" special value + * + *@param profName path + filename of the procparam to look for. A filename without path can be provided for backward compatibility. + * In this case, this parameter will be updated with the new format. + *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementor will have + * to test for this particular value. If the absolute path is invalid (e.g. the file doesn't exist), it will return an empty string. + */ +Glib::ustring Options::findProfilePath (Glib::ustring &profName) +{ + if (profName.empty()) { + return ""; + } + + if (profName == DEFPROFILE_INTERNAL) { + return profName; + } + + if (profName == DEFPROFILE_DYNAMIC) { + return profName; + } + + Glib::ustring p = profName.substr (0, 4); + + if (p == "${U}") { + // the path starts by the User virtual path + p = getUserProfilePath(); + Glib::ustring fullPath = Glib::build_filename (p, profName.substr (5) + paramFileExtension); + + if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { + return Glib::path_get_dirname (fullPath); + } + } else if (p == "${G}") { + // the path starts by the User virtual path + p = getGlobalProfilePath(); + Glib::ustring fullPath = Glib::build_filename (p, profName.substr (5) + paramFileExtension); + + if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { + return Glib::path_get_dirname (fullPath); + } + } else { + // compatibility case -> convert the path to the new format + p = getUserProfilePath(); + Glib::ustring fullPath = Glib::build_filename (p, profName + paramFileExtension); + + if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { + // update the profile path + profName = Glib::build_filename ("${U}", profName); + return Glib::path_get_dirname (fullPath); + } + + p = getGlobalProfilePath(); + fullPath = Glib::build_filename (p, profName + paramFileExtension); + + if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { + profName = Glib::build_filename ("${G}", profName); + return Glib::path_get_dirname (fullPath); + } + } + + return ""; + +} + +void Options::setDefaults () +{ + + windowWidth = 1200; + windowHeight = 680; + windowX = 0; + windowY = 0; + windowMaximized = true; + windowMonitor = 0; + meowMonitor = -1; + meowFullScreen = false; + meowMaximized = true; + meowWidth = 1200; + meowHeight = 680; + meowX = 0; + meowY = 0; + saveAsDialogWidth = 920; + saveAsDialogHeight = 680; + savesParamsAtExit = true; + saveFormat.format = "jpg"; + saveFormat.jpegQuality = 92; + saveFormat.jpegSubSamp = 2; + saveFormat.pngCompression = 6; + saveFormat.pngBits = 8; + saveFormat.tiffBits = 16; + saveFormat.tiffUncompressed = true; + saveFormat.saveParams = true; + + saveFormatBatch.format = "jpg"; + saveFormatBatch.jpegQuality = 92; + saveFormatBatch.jpegSubSamp = 2; + saveFormatBatch.pngCompression = 6; + saveFormatBatch.pngBits = 8; + saveFormatBatch.tiffBits = 16; + saveFormatBatch.tiffUncompressed = true; + saveFormatBatch.saveParams = true; + + savePathTemplate = "%p1/converted/%f"; + savePathFolder = ""; + saveUsePathTemplate = true; + defProfRaw = DEFPROFILE_RAW; + defProfImg = DEFPROFILE_IMG; + dateFormat = "%y-%m-%d"; + adjusterMinDelay = 100; + adjusterMaxDelay = 200; + startupDir = STARTUPDIR_LAST; + startupPath = ""; + useBundledProfiles = true; + detailWindowWidth = -1; + detailWindowHeight = -1; + dirBrowserWidth = 260; + dirBrowserHeight = 350; + dirBrowserSortType = Gtk::SORT_ASCENDING; + preferencesWidth = 800; + preferencesHeight = 0; + toolPanelWidth = 400; + browserToolPanelWidth = 465; + browserToolPanelHeight = 600; + browserToolPanelOpened = true;; + browserDirPanelOpened = true; + editorFilmStripOpened = true; + historyPanelWidth = 330; + fontFamily = "default"; + fontSize = 10; + CPFontFamily = "default"; + CPFontSize = 8; + lastScale = 5; + panAccelFactor = 5; + rememberZoomAndPan = true; + lastCropSize = 1; + fbOnlyRaw = false; + fbShowDateTime = true; + fbShowBasicExif = true; + fbShowExpComp = false; + fbShowHidden = false; + fbArrangement = 2; // was 0 + navRGBUnit = NavigatorUnit::PERCENT; + navHSVUnit = NavigatorUnit::PERCENT; + multiUser = true; + profilePath = "profiles"; + loadSaveProfilePath = ""; // will be corrected in load as otherwise construction fails + version = "0.0.0.0"; // temporary value; will be correctly set in RTWindow::on_realize + thumbSize = 160; + thumbSizeTab = 160; + thumbSizeQueue = 160; + sameThumbSize = false; // preferring speed of switch between file browser and single editor tab + showHistory = true; + showFilePanelState = 0; // Not used anymore ; was the thumb strip state + showInfo = true; + cropPPI = 600; + showClippedHighlights = false; + showClippedShadows = false; + highlightThreshold = 253; // was 254 + shadowThreshold = 8; // was 0 + bgcolor = 0; + blinkClipped = false; + language = DefaultLanguage; + languageAutoDetect = langMgr.isOSLanguageDetectSupported(); + lastSaveAsPath = ""; + overwriteOutputFile = false; // if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. + theme = "RawTherapee"; + maxThumbnailHeight = 250; + maxCacheEntries = 20000; + thumbInterp = 1; + autoSuffix = true; + forceFormatOpts = true; + saveMethodNum = 0; // 0->immediate, 1->putToQueuHead, 2->putToQueueTail + saveParamsFile = true; // was false, but saving the procparams files next to the file make more sense when reorganizing file tree than in a cache + saveParamsCache = false; // there's no need to save the procparams files in a cache if saveParamsFile is true + paramsLoadLocation = PLL_Input; // was PLL_Cache + procQueueEnabled = false; + gimpDir = ""; + psDir = ""; + customEditorProg = ""; + CPBKeys = CPBKT_TID; + editorToSendTo = 1; + favoriteDirs.clear(); + tpOpen.clear (); + autoSaveTpOpen = true; + //crvOpen.clear (); + parseExtensions.clear (); + parseExtensionsEnabled.clear (); + parsedExtensions.clear (); + renameUseTemplates = false; + renameTemplates.clear (); + thumbnailZoomRatios.clear (); + thumbnailZoomRatios.push_back (0.2); + thumbnailZoomRatios.push_back (0.3); + thumbnailZoomRatios.push_back (0.45); + thumbnailZoomRatios.push_back (0.6); + thumbnailZoomRatios.push_back (0.8); + thumbnailZoomRatios.push_back (1.0); + overlayedFileNames = false; + filmStripOverlayedFileNames = false; + internalThumbIfUntouched = true; // if TRUE, only fast, internal preview images are taken if the image is not edited yet + showFileNames = true; + filmStripShowFileNames = false; + tabbedUI = false; + mainNBVertical = true; + multiDisplayMode = 0; + tunnelMetaData = true; + histogramPosition = 1; + histogramBar = true; + histogramFullMode = false; + curvebboxpos = 1; + prevdemo = PD_Sidecar; + rgbDenoiseThreadLimit = 0; +#if defined( _OPENMP ) && defined( __x86_64__ ) + clutCacheSize = omp_get_num_procs(); +#else + clutCacheSize = 1; +#endif + filledProfile = false; + maxInspectorBuffers = 2; // a rather conservative value for low specced systems... + serializeTiffRead = true; + + FileBrowserToolbarSingleRow = false; + hideTPVScrollbar = false; + UseIconNoText = true; + whiteBalanceSpotSize = 8; + showFilmStripToolBar = false; + menuGroupRank = true; + menuGroupLabel = true; + menuGroupFileOperations = true; + menuGroupProfileOperations = true; + menuGroupExtProg = true; + + fastexport_bypass_sharpening = true; + fastexport_bypass_sharpenEdge = true; + fastexport_bypass_sharpenMicro = true; + //fastexport_bypass_lumaDenoise = true; + //fastexport_bypass_colorDenoise = true; + fastexport_bypass_defringe = true; + fastexport_bypass_dirpyrDenoise = true; + fastexport_bypass_sh_hq = true; + fastexport_bypass_dirpyrequalizer = true; + fastexport_bypass_wavelet = true; + fastexport_raw_bayer_method = "fast"; + //fastexport_bypass_raw_bayer_all_enhance = true; + fastexport_bypass_raw_bayer_dcb_iterations = true; + fastexport_bypass_raw_bayer_dcb_enhance = true; + fastexport_bypass_raw_bayer_lmmse_iterations = true; + fastexport_bypass_raw_bayer_linenoise = true; + fastexport_bypass_raw_bayer_greenthresh = true; + fastexport_raw_xtrans_method = "fast"; + fastexport_bypass_raw_ccSteps = true; + fastexport_bypass_raw_ca = true; + fastexport_bypass_raw_df = true; + fastexport_bypass_raw_ff = true; + fastexport_icm_input = "(camera)"; + fastexport_icm_working = "ProPhoto"; + fastexport_icm_output = "RT_sRGB"; + fastexport_icm_outputIntent = rtengine::RI_RELATIVE; + fastexport_icm_outputBPC = true; + fastexport_icm_gamma = "default"; + fastexport_resize_enabled = true; + fastexport_resize_scale = 1; + fastexport_resize_appliesTo = "Cropped area"; + fastexport_resize_method = "Lanczos"; + fastexport_resize_dataspec = 3; + fastexport_resize_width = 900; + fastexport_resize_height = 900; + fastexport_use_fast_pipeline = true; + + clutsDir = "./cluts"; + + cutOverlayBrush = std::vector (4); + cutOverlayBrush[3] = 0.667; // :-p + + navGuideBrush = std::vector (4); + //default to red + navGuideBrush[0] = 1.0; + navGuideBrush[1] = 0.0; + navGuideBrush[2] = 0.0; + navGuideBrush[3] = 1.0; + + sndEnable = true; + sndLngEditProcDoneSecs = 3.0; +#ifdef __linux__ + sndBatchQueueDone = "complete"; + sndLngEditProcDone = "window-attention"; +#endif + + // Reminder: 0 = SET mode, 1 = ADD mode + baBehav = { + 1, // ADDSET_TC_EXPCOMP + 1, // ADDSET_TC_BRIGHTNESS + 1, // ADDSET_TC_BLACKLEVEL + 1, // ADDSET_TC_CONTRAST + 1, // ADDSET_SH_HIGHLIGHTS + 1, // ADDSET_SH_SHADOWS + 1, // ADDSET_SH_LOCALCONTRAST + 1, // ADDSET_LC_BRIGHTNESS + 1, // ADDSET_LC_CONTRAST + 1, // ADDSET_SHARP_AMOUNT + 1, // ADDSET_WB_TEMPERATURE + 1, // ADDSET_WB_GREEN + 1, // ADDSET_ROTATE_DEGREE + 1, // ADDSET_DIST_AMOUNT + 1, // ADDSET_PERSPECTIVE + 1, // ADDSET_CA + 1, // ADDSET_VIGN_AMOUNT + 1, // ADDSET_VIGN_RADIUS + 1, // ADDSET_VIGN_STRENGTH + 1, // ADDSET_VIGN_CENTER + 1, // ADDSET_LC_CHROMATICITY + 1, // ADDSET_TC_SATURATION + 1, // ADDSET_TC_HLCOMPAMOUNT + 1, // ADDSET_TC_HLCOMPTHRESH + 1, // ADDSET_TC_SHCOMP + 1, // ADDSET_DIRPYREQ + 1, // ADDSET_DIRPYRDN_LUMA + 1, // ADDSET_DIRPYRDN_LUDET + 1, // ADDSET_DIRPYRDN_CHROMA + 1, // ADDSET_DIRPYRDN_CHROMARED + 1, // ADDSET_DIRPYRDN_CHROMABLUE + 1, // ADDSET_DIRPYRDN_GAMMA + 1, // ADDSET_CHMIXER + 1, // ADDSET_PREPROCESS_GREENEQUIL + 1, // ADDSET_PREPROCESS_LINEDENOISE + 1, // ADDSET_RAWCACORR + 1, // ADDSET_RAWEXPOS_LINEAR + 1, // ADDSET_RAWEXPOS_PRESER + 1, // ADDSET_RAWEXPOS_BLACKS + 1, // ADDSET_SHARPENEDGE_AMOUNT + 1, // ADDSET_SHARPENMICRO_AMOUNT + 1, // ADDSET_SHARPENEDGE_PASS + 1, // ADDSET_SHARPENMICRO_UNIFORMITY + 1, // ADDSET_VIBRANCE_PASTELS + 1, // ADDSET_VIBRANCE_SATURATED + 1, // ADDSET_FREE_OUPUT_GAMMA + 1, // ADDSET_FREE_OUTPUT_SLOPE + 1, // ADDSET_CAT_DEGREE + 1, // ADDSET_CAT_ADAPSCEN + 1, // ADDSET_CAT_ADAPLUM + 1, // ADDSET_CAT_LIGHT + 1, // ADDSET_CAT_RSTPRO + 1, // ADDSET_CAT_BADPIX + 1, // ADDSET_CAT_JLIGHT + 1, // ADDSET_CAT_CHROMA + 1, // ADDSET_CAT_CONTRAST + 1, // ADDSET_CAT_CHROMA_S + 1, // ADDSET_CAT_CHROMA_M + 1, // ADDSET_CAT_HUE + 1, // ADDSET_CAT_BADPIX + 1, // ADDSET_WB_EQUAL + 1, // ADDSET_GRADIENT_DEGREE + 1, // ADDSET_GRADIENT_FEATHER + 1, // ADDSET_GRADIENT_STRENGTH + 1, // ADDSET_GRADIENT_CENTER + 1, // ADDSET_PCVIGNETTE_STRENGTH + 1, // ADDSET_PCVIGNETTE_FEATHER + 1, // ADDSET_PCVIGNETTE_ROUNDNESS + 1, // ADDSET_BLACKWHITE_HUES + 1, // ADDSET_BLACKWHITE_GAMMA + 1, // ADDSET_DIRPYREQ_THRESHOLD + 1, // ADDSET_DIRPYREQ_SKINPROTECT + 1, // ADDSET_COLORTONING_SPLIT + 1, // ADDSET_COLORTONING_SATTHRESHOLD + 1, // ADDSET_COLORTONING_SATOPACITY + 1, // ADDSET_COLORTONING_BALANCE + 1, // ADDSET_COLORTONING_STRENGTH + 1, // ADDSET_DIRPYRDN_PASSES + 1, // ADDSET_RAWFFCLIPCONTROL + 1, // ADDSET_FILMSIMULATION_STRENGTH + 1, // ADDSET_WA + 1, // ADDSET_WA_SKINPROTECT + 1, // ADDSET_WA_THRESHOLD2 + 1, // ADDSET_WA_THRR + 1, // ADDSET_WA_THRRH + 1, // ADDSET_WA_THRESHOLD + 1, // ADDSET_WA_THRESHOLD2 + 1, // ADDSET_WA_CHRO + 1, // ADDSET_WA_CHROMA + 1, // ADDSET_WA_CONTRAST + 1, // ADDSET_WA_RESCON + 1, // ADDSET_WA_RESCONH + 1, // ADDSET_WA_RESCHRO + 1, // ADDSET_WA_SKYPROTECT + 1, // ADDSET_WA_EDGRAD + 1, // ADDSET_WA_EDGVAL + 1, // ADDSET_WA_STRENGTH + 1, // ADDSET_WA_EDGEDETECT + 1, // ADDSET_WA_EDGEDETECTTHR + 1, // ADDSET_WA_EDGEDETECTTHR2 + 1, // ADDSET_WA_TMRS + 1, // ADDSET_WA_GAMMA + 1, // ADDSET_RETI_STR + 1, // ADDSET_RETI_NEIGH + 1, // ADDSET_RETI_LIMD + 1, // ADDSET_RETI_GAIN + 1, // ADDSET_RETI_OFFS + 1, // ADDSET_RETI_VART + 1, // ADDSET_RETI_GAM + 1, // ADDSET_RETI_SLO + 1, // ADDSET_WB_TEMPBIAS + }; + + rtSettings.darkFramesPath = ""; + rtSettings.flatFieldsPath = ""; +#ifdef WIN32 + const gchar* sysRoot = g_getenv ("SystemRoot"); // Returns e.g. "c:\Windows" + + if (sysRoot != NULL) { + rtSettings.iccDirectory = Glib::ustring (sysRoot) + Glib::ustring ("\\System32\\spool\\drivers\\color"); + } else { + rtSettings.iccDirectory = "C:\\WINDOWS\\System32\\spool\\drivers\\color"; + } + +#elif defined __APPLE__ + rtSettings.iccDirectory = "/library/ColorSync/Profiles/Displays"; +#else + rtSettings.iccDirectory = "/usr/share/color/icc"; +#endif +// rtSettings.viewingdevice = 0; +// rtSettings.viewingdevicegrey = 3; + // rtSettings.viewinggreySc = 1; + rtSettings.leveldnv = 2; + rtSettings.leveldnti = 0; + rtSettings.leveldnaut = 0; + rtSettings.leveldnliss = 0; + rtSettings.leveldnautsimpl = 0; + + rtSettings.printerProfile = Glib::ustring(); + rtSettings.printerIntent = rtengine::RI_RELATIVE; + rtSettings.printerBPC = true; + rtSettings.monitorProfile = Glib::ustring(); + rtSettings.monitorIntent = rtengine::RI_RELATIVE; + rtSettings.monitorBPC = true; + rtSettings.autoMonitorProfile = false; + rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows) + rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile" + rtSettings.prophoto10 = "RT_Large_g10"; // these names appear in the menu "output profile" + rtSettings.srgb10 = "RT_sRGB_g10"; + rtSettings.widegamut = "WideGamutRGB"; + rtSettings.srgb = "RT_sRGB"; + rtSettings.bruce = "Bruce"; + rtSettings.beta = "BetaRGB"; + rtSettings.best = "BestRGB"; + rtSettings.rec2020 = "Rec2020"; + rtSettings.verbose = false; + rtSettings.gamutICC = true; + rtSettings.gamutLch = true; + rtSettings.amchroma = 40;//between 20 and 140 low values increase effect..and also artefacts, high values reduces + rtSettings.artifact_cbdl = 4.; + rtSettings.level0_cbdl = 0; + rtSettings.level123_cbdl = 30; + rtSettings.bot_left = 0; + rtSettings.top_left = 10; + rtSettings.top_right = 40; + rtSettings.bot_right = 75; + rtSettings.ed_detec = 3; //between 2 and 10 + rtSettings.ed_detecStr = 1.3; //not use + rtSettings.ed_low = 15.; //between 5 to 40 + rtSettings.ed_lipinfl = 0.8; //between 0.5 to 0.9 + rtSettings.ed_lipampl = 1.1; //between 1 and 2 + + + rtSettings.ciecamfloat = true; + rtSettings.protectred = 60; + rtSettings.protectredh = 0.3; + rtSettings.CRI_color = 0; + rtSettings.autocielab = true; + rtSettings.denoiselabgamma = 2; + rtSettings.HistogramWorking = false; + + rtSettings.daubech = false; + + rtSettings.nrauto = 10;//between 2 and 20 + rtSettings.nrautomax = 40;//between 5 and 100 + rtSettings.nrhigh = 0.45;//between 0.1 and 0.9 + rtSettings.nrwavlevel = 1;//integer between 0 and 2 + +// rtSettings.colortoningab =0.7; +//rtSettings.decaction =0.3; +// rtSettings.ciebadpixgauss=false; + rtSettings.rgbcurveslumamode_gamut = true; + lastIccDir = rtSettings.iccDirectory; + lastDarkframeDir = rtSettings.darkFramesPath; + lastFlatfieldDir = rtSettings.flatFieldsPath; +// rtSettings.bw_complementary = true; + // There is no reasonable default for curves. We can still suppose that they will take place + // in a subdirectory of the user's own ProcParams presets, i.e. in a subdirectory + // of the one pointed to by the "profile" field. + // The following fields will then be initialized when "profile" will have its final value, + // at the end of the "updatePaths" method. + lastRgbCurvesDir = ""; + lastLabCurvesDir = ""; + lastRetinexDir = ""; + lastDenoiseCurvesDir = ""; + lastWaveletCurvesDir = ""; + lastPFCurvesDir = ""; + lastHsvCurvesDir = ""; + lastToneCurvesDir = ""; + lastVibranceCurvesDir = ""; + lastProfilingReferenceDir = ""; + lastBWCurvesDir = ""; + lastLensProfileDir = ""; + gimpPluginShowInfoDialog = true; + maxRecentFolders = 15; + + rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; + std::cout << "." << rtSettings.lensfunDbDirectory << "." << std::endl; +} + +Options* Options::copyFrom (Options* other) +{ + *this = *other; + return this; +} + +void Options::filterOutParsedExtensions () +{ + parsedExtensions.clear(); + + for (unsigned int i = 0; i < parseExtensions.size(); i++) + if (parseExtensionsEnabled[i]) { + parsedExtensions.push_back (parseExtensions[i].lowercase()); + } +} + +void Options::readFromFile (Glib::ustring fname) +{ + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." + + Glib::KeyFile keyFile; + + if ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { + Glib::ustring msg = Glib::ustring::compose ("Options file %1 does not exist", fname); + throw Error (msg); + } + + try { + if (keyFile.load_from_file (fname)) { + +// -------------------------------------------------------------------------------------------------------- + + if (keyFile.has_group ("General")) { + if (keyFile.has_key ("General", "TabbedEditor")) { + tabbedUI = keyFile.get_boolean ("General", "TabbedEditor"); + } + + if (keyFile.has_key ("General", "StartupDirectory")) { + if ( keyFile.get_string ("General", "StartupDirectory") == "home") { + startupDir = STARTUPDIR_HOME; + } else if ( keyFile.get_string ("General", "StartupDirectory") == "current") { + startupDir = STARTUPDIR_CURRENT; + } else if ( keyFile.get_string ("General", "StartupDirectory") == "last") { + startupDir = STARTUPDIR_LAST; + } else if ( keyFile.get_string ("General", "StartupDirectory") == "custom") { + startupDir = STARTUPDIR_CUSTOM; + } + } + + if (keyFile.has_key ("General", "StartupPath")) { + startupPath = keyFile.get_string ("General", "StartupPath"); + } + + if (keyFile.has_key ("General", "DateFormat")) { + dateFormat = keyFile.get_string ("General", "DateFormat"); + } + + if (keyFile.has_key ("General", "AdjusterMinDelay")) { + adjusterMinDelay = keyFile.get_integer ("General", "AdjusterMinDelay"); + } + + if (keyFile.has_key ("General", "AdjusterMaxDelay")) { + adjusterMaxDelay = keyFile.get_integer ("General", "AdjusterMaxDelay"); + } + + if (keyFile.has_key ("General", "StoreLastProfile")) { + savesParamsAtExit = keyFile.get_boolean ("General", "StoreLastProfile"); + } + + if (keyFile.has_key ("General", "MultiUser")) { + multiUser = keyFile.get_boolean ("General", "MultiUser"); + } + + if (keyFile.has_key ("General", "Version")) { + version = keyFile.get_string ("General", "Version"); + } + + if (keyFile.has_key ("General", "Language")) { + language = keyFile.get_string ("General", "Language"); + } + + if (keyFile.has_key ("General", "LanguageAutoDetect")) { + languageAutoDetect = keyFile.get_boolean ("General", "LanguageAutoDetect"); + } + + if (keyFile.has_key ("General", "Theme")) { + theme = keyFile.get_string ("General", "Theme"); + } + + if ( keyFile.has_key ("General", "DarkFramesPath")) { + rtSettings.darkFramesPath = keyFile.get_string ("General", "DarkFramesPath"); + } + + if ( keyFile.has_key ("General", "FlatFieldsPath")) { + rtSettings.flatFieldsPath = keyFile.get_string ("General", "FlatFieldsPath"); + } + + if ( keyFile.has_key ("General", "Verbose")) { + rtSettings.verbose = keyFile.get_boolean ( "General", "Verbose"); + } + + if (keyFile.has_key ("General", "BotLeft")) { + rtSettings.bot_left = keyFile.get_double ("General", "BotLeft"); + } + + if (keyFile.has_key ("General", "TopLeft")) { + rtSettings.top_left = keyFile.get_double ("General", "TopLeft"); + } + + if (keyFile.has_key ("General", "TopRight")) { + rtSettings.top_right = keyFile.get_double ("General", "TopRight"); + } + + if (keyFile.has_key ("General", "BotRight")) { + rtSettings.bot_right = keyFile.get_double ("General", "BotRight"); + } + + if (keyFile.has_key ("General", "EDdetec")) { + rtSettings.ed_detec = keyFile.get_double ("General", "EDdetec"); + } + + if (keyFile.has_key ("General", "EDdetecStr")) { + rtSettings.ed_detecStr = keyFile.get_double ("General", "EDdetecStr"); + } + + if (keyFile.has_key ("General", "EDLow")) { + rtSettings.ed_low = keyFile.get_double ("General", "EDLow"); + } + + if (keyFile.has_key ("General", "EDLipinfl")) { + rtSettings.ed_lipinfl = keyFile.get_double ("General", "EDLipinfl"); + } + + if (keyFile.has_key ("General", "EDLipampl")) { + rtSettings.ed_lipampl = keyFile.get_double ("General", "EDLipampl"); + } + + + } + + if (keyFile.has_group ("External Editor")) { + if (keyFile.has_key ("External Editor", "EditorKind")) { + editorToSendTo = keyFile.get_integer ("External Editor", "EditorKind"); + } + + if (keyFile.has_key ("External Editor", "GimpDir")) { + gimpDir = keyFile.get_string ("External Editor", "GimpDir"); + } + + if (keyFile.has_key ("External Editor", "PhotoshopDir")) { + psDir = keyFile.get_string ("External Editor", "PhotoshopDir"); + } + + if (keyFile.has_key ("External Editor", "CustomEditor")) { + customEditorProg = keyFile.get_string ("External Editor", "CustomEditor"); + } + } + + if (keyFile.has_group ("Output")) { + if (keyFile.has_key ("Output", "Format")) { + saveFormat.format = keyFile.get_string ("Output", "Format"); + } + + if (keyFile.has_key ("Output", "JpegQuality")) { + saveFormat.jpegQuality = keyFile.get_integer ("Output", "JpegQuality"); + } + + if (keyFile.has_key ("Output", "JpegSubSamp")) { + saveFormat.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSamp"); + } + + if (keyFile.has_key ("Output", "PngCompression")) { + saveFormat.pngCompression = keyFile.get_integer ("Output", "PngCompression"); + } + + if (keyFile.has_key ("Output", "PngBps")) { + saveFormat.pngBits = keyFile.get_integer ("Output", "PngBps"); + } + + if (keyFile.has_key ("Output", "TiffBps")) { + saveFormat.tiffBits = keyFile.get_integer ("Output", "TiffBps"); + } + + if (keyFile.has_key ("Output", "TiffUncompressed")) { + saveFormat.tiffUncompressed = keyFile.get_boolean ("Output", "TiffUncompressed"); + } + + if (keyFile.has_key ("Output", "SaveProcParams")) { + saveFormat.saveParams = keyFile.get_boolean ("Output", "SaveProcParams"); + } + + + if (keyFile.has_key ("Output", "FormatBatch")) { + saveFormatBatch.format = keyFile.get_string ("Output", "FormatBatch"); + } + + if (keyFile.has_key ("Output", "JpegQualityBatch")) { + saveFormatBatch.jpegQuality = keyFile.get_integer ("Output", "JpegQualityBatch"); + } + + if (keyFile.has_key ("Output", "JpegSubSampBatch")) { + saveFormatBatch.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSampBatch"); + } + + if (keyFile.has_key ("Output", "PngCompressionBatch")) { + saveFormatBatch.pngCompression = keyFile.get_integer ("Output", "PngCompressionBatch"); + } + + if (keyFile.has_key ("Output", "PngBpsBatch")) { + saveFormatBatch.pngBits = keyFile.get_integer ("Output", "PngBpsBatch"); + } + + if (keyFile.has_key ("Output", "TiffBpsBatch")) { + saveFormatBatch.tiffBits = keyFile.get_integer ("Output", "TiffBpsBatch"); + } + + if (keyFile.has_key ("Output", "TiffUncompressedBatch")) { + saveFormatBatch.tiffUncompressed = keyFile.get_boolean ("Output", "TiffUncompressedBatch"); + } + + if (keyFile.has_key ("Output", "SaveProcParamsBatch")) { + saveFormatBatch.saveParams = keyFile.get_boolean ("Output", "SaveProcParamsBatch"); + } + + if (keyFile.has_key ("Output", "Path")) { + savePathTemplate = keyFile.get_string ("Output", "Path"); + } + + if (keyFile.has_key ("Output", "PathTemplate")) { + savePathTemplate = keyFile.get_string ("Output", "PathTemplate"); + } + + if (keyFile.has_key ("Output", "PathFolder")) { + savePathFolder = keyFile.get_string ("Output", "PathFolder"); + } + + if (keyFile.has_key ("Output", "AutoSuffix")) { + autoSuffix = keyFile.get_boolean ("Output", "AutoSuffix"); + } + + if (keyFile.has_key ("Output", "ForceFormatOpts")) { + forceFormatOpts = keyFile.get_boolean ("Output", "ForceFormatOpts"); + } + + if (keyFile.has_key ("Output", "SaveMethodNum")) { + saveMethodNum = keyFile.get_integer ("Output", "SaveMethodNum"); + } + + if (keyFile.has_key ("Output", "UsePathTemplate")) { + saveUsePathTemplate = keyFile.get_boolean ("Output", "UsePathTemplate"); + } + + if (keyFile.has_key ("Output", "LastSaveAsPath")) { + lastSaveAsPath = keyFile.get_string ("Output", "LastSaveAsPath"); + } + + if (keyFile.has_key ("Output", "OverwriteOutputFile")) { + overwriteOutputFile = keyFile.get_boolean ("Output", "OverwriteOutputFile"); + } + + if (keyFile.has_key ("Output", "TunnelMetaData")) { + tunnelMetaData = keyFile.get_boolean ("Output", "TunnelMetaData"); + } + } + + if (keyFile.has_group ("Profiles")) { + if (keyFile.has_key ("Profiles", "Directory")) { + profilePath = keyFile.get_string ("Profiles", "Directory"); + } + + if (keyFile.has_key ("Profiles", "UseBundledProfiles")) { + useBundledProfiles = keyFile.get_boolean ("Profiles", "UseBundledProfiles"); + } + + if (keyFile.has_key ("Profiles", "LoadSaveProfilePath")) { + loadSaveProfilePath = keyFile.get_string ("Profiles", "LoadSaveProfilePath"); + } + + if (keyFile.has_key ("Profiles", "RawDefault")) { + defProfRaw = keyFile.get_string ("Profiles", "RawDefault"); + } + + if (keyFile.has_key ("Profiles", "ImgDefault")) { + defProfImg = keyFile.get_string ("Profiles", "ImgDefault"); + } + + if (keyFile.has_key ("Profiles", "FilledProfile")) { + filledProfile = keyFile.get_boolean ("Profiles", "FilledProfile"); + } + + if (keyFile.has_key ("Profiles", "SaveParamsWithFile")) { + saveParamsFile = keyFile.get_boolean ("Profiles", "SaveParamsWithFile"); + } + + if (keyFile.has_key ("Profiles", "SaveParamsToCache")) { + saveParamsCache = keyFile.get_boolean ("Profiles", "SaveParamsToCache"); + } + + if (keyFile.has_key ("Profiles", "LoadParamsFromLocation")) { + paramsLoadLocation = (PPLoadLocation)keyFile.get_integer ("Profiles", "LoadParamsFromLocation"); + } + + if (keyFile.has_key ("Profiles", "CustomProfileBuilder")) { + CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilder"); // for backward compatibility only + } + + if (keyFile.has_key ("Profiles", "CustomProfileBuilderPath")) { + CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilderPath"); + } + + if (keyFile.has_key ("Profiles", "CustomProfileBuilderKeys")) { + CPBKeys = (CPBKeyType)keyFile.get_integer ("Profiles", "CustomProfileBuilderKeys"); + } + } + + if (keyFile.has_group ("File Browser")) { + if (keyFile.has_key ("File Browser", "ThumbnailSize")) { + thumbSize = keyFile.get_integer ("File Browser", "ThumbnailSize"); + } + + if (keyFile.has_key ("File Browser", "ThumbnailSizeTab")) { + thumbSizeTab = keyFile.get_integer ("File Browser", "ThumbnailSizeTab"); + } + + if (keyFile.has_key ("File Browser", "ThumbnailSizeQueue")) { + thumbSizeQueue = keyFile.get_integer ("File Browser", "ThumbnailSizeQueue"); + } + + if (keyFile.has_key ("File Browser", "SameThumbSize")) { + sameThumbSize = keyFile.get_integer ("File Browser", "SameThumbSize"); + } + + if (keyFile.has_key ("File Browser", "BrowseOnlyRaw")) { + fbOnlyRaw = keyFile.get_boolean ("File Browser", "BrowseOnlyRaw"); + } + + if (keyFile.has_key ("File Browser", "BrowserShowsDate")) { + fbShowDateTime = keyFile.get_boolean ("File Browser", "BrowserShowsDate"); + } + + if (keyFile.has_key ("File Browser", "BrowserShowsExif")) { + fbShowBasicExif = keyFile.get_boolean ("File Browser", "BrowserShowsExif"); + } + + if (keyFile.has_key ("File Browser", "BrowserShowsExpComp")) { + fbShowExpComp = keyFile.get_boolean ("File Browser", "BrowserShowsExpComp"); + } + + if (keyFile.has_key ("File Browser", "BrowserShowsHidden")) { + fbShowHidden = keyFile.get_boolean ("File Browser", "BrowserShowsHidden"); + } + + if (keyFile.has_key ("File Browser", "MaxPreviewHeight")) { + maxThumbnailHeight = keyFile.get_integer ("File Browser", "MaxPreviewHeight"); + } + + if (keyFile.has_key ("File Browser", "MaxCacheEntries")) { + maxCacheEntries = keyFile.get_integer ("File Browser", "MaxCacheEntries"); + } + + if (keyFile.has_key ("File Browser", "ParseExtensions")) { + parseExtensions = keyFile.get_string_list ("File Browser", "ParseExtensions"); + } + + if (keyFile.has_key ("File Browser", "ParseExtensionsEnabled")) { + parseExtensionsEnabled = keyFile.get_integer_list ("File Browser", "ParseExtensionsEnabled"); + } + + if (keyFile.has_key ("File Browser", "ThumbnailArrangement")) { + fbArrangement = keyFile.get_integer ("File Browser", "ThumbnailArrangement"); + } + + if (keyFile.has_key ("File Browser", "ThumbnailInterpolation")) { + thumbInterp = keyFile.get_integer ("File Browser", "ThumbnailInterpolation"); + } + + if (keyFile.has_key ("File Browser", "FavoriteDirs")) { + favoriteDirs = keyFile.get_string_list ("File Browser", "FavoriteDirs"); + } + + if (keyFile.has_key ("File Browser", "RenameTemplates")) { + renameTemplates = keyFile.get_string_list ("File Browser", "RenameTemplates"); + } + + if (keyFile.has_key ("File Browser", "RenameUseTemplates")) { + renameUseTemplates = keyFile.get_boolean ("File Browser", "RenameUseTemplates"); + } + + if (keyFile.has_key ("File Browser", "ThumbnailZoomRatios")) { + thumbnailZoomRatios = keyFile.get_double_list ("File Browser", "ThumbnailZoomRatios"); + } + + if (keyFile.has_key ("File Browser", "OverlayedFileNames")) { + overlayedFileNames = keyFile.get_boolean ("File Browser", "OverlayedFileNames"); + } + + if (keyFile.has_key ("File Browser", "FilmStripOverlayedFileNames")) { + filmStripOverlayedFileNames = keyFile.get_boolean ("File Browser", "FilmStripOverlayedFileNames"); + } + + if (keyFile.has_key ("File Browser", "ShowFileNames")) { + showFileNames = keyFile.get_boolean ("File Browser", "ShowFileNames"); + } + + if (keyFile.has_key ("File Browser", "FilmStripShowFileNames")) { + filmStripShowFileNames = keyFile.get_boolean ("File Browser", "FilmStripShowFileNames"); + } + + if (keyFile.has_key ("File Browser", "InternalThumbIfUntouched")) { + internalThumbIfUntouched = keyFile.get_boolean ("File Browser", "InternalThumbIfUntouched"); + } + + if (keyFile.has_key ("File Browser", "menuGroupRank")) { + menuGroupRank = keyFile.get_boolean ("File Browser", "menuGroupRank"); + } + + if (keyFile.has_key ("File Browser", "menuGroupLabel")) { + menuGroupLabel = keyFile.get_boolean ("File Browser", "menuGroupLabel"); + } + + if (keyFile.has_key ("File Browser", "menuGroupFileOperations")) { + menuGroupFileOperations = keyFile.get_boolean ("File Browser", "menuGroupFileOperations"); + } + + if (keyFile.has_key ("File Browser", "menuGroupProfileOperations")) { + menuGroupProfileOperations = keyFile.get_boolean ("File Browser", "menuGroupProfileOperations"); + } + + if (keyFile.has_key ("File Browser", "menuGroupExtProg")) { + menuGroupExtProg = keyFile.get_boolean ("File Browser", "menuGroupExtProg"); + } + + if (keyFile.has_key ("File Browser", "MaxRecentFolders")) { + maxRecentFolders = keyFile.get_integer ("File Browser", "MaxRecentFolders"); + } + + recentFolders.reserve (maxRecentFolders + 10); // reserve some more than maxRecentFolders, because at runtime it stores more than that + + if (keyFile.has_key ("File Browser", "RecentFolders")) { + recentFolders = keyFile.get_string_list ("File Browser", "RecentFolders"); + } + } + + if (keyFile.has_group ("Clipping Indication")) { + if (keyFile.has_key ("Clipping Indication", "HighlightThreshold")) { + highlightThreshold = keyFile.get_integer ("Clipping Indication", "HighlightThreshold"); + } + + if (keyFile.has_key ("Clipping Indication", "ShadowThreshold")) { + shadowThreshold = keyFile.get_integer ("Clipping Indication", "ShadowThreshold"); + } + + if (keyFile.has_key ("Clipping Indication", "BlinkClipped")) { + blinkClipped = keyFile.get_boolean ("Clipping Indication", "BlinkClipped"); + } + } + + if (keyFile.has_group ("Performance")) { + if (keyFile.has_key ("Performance", "RgbDenoiseThreadLimit")) { + rgbDenoiseThreadLimit = keyFile.get_integer ("Performance", "RgbDenoiseThreadLimit"); + } + + if ( keyFile.has_key ("Performance", "NRauto")) { + rtSettings.nrauto = keyFile.get_double ("Performance", "NRauto"); + } + + if ( keyFile.has_key ("Performance", "NRautomax")) { + rtSettings.nrautomax = keyFile.get_double ("Performance", "NRautomax"); + } + + if ( keyFile.has_key ("Performance", "NRhigh")) { + rtSettings.nrhigh = keyFile.get_double ("Performance", "NRhigh"); + } + + if (rtSettings.nrhigh == 0.0) { //avoid crash by division by zero in noise reduction + rtSettings.nrhigh = 0.45; + } + + if ( keyFile.has_key ("Performance", "NRWavlevel")) { + rtSettings.nrwavlevel = keyFile.get_integer ("Performance", "NRWavlevel"); + } + + if (keyFile.has_key ("Performance", "LevNR")) { + rtSettings.leveldnv = keyFile.get_integer ("Performance", "LevNR"); + } + + if (keyFile.has_key ("Performance", "LevNRTI")) { + rtSettings.leveldnti = keyFile.get_integer ("Performance", "LevNRTI"); + } + + if (keyFile.has_key ("Performance", "LevNRAUT")) { + rtSettings.leveldnaut = keyFile.get_integer ("Performance", "LevNRAUT"); + } + + if (keyFile.has_key ("Performance", "LevNRLISS")) { + rtSettings.leveldnliss = keyFile.get_integer ("Performance", "LevNRLISS"); + } + + if (keyFile.has_key ("Performance", "SIMPLNRAUT")) { + rtSettings.leveldnautsimpl = keyFile.get_integer ("Performance", "SIMPLNRAUT"); + } + + if (keyFile.has_key ("Performance", "ClutCacheSize")) { + clutCacheSize = keyFile.get_integer ("Performance", "ClutCacheSize"); + } + + if (keyFile.has_key ("Performance", "MaxInspectorBuffers")) { + maxInspectorBuffers = keyFile.get_integer ("Performance", "MaxInspectorBuffers"); + } + + if (keyFile.has_key ("Performance", "PreviewDemosaicFromSidecar")) { + prevdemo = (prevdemo_t)keyFile.get_integer ("Performance", "PreviewDemosaicFromSidecar"); + } + + if (keyFile.has_key ("Performance", "Daubechies")) { + rtSettings.daubech = keyFile.get_boolean ("Performance", "Daubechies"); + } + + if (keyFile.has_key ("Performance", "SerializeTiffRead")) { + serializeTiffRead = keyFile.get_boolean ("Performance", "SerializeTiffRead"); + } + } + + if (keyFile.has_group ("GUI")) { + if (keyFile.has_key ("GUI", "WindowWidth")) { + windowWidth = keyFile.get_integer ("GUI", "WindowWidth"); + } + + if (keyFile.has_key ("GUI", "WindowHeight")) { + windowHeight = keyFile.get_integer ("GUI", "WindowHeight"); + } + + if (keyFile.has_key ("GUI", "WindowX")) { + windowX = keyFile.get_integer ("GUI", "WindowX"); + } + + if (keyFile.has_key ("GUI", "WindowY")) { + windowY = keyFile.get_integer ("GUI", "WindowY"); + } + + if (keyFile.has_key ("GUI", "WindowMonitor")) { + windowMonitor = keyFile.get_integer ("GUI", "WindowMonitor"); + } + + if (keyFile.has_key ("GUI", "MeowMonitor")) { + meowMonitor = keyFile.get_integer ("GUI", "MeowMonitor"); + } + + if (keyFile.has_key ("GUI", "MeowFullScreen")) { + meowFullScreen = keyFile.get_boolean ("GUI", "MeowFullScreen"); + } + + if (keyFile.has_key ("GUI", "MeowMaximized")) { + meowMaximized = keyFile.get_boolean ("GUI", "MeowMaximized"); + } + + if (keyFile.has_key ("GUI", "MeowWidth")) { + meowWidth = keyFile.get_integer ("GUI", "MeowWidth"); + } + + if (keyFile.has_key ("GUI", "MeowHeight")) { + meowHeight = keyFile.get_integer ("GUI", "MeowHeight"); + } + + if (keyFile.has_key ("GUI", "MeowX")) { + meowX = keyFile.get_integer ("GUI", "MeowX"); + } + + if (keyFile.has_key ("GUI", "MeowY")) { + meowY = keyFile.get_integer ("GUI", "MeowY"); + } + + if (keyFile.has_key ("GUI", "WindowMaximized")) { + windowMaximized = keyFile.get_boolean ("GUI", "WindowMaximized"); + } + + if (keyFile.has_key ("GUI", "DetailWindowWidth")) { + detailWindowWidth = keyFile.get_integer ("GUI", "DetailWindowWidth"); + } + + if (keyFile.has_key ("GUI", "DetailWindowHeight")) { + detailWindowHeight = keyFile.get_integer ("GUI", "DetailWindowHeight"); + } + + if (keyFile.has_key ("GUI", "DirBrowserWidth")) { + dirBrowserWidth = keyFile.get_integer ("GUI", "DirBrowserWidth"); + } + + if (keyFile.has_key ("GUI", "DirBrowserHeight")) { + dirBrowserHeight = keyFile.get_integer ("GUI", "DirBrowserHeight"); + } + + if (keyFile.has_key ("GUI", "SortType")) { + dirBrowserSortType = static_cast (keyFile.get_integer ("GUI", "SortType")); + } + + if (keyFile.has_key ("GUI", "PreferencesWidth")) { + preferencesWidth = keyFile.get_integer ("GUI", "PreferencesWidth"); + } + + if (keyFile.has_key ("GUI", "PreferencesHeight")) { + preferencesHeight = keyFile.get_integer ("GUI", "PreferencesHeight"); + } + + if (keyFile.has_key ("GUI", "SaveAsDialogWidth")) { + saveAsDialogWidth = keyFile.get_integer ("GUI", "SaveAsDialogWidth"); + } + + if (keyFile.has_key ("GUI", "SaveAsDialogHeight")) { + saveAsDialogHeight = keyFile.get_integer ("GUI", "SaveAsDialogHeight"); + } + + if (keyFile.has_key ("GUI", "ToolPanelWidth")) { + toolPanelWidth = keyFile.get_integer ("GUI", "ToolPanelWidth"); + } + + if (keyFile.has_key ("GUI", "BrowserToolPanelWidth")) { + browserToolPanelWidth = keyFile.get_integer ("GUI", "BrowserToolPanelWidth"); + } + + if (keyFile.has_key ("GUI", "BrowserToolPanelHeight")) { + browserToolPanelHeight = keyFile.get_integer ("GUI", "BrowserToolPanelHeight"); + } + + if (keyFile.has_key ("GUI", "BrowserToolPanelOpened")) { + browserToolPanelOpened = keyFile.get_boolean ("GUI", "BrowserToolPanelOpened"); + } + + if (keyFile.has_key ("GUI", "BrowserDirPanelOpened")) { + browserDirPanelOpened = keyFile.get_boolean ("GUI", "BrowserDirPanelOpened"); + } + + if (keyFile.has_key ("GUI", "EditorFilmStripOpened")) { + editorFilmStripOpened = keyFile.get_boolean ("GUI", "EditorFilmStripOpened"); + } + + if (keyFile.has_key ("GUI", "HistoryPanelWidth")) { + historyPanelWidth = keyFile.get_integer ("GUI", "HistoryPanelWidth"); + } + + if (keyFile.has_key ("GUI", "FontFamily")) { + fontFamily = keyFile.get_string ("GUI", "FontFamily"); + } + + if (keyFile.has_key ("GUI", "FontSize")) { + fontSize = keyFile.get_integer ("GUI", "FontSize"); + } + + if (keyFile.has_key ("GUI", "CPFontFamily")) { + CPFontFamily = keyFile.get_string ("GUI", "CPFontFamily"); + } + + if (keyFile.has_key ("GUI", "CPFontSize")) { + CPFontSize = keyFile.get_integer ("GUI", "CPFontSize"); + } + + if (keyFile.has_key ("GUI", "LastPreviewScale")) { + lastScale = keyFile.get_integer ("GUI", "LastPreviewScale"); + } + + if (keyFile.has_key ("GUI", "PanAccelFactor")) { + panAccelFactor = keyFile.get_integer ("GUI", "PanAccelFactor"); + } + + if (keyFile.has_key ("GUI", "RememberZoomAndPan")) { + rememberZoomAndPan = keyFile.get_boolean ("GUI", "RememberZoomAndPan"); + } + + if (keyFile.has_key ("GUI", "LastCropSize")) { + lastCropSize = keyFile.get_integer ("GUI", "LastCropSize"); + } + + if (keyFile.has_key ("GUI", "ShowHistory")) { + showHistory = keyFile.get_boolean ("GUI", "ShowHistory"); + } + + if (keyFile.has_key ("GUI", "ShowFilePanelState")) { + showFilePanelState = keyFile.get_integer ("GUI", "ShowFilePanelState"); + } + + if (keyFile.has_key ("GUI", "ShowInfo")) { + showInfo = keyFile.get_boolean ("GUI", "ShowInfo"); + } + + if (keyFile.has_key ("GUI", "MainNBVertical")) { + mainNBVertical = keyFile.get_boolean ("GUI", "MainNBVertical"); + } + + if (keyFile.has_key ("GUI", "ShowClippedHighlights")) { + showClippedHighlights = keyFile.get_boolean ("GUI", "ShowClippedHighlights"); + } + + if (keyFile.has_key ("GUI", "ShowClippedShadows")) { + showClippedShadows = keyFile.get_boolean ("GUI", "ShowClippedShadows"); + } + + if (keyFile.has_key ("GUI", "FrameColor")) { + bgcolor = keyFile.get_integer ("GUI", "FrameColor"); + } + + if (keyFile.has_key ("GUI", "ProcessingQueueEnbled")) { + procQueueEnabled = keyFile.get_boolean ("GUI", "ProcessingQueueEnbled"); + } + + if (keyFile.has_key ("GUI", "ToolPanelsExpanded")) { + tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded"); + } + + if (keyFile.has_key ("GUI", "ToolPanelsExpandedAutoSave")) { + autoSaveTpOpen = keyFile.get_boolean ("GUI", "ToolPanelsExpandedAutoSave"); + } + + if (keyFile.has_key ("GUI", "MultiDisplayMode")) { + multiDisplayMode = keyFile.get_integer ("GUI", "MultiDisplayMode"); + } + + //if (keyFile.has_key ("GUI", "CurvePanelsExpanded")) crvOpen = keyFile.get_integer_list ("GUI", "CurvePanelsExpanded"); + if (keyFile.has_key ("GUI", "CutOverlayBrush")) { + cutOverlayBrush = keyFile.get_double_list ("GUI", "CutOverlayBrush"); + } + + if (keyFile.has_key ("GUI", "NavGuideBrush")) { + navGuideBrush = keyFile.get_double_list ("GUI", "NavGuideBrush"); + } + + if (keyFile.has_key ("GUI", "HistogramPosition")) { + histogramPosition = keyFile.get_integer ("GUI", "HistogramPosition"); + } + + if (keyFile.has_key ("GUI", "HistogramBar")) { + histogramBar = keyFile.get_boolean ("GUI", "HistogramBar"); + } + + if (keyFile.has_key ("GUI", "HistogramFullMode")) { + histogramFullMode = keyFile.get_boolean ("GUI", "HistogramFullMode"); + } + + if (keyFile.has_key ("GUI", "NavigatorRGBUnit")) { + navRGBUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorRGBUnit"); + } + + if (keyFile.has_key ("GUI", "NavigatorHSVUnit")) { + navHSVUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorHSVUnit"); + } + + if (keyFile.has_key ("GUI", "ShowFilmStripToolBar")) { + showFilmStripToolBar = keyFile.get_boolean ("GUI", "ShowFilmStripToolBar"); + } + + if (keyFile.has_key ("GUI", "FileBrowserToolbarSingleRow")) { + FileBrowserToolbarSingleRow = keyFile.get_boolean ("GUI", "FileBrowserToolbarSingleRow"); + } + + if (keyFile.has_key ("GUI", "HideTPVScrollbar")) { + hideTPVScrollbar = keyFile.get_boolean ("GUI", "HideTPVScrollbar"); + } + + if (keyFile.has_key ("GUI", "UseIconNoText")) { + UseIconNoText = keyFile.get_boolean ("GUI", "UseIconNoText"); + } + + if (keyFile.has_key ("GUI", "HistogramWorking")) { + rtSettings.HistogramWorking = keyFile.get_boolean ("GUI", "HistogramWorking"); + } + + if (keyFile.has_key ("GUI", "CurveBBoxPosition")) { + curvebboxpos = keyFile.get_integer ("GUI", "CurveBBoxPosition"); + } + } + + if (keyFile.has_group ("Crop Settings")) { + if (keyFile.has_key ("Crop Settings", "PPI")) { + cropPPI = keyFile.get_integer ("Crop Settings", "PPI"); + } + } + + if (keyFile.has_group ("Color Management")) { + if (keyFile.has_key ("Color Management", "ICCDirectory")) { + rtSettings.iccDirectory = keyFile.get_string ("Color Management", "ICCDirectory"); + } + + if (keyFile.has_key ("Color Management", "PrinterIntent")) { + rtSettings.printerIntent = static_cast (keyFile.get_integer ("Color Management", "PrinterIntent")); + } + + if (keyFile.has_key ("Color Management", "PrinterBPC")) { + rtSettings.printerBPC = keyFile.get_boolean ("Color Management", "PrinterBPC"); + } + + if (keyFile.has_key ("Color Management", "PrinterProfile")) { + rtSettings.printerProfile = keyFile.get_string ("Color Management", "PrinterProfile"); + } + + if (keyFile.has_key ("Color Management", "MonitorProfile")) { + rtSettings.monitorProfile = keyFile.get_string ("Color Management", "MonitorProfile"); + } + + if (keyFile.has_key ("Color Management", "AutoMonitorProfile")) { + rtSettings.autoMonitorProfile = keyFile.get_boolean ("Color Management", "AutoMonitorProfile"); + } + + if (keyFile.has_key ("Color Management", "Autocielab")) { + rtSettings.autocielab = keyFile.get_boolean ("Color Management", "Autocielab"); + } + + if (keyFile.has_key ("Color Management", "RGBcurvesLumamode_Gamut")) { + rtSettings.rgbcurveslumamode_gamut = keyFile.get_boolean ("Color Management", "RGBcurvesLumamode_Gamut"); + } + + if (keyFile.has_key ("Color Management", "Intent")) { + rtSettings.monitorIntent = static_cast (keyFile.get_integer ("Color Management", "Intent")); + } + + if (keyFile.has_key ("Color Management", "MonitorBPC")) { + rtSettings.monitorBPC = keyFile.get_boolean ("Color Management", "MonitorBPC"); + } + + if (keyFile.has_key ("Color Management", "CRI")) { + rtSettings.CRI_color = keyFile.get_integer ("Color Management", "CRI"); + } + + if (keyFile.has_key ("Color Management", "DenoiseLabgamma")) { + rtSettings.denoiselabgamma = keyFile.get_integer ("Color Management", "DenoiseLabgamma"); + } + + /* + if (keyFile.has_key ("Color Management", "view")) { + rtSettings.viewingdevice = keyFile.get_integer ("Color Management", "view"); + } + + if (keyFile.has_key ("Color Management", "grey")) { + rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); + } + */ + /* + if (keyFile.has_key ("Color Management", "greySc")) { + rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); + } + */ + if (keyFile.has_key ("Color Management", "CBDLArtif")) { + rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif"); + } + + if (keyFile.has_key ("Color Management", "CBDLlevel0")) { + rtSettings.level0_cbdl = keyFile.get_double ("Color Management", "CBDLlevel0"); + } + + if (keyFile.has_key ("Color Management", "CBDLlevel123")) { + rtSettings.level123_cbdl = keyFile.get_double ("Color Management", "CBDLlevel123"); + } + + //if (keyFile.has_key ("Color Management", "Colortoningab")) rtSettings.colortoningab = keyFile.get_double("Color Management", "Colortoningab"); + //if (keyFile.has_key ("Color Management", "Decaction")) rtSettings.decaction = keyFile.get_double("Color Management", "Decaction"); + + if (keyFile.has_key ("Color Management", "WhiteBalanceSpotSize")) { + whiteBalanceSpotSize = keyFile.get_integer ("Color Management", "WhiteBalanceSpotSize"); + } + + if ( keyFile.has_key ("Color Management", "GamutICC")) { + rtSettings.gamutICC = keyFile.get_boolean ("Color Management", "GamutICC"); + } + + //if ( keyFile.has_key ("Color Management", "BWcomplement")) rtSettings.bw_complementary = keyFile.get_boolean("Color Management", "BWcomplement"); + if ( keyFile.has_key ("Color Management", "Ciecamfloat")) { + rtSettings.ciecamfloat = keyFile.get_boolean ("Color Management", "Ciecamfloat"); + } + + if ( keyFile.has_key ("Color Management", "AdobeRGB")) { + rtSettings.adobe = keyFile.get_string ("Color Management", "AdobeRGB"); + } + + if ( keyFile.has_key ("Color Management", "ProPhoto")) { + rtSettings.prophoto = keyFile.get_string ("Color Management", "ProPhoto"); + } + + if ( keyFile.has_key ("Color Management", "ProPhoto10")) { + rtSettings.prophoto10 = keyFile.get_string ("Color Management", "ProPhoto10"); + } + + if ( keyFile.has_key ("Color Management", "WideGamut")) { + rtSettings.widegamut = keyFile.get_string ("Color Management", "WideGamut"); + } + + if ( keyFile.has_key ("Color Management", "sRGB")) { + rtSettings.srgb = keyFile.get_string ("Color Management", "sRGB"); + } + + if ( keyFile.has_key ("Color Management", "sRGB10")) { + rtSettings.srgb10 = keyFile.get_string ("Color Management", "sRGB10"); + } + + if ( keyFile.has_key ("Color Management", "Beta")) { + rtSettings.beta = keyFile.get_string ("Color Management", "Beta"); + } + + if ( keyFile.has_key ("Color Management", "Best")) { + rtSettings.best = keyFile.get_string ("Color Management", "Best"); + } + + if ( keyFile.has_key ("Color Management", "Rec2020")) { + rtSettings.rec2020 = keyFile.get_string ("Color Management", "Rec2020"); + } + + if ( keyFile.has_key ("Color Management", "Bruce")) { + rtSettings.bruce = keyFile.get_string ("Color Management", "Bruce"); + } + + if ( keyFile.has_key ("Color Management", "GamutLch")) { + rtSettings.gamutLch = keyFile.get_boolean ("Color Management", "GamutLch"); + } + + if ( keyFile.has_key ("Color Management", "ProtectRed")) { + rtSettings.protectred = keyFile.get_integer ("Color Management", "ProtectRed"); + } + + if ( keyFile.has_key ("Color Management", "ProtectRedH")) { + rtSettings.protectredh = keyFile.get_double ("Color Management", "ProtectRedH"); + } + + if ( keyFile.has_key ("Color Management", "Amountchroma")) { + rtSettings.amchroma = keyFile.get_integer ("Color Management", "Amountchroma"); + } + + if ( keyFile.has_key ("Color Management", "ClutsDirectory")) { + clutsDir = keyFile.get_string ("Color Management", "ClutsDirectory"); + } + + //if( keyFile.has_key ("Color Management", "Ciebadpixgauss")) rtSettings.ciebadpixgauss = keyFile.get_boolean("Color Management", "Ciebadpixgauss"); + + } + + if (keyFile.has_group ("Batch Processing")) { + if (keyFile.has_key ("Batch Processing", "AdjusterBehavior")) { + baBehav = keyFile.get_integer_list ("Batch Processing", "AdjusterBehavior"); + } + } + + if (keyFile.has_group ("Sounds")) { + if (keyFile.has_key ("Sounds", "Enable")) { + sndEnable = keyFile.get_boolean ("Sounds", "Enable"); + } + + if (keyFile.has_key ("Sounds", "BatchQueueDone")) { + sndBatchQueueDone = keyFile.get_string ("Sounds", "BatchQueueDone"); + } + + if (keyFile.has_key ("Sounds", "LngEditProcDone")) { + sndLngEditProcDone = keyFile.get_string ("Sounds", "LngEditProcDone"); + } + + if (keyFile.has_key ("Sounds", "LngEditProcDoneSecs")) { + sndLngEditProcDoneSecs = keyFile.get_double ("Sounds", "LngEditProcDoneSecs"); + } + } + + if (keyFile.has_group ("Fast Export")) { + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpening" )) { + fastexport_bypass_sharpening = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpening" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenEdge" )) { + fastexport_bypass_sharpenEdge = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenMicro" )) { + fastexport_bypass_sharpenMicro = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" ); + } + + //if (keyFile.has_key ("Fast Export", "fastexport_bypass_lumaDenoise" )) fastexport_bypass_lumaDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" ); + //if (keyFile.has_key ("Fast Export", "fastexport_bypass_colorDenoise" )) fastexport_bypass_colorDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_colorDenoise" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_defringe" )) { + fastexport_bypass_defringe = keyFile.get_boolean ("Fast Export", "fastexport_bypass_defringe" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrDenoise" )) { + fastexport_bypass_dirpyrDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sh_hq" )) { + fastexport_bypass_sh_hq = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sh_hq" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrequalizer" )) { + fastexport_bypass_dirpyrequalizer = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_wavelet" )) { + fastexport_bypass_wavelet = keyFile.get_boolean ("Fast Export", "fastexport_bypass_wavelet" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_raw_dmethod" )) { + fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_dmethod" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_raw_bayer_method" )) { + fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_bayer_method" ); + } + +//if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_all_enhance" )) fastexport_bypass_raw_bayer_all_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_all_enhance" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_iterations" )) { + fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_iterations" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" )) { + fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_enhance" )) { + fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_enhance" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" )) { + fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" )) { + fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations")) { + fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations"); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_linenoise" )) { + fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_linenoise" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" )) { + fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_greenthresh" )) { + fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_greenthresh" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" )) { + fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_raw_xtrans_method" )) { + fastexport_raw_xtrans_method = keyFile.get_string ("Fast Export", "fastexport_raw_xtrans_method" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ccSteps" )) { + fastexport_bypass_raw_ccSteps = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ca" )) { + fastexport_bypass_raw_ca = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ca" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_df" )) { + fastexport_bypass_raw_df = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_df" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ff" )) { + fastexport_bypass_raw_ff = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ff" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_icm_input" )) { + fastexport_icm_input = keyFile.get_string ("Fast Export", "fastexport_icm_input" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_icm_working" )) { + fastexport_icm_working = keyFile.get_string ("Fast Export", "fastexport_icm_working" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_icm_output" )) { + fastexport_icm_output = keyFile.get_string ("Fast Export", "fastexport_icm_output" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_icm_output_intent" )) { + fastexport_icm_outputIntent = static_cast (keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); + } + + if (keyFile.has_key ("Fast Export", "fastexport_icm_output_bpc" )) { + fastexport_icm_outputBPC = keyFile.get_boolean ("Fast Export", "fastexport_icm_output_bpc" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_icm_gamma" )) { + fastexport_icm_gamma = keyFile.get_string ("Fast Export", "fastexport_icm_gamma" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_resize_enabled" )) { + fastexport_resize_enabled = keyFile.get_boolean ("Fast Export", "fastexport_resize_enabled" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_resize_scale" )) { + fastexport_resize_scale = keyFile.get_double ("Fast Export", "fastexport_resize_scale" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_resize_appliesTo" )) { + fastexport_resize_appliesTo = keyFile.get_string ("Fast Export", "fastexport_resize_appliesTo" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_resize_method" )) { + fastexport_resize_method = keyFile.get_string ("Fast Export", "fastexport_resize_method" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_resize_dataspec" )) { + fastexport_resize_dataspec = keyFile.get_integer ("Fast Export", "fastexport_resize_dataspec" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_resize_width" )) { + fastexport_resize_width = keyFile.get_integer ("Fast Export", "fastexport_resize_width" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) { + fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) { + fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" ); + } + } + + if (keyFile.has_group ("Dialogs")) { + safeDirGet (keyFile, "Dialogs", "LastIccDir", lastIccDir); + safeDirGet (keyFile, "Dialogs", "LastDarkframeDir", lastDarkframeDir); + safeDirGet (keyFile, "Dialogs", "LastFlatfieldDir", lastFlatfieldDir); + safeDirGet (keyFile, "Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastLabCurvesDir", lastLabCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastRetinexDir", lastRetinexDir); + safeDirGet (keyFile, "Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastPFCurvesDir", lastPFCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastBWCurvesDir", lastBWCurvesDir); + + safeDirGet (keyFile, "Dialogs", "LastToneCurvesDir", lastToneCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + safeDirGet (keyFile, "Dialogs", "LastLensProfileDir", lastLensProfileDir); + + if (keyFile.has_key ("Dialogs", "GimpPluginShowInfoDialog")) { + gimpPluginShowInfoDialog = keyFile.get_boolean ("Dialogs", "GimpPluginShowInfoDialog"); + } + } + + if (keyFile.has_group ("Lensfun")) { + if (keyFile.has_key ("Lensfun", "DBDirectory")) { + rtSettings.lensfunDbDirectory = keyFile.get_string ("Lensfun", "DBDirectory"); + } + } + +// -------------------------------------------------------------------------------------------------------- + + filterOutParsedExtensions (); + + return; + + } + } catch (Glib::Error &err) { + Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what()); + + if (options.rtSettings.verbose) { + printf ("%s\n", msg.c_str()); + } + + throw Error (msg); + } catch (...) { + Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname); + + if (options.rtSettings.verbose) { + printf ("%s\n", msg.c_str()); + } + + throw Error (msg); + } +} + +bool Options::safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section, + const Glib::ustring& entryName, Glib::ustring& destination) +{ + try { + + if (keyFile.has_key (section, entryName) && !keyFile.get_string (section, entryName).empty ()) { + destination = keyFile.get_string (section, entryName); + return true; + } + + } catch (Glib::KeyFileError&) {} + + return false; +} + +void Options::saveToFile (Glib::ustring fname) +{ + + Glib::ustring keyData; + + try { + + Glib::KeyFile keyFile; + + keyFile.set_boolean ("General", "TabbedEditor", tabbedUI); + keyFile.set_boolean ("General", "StoreLastProfile", savesParamsAtExit); + + if (startupDir == STARTUPDIR_HOME) { + keyFile.set_string ("General", "StartupDirectory", "home"); + } else if (startupDir == STARTUPDIR_CURRENT) { + keyFile.set_string ("General", "StartupDirectory", "current"); + } else if (startupDir == STARTUPDIR_CUSTOM) { + keyFile.set_string ("General", "StartupDirectory", "custom"); + } else if (startupDir == STARTUPDIR_LAST) { + keyFile.set_string ("General", "StartupDirectory", "last"); + } + + keyFile.set_string ("General", "StartupPath", startupPath); + keyFile.set_string ("General", "DateFormat", dateFormat); + keyFile.set_integer ("General", "AdjusterMinDelay", adjusterMinDelay); + keyFile.set_integer ("General", "AdjusterMaxDelay", adjusterMaxDelay); + keyFile.set_boolean ("General", "MultiUser", multiUser); + keyFile.set_string ("General", "Language", language); + keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); + keyFile.set_string ("General", "Theme", theme); + keyFile.set_string ("General", "Version", RTVERSION); + keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); + keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); + keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); + keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); + keyFile.set_double ("General", "TopLeft", rtSettings.top_left); + keyFile.set_double ("General", "TopRight", rtSettings.top_right); + keyFile.set_double ("General", "BotRight", rtSettings.bot_right); + keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); + keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); + keyFile.set_double ("General", "EDLow", rtSettings.ed_low); + keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); + keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); + + + keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); + keyFile.set_string ("External Editor", "GimpDir", gimpDir); + keyFile.set_string ("External Editor", "PhotoshopDir", psDir); + keyFile.set_string ("External Editor", "CustomEditor", customEditorProg); + + keyFile.set_boolean ("File Browser", "BrowseOnlyRaw", fbOnlyRaw); + keyFile.set_boolean ("File Browser", "BrowserShowsDate", fbShowDateTime); + keyFile.set_boolean ("File Browser", "BrowserShowsExif", fbShowBasicExif); + keyFile.set_boolean ("File Browser", "BrowserShowsExpComp", fbShowExpComp); + keyFile.set_boolean ("File Browser", "BrowserShowsHidden", fbShowHidden); + keyFile.set_integer ("File Browser", "ThumbnailSize", thumbSize); + keyFile.set_integer ("File Browser", "ThumbnailSizeTab", thumbSizeTab); + keyFile.set_integer ("File Browser", "ThumbnailSizeQueue", thumbSizeQueue); + keyFile.set_integer ("File Browser", "SameThumbSize", sameThumbSize); + keyFile.set_integer ("File Browser", "MaxPreviewHeight", maxThumbnailHeight); + keyFile.set_integer ("File Browser", "MaxCacheEntries", maxCacheEntries); + Glib::ArrayHandle pext = parseExtensions; + keyFile.set_string_list ("File Browser", "ParseExtensions", pext); + Glib::ArrayHandle pextena = parseExtensionsEnabled; + keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); + keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); + keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); + Glib::ArrayHandle pfav = favoriteDirs; + keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); + Glib::ArrayHandle pren = renameTemplates; + keyFile.set_string_list ("File Browser", "RenameTemplates", pren); + keyFile.set_boolean ("File Browser", "RenameUseTemplates", renameUseTemplates); + Glib::ArrayHandle ptzoom = thumbnailZoomRatios; + keyFile.set_double_list ("File Browser", "ThumbnailZoomRatios", ptzoom); + keyFile.set_boolean ("File Browser", "OverlayedFileNames", overlayedFileNames); + keyFile.set_boolean ("File Browser", "FilmStripOverlayedFileNames", filmStripOverlayedFileNames); + keyFile.set_boolean ("File Browser", "ShowFileNames", showFileNames ); + keyFile.set_boolean ("File Browser", "FilmStripShowFileNames", filmStripShowFileNames ); + keyFile.set_boolean ("File Browser", "InternalThumbIfUntouched", internalThumbIfUntouched ); + keyFile.set_boolean ("File Browser", "menuGroupRank", menuGroupRank); + keyFile.set_boolean ("File Browser", "menuGroupLabel", menuGroupLabel); + keyFile.set_boolean ("File Browser", "menuGroupFileOperations", menuGroupFileOperations); + keyFile.set_boolean ("File Browser", "menuGroupProfileOperations", menuGroupProfileOperations); + keyFile.set_boolean ("File Browser", "menuGroupExtProg", menuGroupExtProg); + keyFile.set_integer ("File Browser", "MaxRecentFolders", maxRecentFolders); + { + std::vector temp; + temp.reserve (maxRecentFolders); + + for (unsigned int i = 0; i < std::min (recentFolders.size(), maxRecentFolders); i++) { + temp.push_back (recentFolders[i]); + } + + keyFile.set_string_list ("File Browser", "RecentFolders", temp); + } + keyFile.set_integer ("Clipping Indication", "HighlightThreshold", highlightThreshold); + keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold); + keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped); + + keyFile.set_integer ("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit); + keyFile.set_double ("Performance", "NRauto", rtSettings.nrauto); + keyFile.set_double ("Performance", "NRautomax", rtSettings.nrautomax); + keyFile.set_double ("Performance", "NRhigh", rtSettings.nrhigh); + keyFile.set_integer ("Performance", "NRWavlevel", rtSettings.nrwavlevel); + keyFile.set_integer ("Performance", "LevNR", rtSettings.leveldnv); + keyFile.set_integer ("Performance", "LevNRTI", rtSettings.leveldnti); + keyFile.set_integer ("Performance", "LevNRAUT", rtSettings.leveldnaut); + keyFile.set_integer ("Performance", "LevNRLISS", rtSettings.leveldnliss); + keyFile.set_integer ("Performance", "SIMPLNRAUT", rtSettings.leveldnautsimpl); + keyFile.set_integer ("Performance", "ClutCacheSize", clutCacheSize); + keyFile.set_integer ("Performance", "MaxInspectorBuffers", maxInspectorBuffers); + keyFile.set_integer ("Performance", "PreviewDemosaicFromSidecar", prevdemo); + keyFile.set_boolean ("Performance", "Daubechies", rtSettings.daubech); + keyFile.set_boolean ("Performance", "SerializeTiffRead", serializeTiffRead); + + keyFile.set_string ("Output", "Format", saveFormat.format); + keyFile.set_integer ("Output", "JpegQuality", saveFormat.jpegQuality); + keyFile.set_integer ("Output", "JpegSubSamp", saveFormat.jpegSubSamp); + keyFile.set_integer ("Output", "PngCompression", saveFormat.pngCompression); + keyFile.set_integer ("Output", "PngBps", saveFormat.pngBits); + keyFile.set_integer ("Output", "TiffBps", saveFormat.tiffBits); + keyFile.set_boolean ("Output", "TiffUncompressed", saveFormat.tiffUncompressed); + keyFile.set_boolean ("Output", "SaveProcParams", saveFormat.saveParams); + + keyFile.set_string ("Output", "FormatBatch", saveFormatBatch.format); + keyFile.set_integer ("Output", "JpegQualityBatch", saveFormatBatch.jpegQuality); + keyFile.set_integer ("Output", "JpegSubSampBatch", saveFormatBatch.jpegSubSamp); + keyFile.set_integer ("Output", "PngCompressionBatch", saveFormatBatch.pngCompression); + keyFile.set_integer ("Output", "PngBpsBatch", saveFormatBatch.pngBits); + keyFile.set_integer ("Output", "TiffBpsBatch", saveFormatBatch.tiffBits); + keyFile.set_boolean ("Output", "TiffUncompressedBatch", saveFormatBatch.tiffUncompressed); + keyFile.set_boolean ("Output", "SaveProcParamsBatch", saveFormatBatch.saveParams); + + keyFile.set_string ("Output", "PathTemplate", savePathTemplate); + keyFile.set_string ("Output", "PathFolder", savePathFolder); + keyFile.set_boolean ("Output", "AutoSuffix", autoSuffix); + keyFile.set_boolean ("Output", "ForceFormatOpts", forceFormatOpts); + keyFile.set_integer ("Output", "SaveMethodNum", saveMethodNum); + keyFile.set_boolean ("Output", "UsePathTemplate", saveUsePathTemplate); + keyFile.set_string ("Output", "LastSaveAsPath", lastSaveAsPath); + keyFile.set_boolean ("Output", "OverwriteOutputFile", overwriteOutputFile); + keyFile.set_boolean ("Output", "TunnelMetaData", tunnelMetaData); + + keyFile.set_string ("Profiles", "Directory", profilePath); + keyFile.set_boolean ("Profiles", "UseBundledProfiles", useBundledProfiles); + keyFile.set_string ("Profiles", "LoadSaveProfilePath", loadSaveProfilePath); + keyFile.set_string ("Profiles", "RawDefault", defProfRaw); + keyFile.set_string ("Profiles", "ImgDefault", defProfImg); + keyFile.set_boolean ("Profiles", "FilledProfile", filledProfile); + keyFile.set_boolean ("Profiles", "SaveParamsWithFile", saveParamsFile); + keyFile.set_boolean ("Profiles", "SaveParamsToCache", saveParamsCache); + keyFile.set_integer ("Profiles", "LoadParamsFromLocation", paramsLoadLocation); + keyFile.set_string ("Profiles", "CustomProfileBuilderPath", CPBPath); + keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); + + keyFile.set_integer ("GUI", "WindowWidth", windowWidth); + keyFile.set_integer ("GUI", "WindowHeight", windowHeight); + keyFile.set_integer ("GUI", "WindowX", windowX); + keyFile.set_integer ("GUI", "WindowY", windowY); + keyFile.set_integer ("GUI", "WindowMonitor", windowMonitor); + keyFile.set_integer ("GUI", "MeowMonitor", meowMonitor); + keyFile.set_boolean ("GUI", "MeowFullScreen", meowFullScreen); + keyFile.set_boolean ("GUI", "MeowMaximized", meowMaximized); + keyFile.set_integer ("GUI", "MeowWidth", meowWidth); + keyFile.set_integer ("GUI", "MeowHeight", meowHeight); + keyFile.set_integer ("GUI", "MeowX", meowX); + keyFile.set_integer ("GUI", "MeowY", meowY); + keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized); + keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth); + keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight); + keyFile.set_integer ("GUI", "DirBrowserWidth", dirBrowserWidth); + keyFile.set_integer ("GUI", "DirBrowserHeight", dirBrowserHeight); + keyFile.set_integer ("GUI", "SortType", dirBrowserSortType); + keyFile.set_integer ("GUI", "PreferencesWidth", preferencesWidth); + keyFile.set_integer ("GUI", "PreferencesHeight", preferencesHeight); + keyFile.set_integer ("GUI", "SaveAsDialogWidth", saveAsDialogWidth); + keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight); + keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth); + keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth); + keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight); + keyFile.set_boolean ("GUI", "BrowserToolPanelOpened", browserToolPanelOpened); + keyFile.set_boolean ("GUI", "EditorFilmStripOpened", editorFilmStripOpened); + keyFile.set_boolean ("GUI", "BrowserDirPanelOpened", browserDirPanelOpened); + keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); + keyFile.set_string ("GUI", "FontFamily", fontFamily); + keyFile.set_integer ("GUI", "FontSize", fontSize); + keyFile.set_string ("GUI", "CPFontFamily", CPFontFamily); + keyFile.set_integer ("GUI", "CPFontSize", CPFontSize); + keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); + keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); + keyFile.set_boolean ("GUI", "RememberZoomAndPan", rememberZoomAndPan); + keyFile.set_integer ("GUI", "LastCropSize", lastCropSize); + keyFile.set_boolean ("GUI", "ShowHistory", showHistory); + keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState); + keyFile.set_boolean ("GUI", "ShowInfo", showInfo); + keyFile.set_boolean ("GUI", "MainNBVertical", mainNBVertical); + keyFile.set_boolean ("GUI", "ShowClippedHighlights", showClippedHighlights); + keyFile.set_boolean ("GUI", "ShowClippedShadows", showClippedShadows); + keyFile.set_integer ("GUI", "FrameColor", bgcolor); + keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); + Glib::ArrayHandle tpopen = tpOpen; + keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); + keyFile.set_boolean ("GUI", "ToolPanelsExpandedAutoSave", autoSaveTpOpen); + keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); + keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); + keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); + keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition); + keyFile.set_boolean ("GUI", "HistogramBar", histogramBar); + keyFile.set_boolean ("GUI", "HistogramFullMode", histogramFullMode); + keyFile.set_integer ("GUI", "NavigatorRGBUnit", (int)navRGBUnit); + keyFile.set_integer ("GUI", "NavigatorHSVUnit", (int)navHSVUnit); + keyFile.set_boolean ("GUI", "ShowFilmStripToolBar", showFilmStripToolBar); + keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow); + keyFile.set_boolean ("GUI", "HideTPVScrollbar", hideTPVScrollbar); + keyFile.set_boolean ("GUI", "UseIconNoText", UseIconNoText); + keyFile.set_boolean ("GUI", "HistogramWorking", rtSettings.HistogramWorking); + keyFile.set_integer ("GUI", "CurveBBoxPosition", curvebboxpos); + + //Glib::ArrayHandle crvopen = crvOpen; + //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); + + keyFile.set_integer ("Crop Settings", "PPI", cropPPI); + + keyFile.set_string ("Color Management", "PrinterProfile", rtSettings.printerProfile); + keyFile.set_integer ("Color Management", "PrinterIntent", rtSettings.printerIntent); + keyFile.set_boolean ("Color Management", "PrinterBPC", rtSettings.printerBPC); + + keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); + keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); + keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); + keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); + keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); + keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); + keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); + //keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); + //keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); +// keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); + + keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); + keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); + keyFile.set_string ("Color Management", "ProPhoto10", rtSettings.prophoto10); + keyFile.set_string ("Color Management", "WideGamut", rtSettings.widegamut); + keyFile.set_string ("Color Management", "sRGB", rtSettings.srgb); + keyFile.set_string ("Color Management", "sRGB10", rtSettings.srgb10); + keyFile.set_string ("Color Management", "Beta", rtSettings.beta); + keyFile.set_string ("Color Management", "Best", rtSettings.best); + keyFile.set_string ("Color Management", "Rec2020", rtSettings.rec2020); + keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce); + keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize); + keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC); + //keyFile.set_boolean ("Color Management", "BWcomplement", rtSettings.bw_complementary); + keyFile.set_boolean ("Color Management", "Ciecamfloat", rtSettings.ciecamfloat); + keyFile.set_boolean ("Color Management", "GamutLch", rtSettings.gamutLch); + keyFile.set_integer ("Color Management", "ProtectRed", rtSettings.protectred); + keyFile.set_integer ("Color Management", "Amountchroma", rtSettings.amchroma); + keyFile.set_double ("Color Management", "ProtectRedH", rtSettings.protectredh); + keyFile.set_integer ("Color Management", "CRI", rtSettings.CRI_color); + keyFile.set_integer ("Color Management", "DenoiseLabgamma", rtSettings.denoiselabgamma); + //keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss); + keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); + //keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab); + //keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); + keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); + + + Glib::ArrayHandle bab = baBehav; + keyFile.set_integer_list ("Batch Processing", "AdjusterBehavior", bab); + + keyFile.set_boolean ("Sounds", "Enable", sndEnable); + keyFile.set_string ("Sounds", "BatchQueueDone", sndBatchQueueDone); + keyFile.set_string ("Sounds", "LngEditProcDone", sndLngEditProcDone); + keyFile.set_double ("Sounds", "LngEditProcDoneSecs", sndLngEditProcDoneSecs); + + + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening", fastexport_bypass_sharpening); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge", fastexport_bypass_sharpenEdge); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro", fastexport_bypass_sharpenMicro); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe", fastexport_bypass_defringe); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise", fastexport_bypass_dirpyrDenoise); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq", fastexport_bypass_sh_hq); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer", fastexport_bypass_dirpyrequalizer); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet", fastexport_bypass_wavelet); + keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method", fastexport_raw_bayer_method); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations", fastexport_bypass_raw_bayer_dcb_iterations); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance", fastexport_bypass_raw_bayer_dcb_enhance); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise", fastexport_bypass_raw_bayer_linenoise); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh", fastexport_bypass_raw_bayer_greenthresh); + keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method", fastexport_raw_xtrans_method); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps", fastexport_bypass_raw_ccSteps); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca", fastexport_bypass_raw_ca); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df", fastexport_bypass_raw_df); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff", fastexport_bypass_raw_ff); + keyFile.set_string ("Fast Export", "fastexport_icm_input", fastexport_icm_input); + keyFile.set_string ("Fast Export", "fastexport_icm_working", fastexport_icm_working); + keyFile.set_string ("Fast Export", "fastexport_icm_output", fastexport_icm_output); + keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent", fastexport_icm_outputIntent); + keyFile.set_boolean ("Fast Export", "fastexport_icm_output_bpc", fastexport_icm_outputBPC); + keyFile.set_string ("Fast Export", "fastexport_icm_gamma", fastexport_icm_gamma); + keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled", fastexport_resize_enabled); + keyFile.set_double ("Fast Export", "fastexport_resize_scale", fastexport_resize_scale); + keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo", fastexport_resize_appliesTo); + keyFile.set_string ("Fast Export", "fastexport_resize_method", fastexport_resize_method); + keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec", fastexport_resize_dataspec); + keyFile.set_integer ("Fast Export", "fastexport_resize_width", fastexport_resize_width); + keyFile.set_integer ("Fast Export", "fastexport_resize_height", fastexport_resize_height); + keyFile.set_integer ("Fast Export", "fastexport_use_fast_pipeline", fastexport_use_fast_pipeline); + + keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); + keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); + keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); + keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); + keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); + keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); + keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); + keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); + keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); + keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); + keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); + keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); + keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); + keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir); + keyFile.set_boolean ("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog); + + keyFile.set_string ("Lensfun", "DBDirectory", rtSettings.lensfunDbDirectory); + + keyData = keyFile.to_data (); + + } catch (Glib::KeyFileError &e) { + throw Error (e.what()); + } + + FILE *f = g_fopen (fname.c_str (), "wt"); + + if (f == nullptr) { + std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl; + Glib::ustring msg_ = Glib::ustring::compose (M ("MAIN_MSG_WRITEFAILED"), fname.c_str()); + throw Error (msg_); + } else { + fprintf (f, "%s", keyData.c_str ()); + fclose (f); + } +} + +void Options::load (bool lightweight) +{ + + // Find the application data path + + const gchar* path; + Glib::ustring dPath; + + path = g_getenv ("RT_SETTINGS"); + + if (path != nullptr) { + rtdir = Glib::ustring (path); + + if (!Glib::path_is_absolute (rtdir)) { + Glib::ustring msg = Glib::ustring::compose ("Settings path %1 is not absolute", rtdir); + throw Error (msg); + } + } else { +#ifdef WIN32 + WCHAR pathW[MAX_PATH] = {0}; + + if (SHGetSpecialFolderPathW (NULL, pathW, CSIDL_LOCAL_APPDATA, false)) { + char pathA[MAX_PATH]; + WideCharToMultiByte (CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); + rtdir = Glib::build_filename (Glib::ustring (pathA), Glib::ustring (CACHEFOLDERNAME)); + } + +#else + rtdir = Glib::build_filename (Glib::ustring (g_get_user_config_dir ()), Glib::ustring (CACHEFOLDERNAME)); +#endif + } + + if (options.rtSettings.verbose) { + printf ("Settings directory (rtdir) = %s\n", rtdir.c_str()); + } + + // Set the cache folder in RT's base folder + cacheBaseDir = Glib::build_filename (argv0, "cache"); + + // Read the global option file (the one located in the application's base folder) + try { + options.readFromFile (Glib::build_filename (argv0, "options")); + } catch (Options::Error &) { + // ignore errors here + } + + // Modify the path of the cache folder to the one provided in RT_CACHE environment variable + path = g_getenv ("RT_CACHE"); + + if (path != nullptr) { + cacheBaseDir = Glib::ustring (path); + + if (!Glib::path_is_absolute (cacheBaseDir)) { + Glib::ustring msg = Glib::ustring::compose ("Cache base dir %1 is not absolute", cacheBaseDir); + throw Error (msg); + } + } + // No environment variable provided, so falling back to the multi user mode, is enabled + else if (options.multiUser) { +#ifdef WIN32 + cacheBaseDir = Glib::build_filename (rtdir, "cache"); +#else + cacheBaseDir = Glib::build_filename (Glib::ustring (g_get_user_cache_dir()), Glib::ustring (CACHEFOLDERNAME)); +#endif + } + + // Check if RT is installed in Multi-User mode + if (options.multiUser) { + // Read the user option file (the one located somewhere in the user's home folder) + // Those values supersets those of the global option file + try { + options.readFromFile (Glib::build_filename (rtdir, "options")); + } catch (Options::Error &) { + // If the local option file does not exist or is broken, and the local cache folder does not exist, recreate it + if (!g_mkdir_with_parents (rtdir.c_str (), 511)) { + // Save the option file + options.saveToFile (Glib::build_filename (rtdir, "options")); + } + } + +#ifdef __APPLE__ + // make sure .local/share exists on OS X so we don't get problems with recently-used.xbel + g_mkdir_with_parents (g_get_user_data_dir(), 511); +#endif + } + + if (options.rtSettings.verbose) { + printf ("Cache directory (cacheBaseDir) = %s\n", cacheBaseDir.c_str()); + } + + // Update profile's path and recreate it if necessary + options.updatePaths(); + + // Check default Raw and Img procparams existence + if (options.defProfRaw.empty()) { + options.defProfRaw = DEFPROFILE_INTERNAL; + } else { + Glib::ustring tmpFName = options.findProfilePath (options.defProfRaw); + + if (!tmpFName.empty()) { + if (options.rtSettings.verbose) { + printf ("Raws' default profile \"%s\" found\n", options.defProfRaw.c_str()); + } + } else { + if (options.rtSettings.verbose) { + printf ("Raws' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfRaw.c_str()); + } + + options.defProfRaw = DEFPROFILE_INTERNAL; + options.defProfRawMissing = true; + } + } + + if (options.defProfImg.empty()) { + options.defProfImg = DEFPROFILE_INTERNAL; + } else { + Glib::ustring tmpFName = options.findProfilePath (options.defProfImg); + + if (!tmpFName.empty()) { + if (options.rtSettings.verbose) { + printf ("Images' default profile \"%s\" found\n", options.defProfImg.c_str()); + } + } else { + if (options.rtSettings.verbose) { + printf ("Images' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfImg.c_str()); + } + + options.defProfImg = DEFPROFILE_INTERNAL; + options.defProfImgMissing = true; + } + } + + //We handle languages using a hierarchy of translations. The top of the hierarchy is default. This includes a default translation for all items + // (most likely using simple English). The next level is the language: for instance, English, French, Chinese, etc. This file should contain a + // generic translation for all items which differ from default. Finally there is the locale. This is region-specific items which differ from the + // language file. These files must be name in the format (), where Language is the name of the language which it inherits from, + // and LC is the local code. Some examples of this would be English (US) (American English), French (FR) (Franch French), French (CA) (Canadian + // French), etc. + // + // Each level will only contain the differences between itself and its parent translation. For instance, English (UK) or English (CA) may + // include the translation "HISTORY_MSG_34;Avoid Colour Clipping" where English would translate it as "HISTORY_MSG_34;Avoid Color Clipping" (note + // the difference in the spelling of 'colour'). + // + // It is important that when naming the translation files, that you stick to the format or (). We depend on that to figure + // out which are the parent translations. Furthermore, there must be a file for each locale () -- you cannot have + // 'French (CA)' unless there is a file 'French'. + + Glib::ustring defaultTranslation = Glib::build_filename (argv0, "languages", "default"); + Glib::ustring languageTranslation = ""; + Glib::ustring localeTranslation = ""; + + if (options.languageAutoDetect) { + options.language = langMgr.getOSUserLanguage(); + } + + if (!options.language.empty()) { + std::vector langPortions = Glib::Regex::split_simple (" ", options.language); + + if (langPortions.size() >= 1) { + languageTranslation = Glib::build_filename (argv0, "languages", langPortions.at (0)); + } + + if (langPortions.size() >= 2) { + localeTranslation = Glib::build_filename (argv0, "languages", options.language); + } + } + + langMgr.load (localeTranslation, new MultiLangMgr (languageTranslation, new MultiLangMgr (defaultTranslation))); + + rtengine::init (&options.rtSettings, argv0, rtdir, !lightweight); +} + +void Options::save () +{ + + if (!options.multiUser) { + options.saveToFile (Glib::build_filename (argv0, "options")); + } else { + options.saveToFile (Glib::build_filename (rtdir, "options")); + } +} + +/* + * return true if ext is a parsed extension (retained or not) + */ +bool Options::is_parse_extention (Glib::ustring fname) +{ + Glib::ustring ext = getExtension (fname).lowercase(); + + if (!ext.empty()) { + // there is an extension to the filename + + // look out if it has one of the listed extensions (selected or not) + for (unsigned int i = 0; i < parseExtensions.size(); i++) { + if (ext == parseExtensions[i]) { + return true; + } + } + } + + return false; +} + +/* + * return true if fname ends with one of the retained image file extensions + */ +bool Options::has_retained_extention (Glib::ustring fname) +{ + + Glib::ustring ext = getExtension (fname).lowercase(); + + if (!ext.empty()) { + // there is an extension to the filename + + // look out if it has one of the retained extensions + for (unsigned int i = 0; i < parsedExtensions.size(); i++) { + if (ext == parsedExtensions[i]) { + return true; + } + } + } + + return false; +} + +/* + * return true if ext is an enabled extension + */ +bool Options::is_extention_enabled (Glib::ustring ext) +{ + for (int j = 0; j < (int)parseExtensions.size(); j++) + if (parseExtensions[j].casefold() == ext.casefold()) { + return j >= (int)parseExtensionsEnabled.size() || parseExtensionsEnabled[j]; + } + + return false; +} diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index aa3c21256..0827a0d7f 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -287,6 +287,7 @@ void ParamsEdited::set (bool v) commonTrans.autofill = v; rotate.degree = v; distortion.amount = v; + lensProf.lcMode = v; lensProf.lcpFile = v; lensProf.useDist = v; lensProf.useVign = v; @@ -826,12 +827,13 @@ void ParamsEdited::initFrom (const std::vector commonTrans.autofill = commonTrans.autofill && p.commonTrans.autofill == other.commonTrans.autofill; rotate.degree = rotate.degree && p.rotate.degree == other.rotate.degree; distortion.amount = distortion.amount && p.distortion.amount == other.distortion.amount; + lensProf.lcMode = lensProf.lcMode && p.lensProf.lcMode == other.lensProf.lcMode; lensProf.lcpFile = lensProf.lcpFile && p.lensProf.lcpFile == other.lensProf.lcpFile; lensProf.useDist = lensProf.useDist && p.lensProf.useDist == other.lensProf.useDist; lensProf.useVign = lensProf.useVign && p.lensProf.useVign == other.lensProf.useVign; lensProf.useCA = lensProf.useCA && p.lensProf.useCA == other.lensProf.useCA; - lensProf.useLensfun = lensProf.useLensfun && p.lensProf.useLensfun == other.lensProf.useLensfun; - lensProf.lfAutoMatch = lensProf.lfAutoMatch && p.lensProf.lfAutoMatch == other.lensProf.lfAutoMatch; + lensProf.useLensfun = lensProf.useLensfun && p.lensProf.useLensfun() == other.lensProf.useLensfun(); + lensProf.lfAutoMatch = lensProf.lfAutoMatch && p.lensProf.lfAutoMatch() == other.lensProf.lfAutoMatch(); lensProf.lfCameraMake = lensProf.lfCameraMake && p.lensProf.lfCameraMake == other.lensProf.lfCameraMake; lensProf.lfCameraModel = lensProf.lfCameraModel && p.lensProf.lfCameraModel == other.lensProf.lfCameraModel; lensProf.lfLens = lensProf.lfLens && p.lensProf.lfLens == other.lensProf.lfLens; @@ -2062,6 +2064,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.distortion.amount = dontforceSet && options.baBehav[ADDSET_DIST_AMOUNT] ? toEdit.distortion.amount + mods.distortion.amount : mods.distortion.amount; } + if (lensProf.lcMode) { + toEdit.lensProf.lcMode = mods.lensProf.lcMode; + } + if (lensProf.lcpFile) { toEdit.lensProf.lcpFile = mods.lensProf.lcpFile; } @@ -2078,14 +2084,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.lensProf.useCA = mods.lensProf.useCA; } - if (lensProf.useLensfun) { - toEdit.lensProf.useLensfun = mods.lensProf.useLensfun; - } - - if (lensProf.lfAutoMatch) { - toEdit.lensProf.lfAutoMatch = mods.lensProf.lfAutoMatch; - } - if (lensProf.lfCameraMake) { toEdit.lensProf.lfCameraMake = mods.lensProf.lfCameraMake; } @@ -3053,7 +3051,7 @@ bool RAWParamsEdited::isUnchanged() const bool LensProfParamsEdited::isUnchanged() const { - return lcpFile && useVign && lfLens; + return lcMode && lcpFile && useVign && lfLens; } bool RetinexParamsEdited::isUnchanged() const diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index c30134f86..46a68d3f5 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -429,6 +429,7 @@ class LensProfParamsEdited public: bool lcpFile, useDist, useVign, useCA; bool useLensfun, lfAutoMatch, lfCameraMake, lfCameraModel, lfLens; + bool lcMode; bool isUnchanged() const; }; diff --git a/rtgui/ppversion.h b/rtgui/ppversion.h index 6a695416e..d2e9be090 100644 --- a/rtgui/ppversion.h +++ b/rtgui/ppversion.h @@ -2,11 +2,13 @@ #define _PPVERSION_ // This number has to be incremented whenever the PP3 file format is modified or the behaviour of a tool changes -#define PPVERSION 326 +#define PPVERSION 327 #define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified /* Log of version changes + 327 2017-09-15 + [Profiles Lens Correction] Added Lensfun 326 2015-07-26 [Exposure] Added 'Perceptual' tone curve mode 325 2015-07-23 From b20464a06f106f42ccf4c4791edd03fa03f4abc7 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 15 Sep 2017 20:14:27 +0200 Subject: [PATCH 121/126] removed accidentially added file --- rtgui/options.cc.save-failed | 2508 ---------------------------------- 1 file changed, 2508 deletions(-) delete mode 100644 rtgui/options.cc.save-failed diff --git a/rtgui/options.cc.save-failed b/rtgui/options.cc.save-failed deleted file mode 100644 index d03ece485..000000000 --- a/rtgui/options.cc.save-failed +++ /dev/null @@ -1,2508 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * 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 . - */ -#include "options.h" -#include -#include -#include -#include "multilangmgr.h" -#include "addsetids.h" -#include "guiutils.h" -#include "version.h" -#include "config.h" -#include -#ifdef _OPENMP -#include -#endif - - - -#ifdef WIN32 -#include -// for GCC32 -#ifndef _WIN32_IE -#define _WIN32_IE 0x0600 -#endif -#include -#endif - -// User's settings directory, including images' profiles if used -Glib::ustring Options::rtdir; -// User's cached datas' directory -Glib::ustring Options::cacheBaseDir; - -Options options; -Glib::ustring versionString = RTVERSION; -Glib::ustring paramFileExtension = ".pp3"; - -Options::Options () -{ - - defProfRawMissing = false; - defProfImgMissing = false; - setDefaults (); -} - -const char *DefaultLanguage = "English (US)"; - -inline bool Options::checkProfilePath (Glib::ustring &path) -{ - if (path.empty()) { - return false; - } - - Glib::ustring p = getUserProfilePath(); - - if (!p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS)) { - return true; - } - - p = getGlobalProfilePath(); - - return !p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS); -} - -bool Options::checkDirPath (Glib::ustring &path, Glib::ustring errString) -{ - if (Glib::file_test (path, Glib::FILE_TEST_EXISTS) && Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) { - return true; - } else { - if (!errString.empty()) { - printf ("%s\n", errString.c_str()); - } - - return false; - } -} - -void Options::updatePaths() -{ - - Glib::ustring tmpPath; - - userProfilePath = ""; - globalProfilePath = ""; - - if (Glib::path_is_absolute (profilePath)) { - // absolute path - if (!checkDirPath (profilePath, "")) { - g_mkdir_with_parents (profilePath.c_str (), 511); - - if (!checkDirPath (profilePath, "")) { // had problems with mkdir_with_parents return value on OS X, just check dir again - printf ("Error: user's profiles' directory \"%s\" creation failed\n", profilePath.c_str()); - } - } - - if (checkDirPath (profilePath, "Error: the specified user's profiles' path doesn't point to a directory or doesn't exist!\n")) { - if (multiUser) { - userProfilePath = profilePath; - tmpPath = Glib::build_filename (argv0, "profiles"); - - if (checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { - if (userProfilePath != tmpPath) { - globalProfilePath = tmpPath; - } - } - } else { - globalProfilePath = profilePath; - } - } else { - tmpPath = Glib::build_filename (argv0, "profiles"); - - if (checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { - globalProfilePath = tmpPath; - } - } - } else { - // relative paths - if (multiUser) { - tmpPath = Glib::build_filename (rtdir, profilePath); - - if (!checkDirPath (tmpPath, "")) { - g_mkdir_with_parents (tmpPath.c_str (), 511); - - if (!checkDirPath (tmpPath, "")) { - printf ("Error: user's profiles' directory \"%s\" creation failed\n", tmpPath.c_str()); - } - } - - if (checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory!\n")) { - userProfilePath = tmpPath; - } - - tmpPath = Glib::build_filename (argv0, "profiles"); - - if (checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory or doesn't exist!\n")) { - globalProfilePath = tmpPath; - } - } else { - // common directory - // directory name set in options is ignored, we use the default directory name - tmpPath = Glib::build_filename (argv0, "profiles"); - - if (checkDirPath (tmpPath, "Error: no global profiles' directory found!\n")) { - globalProfilePath = tmpPath; - } - } - } - - Glib::ustring preferredPath = getPreferredProfilePath(); - - // Paths are updated only if the user or global profile path is set - if (lastRgbCurvesDir.empty() || !Glib::file_test (lastRgbCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastRgbCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastRgbCurvesDir = preferredPath; - } - - if (lastLabCurvesDir.empty() || !Glib::file_test (lastLabCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastLabCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastLabCurvesDir = preferredPath; - } - - if (lastRetinexDir.empty() || !Glib::file_test (lastRetinexDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastLabCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastRetinexDir = preferredPath; - } - - if (lastDenoiseCurvesDir.empty() || !Glib::file_test (lastDenoiseCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastDenoiseCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastDenoiseCurvesDir = preferredPath; - } - - if (lastWaveletCurvesDir.empty() || !Glib::file_test (lastWaveletCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastWaveletCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastWaveletCurvesDir = preferredPath; - } - - if (lastPFCurvesDir.empty() || !Glib::file_test (lastPFCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastPFCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastPFCurvesDir = preferredPath; - } - - if (lastHsvCurvesDir.empty() || !Glib::file_test (lastHsvCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastHsvCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastHsvCurvesDir = preferredPath; - } - - if (lastToneCurvesDir.empty() || !Glib::file_test (lastToneCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastToneCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastToneCurvesDir = preferredPath; - } - - if (lastProfilingReferenceDir.empty() || !Glib::file_test (lastProfilingReferenceDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastProfilingReferenceDir, Glib::FILE_TEST_IS_DIR)) { - lastProfilingReferenceDir = preferredPath; - } - - if (lastVibranceCurvesDir.empty() || !Glib::file_test (lastVibranceCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastVibranceCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastVibranceCurvesDir = preferredPath; - } - - if (loadSaveProfilePath.empty() || !Glib::file_test (loadSaveProfilePath, Glib::FILE_TEST_EXISTS) || !Glib::file_test (loadSaveProfilePath, Glib::FILE_TEST_IS_DIR)) { - loadSaveProfilePath = preferredPath; - } - - if (lastBWCurvesDir.empty() || !Glib::file_test (lastBWCurvesDir, Glib::FILE_TEST_EXISTS) || !Glib::file_test (lastBWCurvesDir, Glib::FILE_TEST_IS_DIR)) { - lastBWCurvesDir = preferredPath; - } - -} - -Glib::ustring Options::getPreferredProfilePath() -{ - if (!userProfilePath.empty()) { - return userProfilePath; - } else if (!globalProfilePath.empty()) { - return globalProfilePath; - } else { - return ""; - } -} - -/** @brief Get the absolute path of the given filename or the "Neutral" special value - * - *@param profName path + filename of the procparam to look for. A filename without path can be provided for backward compatibility. - * In this case, this parameter will be updated with the new format. - *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementor will have - * to test for this particular value. If the absolute path is invalid (e.g. the file doesn't exist), it will return an empty string. - */ -Glib::ustring Options::findProfilePath (Glib::ustring &profName) -{ - if (profName.empty()) { - return ""; - } - - if (profName == DEFPROFILE_INTERNAL) { - return profName; - } - - if (profName == DEFPROFILE_DYNAMIC) { - return profName; - } - - Glib::ustring p = profName.substr (0, 4); - - if (p == "${U}") { - // the path starts by the User virtual path - p = getUserProfilePath(); - Glib::ustring fullPath = Glib::build_filename (p, profName.substr (5) + paramFileExtension); - - if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { - return Glib::path_get_dirname (fullPath); - } - } else if (p == "${G}") { - // the path starts by the User virtual path - p = getGlobalProfilePath(); - Glib::ustring fullPath = Glib::build_filename (p, profName.substr (5) + paramFileExtension); - - if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { - return Glib::path_get_dirname (fullPath); - } - } else { - // compatibility case -> convert the path to the new format - p = getUserProfilePath(); - Glib::ustring fullPath = Glib::build_filename (p, profName + paramFileExtension); - - if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { - // update the profile path - profName = Glib::build_filename ("${U}", profName); - return Glib::path_get_dirname (fullPath); - } - - p = getGlobalProfilePath(); - fullPath = Glib::build_filename (p, profName + paramFileExtension); - - if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { - profName = Glib::build_filename ("${G}", profName); - return Glib::path_get_dirname (fullPath); - } - } - - return ""; - -} - -void Options::setDefaults () -{ - - windowWidth = 1200; - windowHeight = 680; - windowX = 0; - windowY = 0; - windowMaximized = true; - windowMonitor = 0; - meowMonitor = -1; - meowFullScreen = false; - meowMaximized = true; - meowWidth = 1200; - meowHeight = 680; - meowX = 0; - meowY = 0; - saveAsDialogWidth = 920; - saveAsDialogHeight = 680; - savesParamsAtExit = true; - saveFormat.format = "jpg"; - saveFormat.jpegQuality = 92; - saveFormat.jpegSubSamp = 2; - saveFormat.pngCompression = 6; - saveFormat.pngBits = 8; - saveFormat.tiffBits = 16; - saveFormat.tiffUncompressed = true; - saveFormat.saveParams = true; - - saveFormatBatch.format = "jpg"; - saveFormatBatch.jpegQuality = 92; - saveFormatBatch.jpegSubSamp = 2; - saveFormatBatch.pngCompression = 6; - saveFormatBatch.pngBits = 8; - saveFormatBatch.tiffBits = 16; - saveFormatBatch.tiffUncompressed = true; - saveFormatBatch.saveParams = true; - - savePathTemplate = "%p1/converted/%f"; - savePathFolder = ""; - saveUsePathTemplate = true; - defProfRaw = DEFPROFILE_RAW; - defProfImg = DEFPROFILE_IMG; - dateFormat = "%y-%m-%d"; - adjusterMinDelay = 100; - adjusterMaxDelay = 200; - startupDir = STARTUPDIR_LAST; - startupPath = ""; - useBundledProfiles = true; - detailWindowWidth = -1; - detailWindowHeight = -1; - dirBrowserWidth = 260; - dirBrowserHeight = 350; - dirBrowserSortType = Gtk::SORT_ASCENDING; - preferencesWidth = 800; - preferencesHeight = 0; - toolPanelWidth = 400; - browserToolPanelWidth = 465; - browserToolPanelHeight = 600; - browserToolPanelOpened = true;; - browserDirPanelOpened = true; - editorFilmStripOpened = true; - historyPanelWidth = 330; - fontFamily = "default"; - fontSize = 10; - CPFontFamily = "default"; - CPFontSize = 8; - lastScale = 5; - panAccelFactor = 5; - rememberZoomAndPan = true; - lastCropSize = 1; - fbOnlyRaw = false; - fbShowDateTime = true; - fbShowBasicExif = true; - fbShowExpComp = false; - fbShowHidden = false; - fbArrangement = 2; // was 0 - navRGBUnit = NavigatorUnit::PERCENT; - navHSVUnit = NavigatorUnit::PERCENT; - multiUser = true; - profilePath = "profiles"; - loadSaveProfilePath = ""; // will be corrected in load as otherwise construction fails - version = "0.0.0.0"; // temporary value; will be correctly set in RTWindow::on_realize - thumbSize = 160; - thumbSizeTab = 160; - thumbSizeQueue = 160; - sameThumbSize = false; // preferring speed of switch between file browser and single editor tab - showHistory = true; - showFilePanelState = 0; // Not used anymore ; was the thumb strip state - showInfo = true; - cropPPI = 600; - showClippedHighlights = false; - showClippedShadows = false; - highlightThreshold = 253; // was 254 - shadowThreshold = 8; // was 0 - bgcolor = 0; - blinkClipped = false; - language = DefaultLanguage; - languageAutoDetect = langMgr.isOSLanguageDetectSupported(); - lastSaveAsPath = ""; - overwriteOutputFile = false; // if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. - theme = "RawTherapee"; - maxThumbnailHeight = 250; - maxCacheEntries = 20000; - thumbInterp = 1; - autoSuffix = true; - forceFormatOpts = true; - saveMethodNum = 0; // 0->immediate, 1->putToQueuHead, 2->putToQueueTail - saveParamsFile = true; // was false, but saving the procparams files next to the file make more sense when reorganizing file tree than in a cache - saveParamsCache = false; // there's no need to save the procparams files in a cache if saveParamsFile is true - paramsLoadLocation = PLL_Input; // was PLL_Cache - procQueueEnabled = false; - gimpDir = ""; - psDir = ""; - customEditorProg = ""; - CPBKeys = CPBKT_TID; - editorToSendTo = 1; - favoriteDirs.clear(); - tpOpen.clear (); - autoSaveTpOpen = true; - //crvOpen.clear (); - parseExtensions.clear (); - parseExtensionsEnabled.clear (); - parsedExtensions.clear (); - renameUseTemplates = false; - renameTemplates.clear (); - thumbnailZoomRatios.clear (); - thumbnailZoomRatios.push_back (0.2); - thumbnailZoomRatios.push_back (0.3); - thumbnailZoomRatios.push_back (0.45); - thumbnailZoomRatios.push_back (0.6); - thumbnailZoomRatios.push_back (0.8); - thumbnailZoomRatios.push_back (1.0); - overlayedFileNames = false; - filmStripOverlayedFileNames = false; - internalThumbIfUntouched = true; // if TRUE, only fast, internal preview images are taken if the image is not edited yet - showFileNames = true; - filmStripShowFileNames = false; - tabbedUI = false; - mainNBVertical = true; - multiDisplayMode = 0; - tunnelMetaData = true; - histogramPosition = 1; - histogramBar = true; - histogramFullMode = false; - curvebboxpos = 1; - prevdemo = PD_Sidecar; - rgbDenoiseThreadLimit = 0; -#if defined( _OPENMP ) && defined( __x86_64__ ) - clutCacheSize = omp_get_num_procs(); -#else - clutCacheSize = 1; -#endif - filledProfile = false; - maxInspectorBuffers = 2; // a rather conservative value for low specced systems... - serializeTiffRead = true; - - FileBrowserToolbarSingleRow = false; - hideTPVScrollbar = false; - UseIconNoText = true; - whiteBalanceSpotSize = 8; - showFilmStripToolBar = false; - menuGroupRank = true; - menuGroupLabel = true; - menuGroupFileOperations = true; - menuGroupProfileOperations = true; - menuGroupExtProg = true; - - fastexport_bypass_sharpening = true; - fastexport_bypass_sharpenEdge = true; - fastexport_bypass_sharpenMicro = true; - //fastexport_bypass_lumaDenoise = true; - //fastexport_bypass_colorDenoise = true; - fastexport_bypass_defringe = true; - fastexport_bypass_dirpyrDenoise = true; - fastexport_bypass_sh_hq = true; - fastexport_bypass_dirpyrequalizer = true; - fastexport_bypass_wavelet = true; - fastexport_raw_bayer_method = "fast"; - //fastexport_bypass_raw_bayer_all_enhance = true; - fastexport_bypass_raw_bayer_dcb_iterations = true; - fastexport_bypass_raw_bayer_dcb_enhance = true; - fastexport_bypass_raw_bayer_lmmse_iterations = true; - fastexport_bypass_raw_bayer_linenoise = true; - fastexport_bypass_raw_bayer_greenthresh = true; - fastexport_raw_xtrans_method = "fast"; - fastexport_bypass_raw_ccSteps = true; - fastexport_bypass_raw_ca = true; - fastexport_bypass_raw_df = true; - fastexport_bypass_raw_ff = true; - fastexport_icm_input = "(camera)"; - fastexport_icm_working = "ProPhoto"; - fastexport_icm_output = "RT_sRGB"; - fastexport_icm_outputIntent = rtengine::RI_RELATIVE; - fastexport_icm_outputBPC = true; - fastexport_icm_gamma = "default"; - fastexport_resize_enabled = true; - fastexport_resize_scale = 1; - fastexport_resize_appliesTo = "Cropped area"; - fastexport_resize_method = "Lanczos"; - fastexport_resize_dataspec = 3; - fastexport_resize_width = 900; - fastexport_resize_height = 900; - fastexport_use_fast_pipeline = true; - - clutsDir = "./cluts"; - - cutOverlayBrush = std::vector (4); - cutOverlayBrush[3] = 0.667; // :-p - - navGuideBrush = std::vector (4); - //default to red - navGuideBrush[0] = 1.0; - navGuideBrush[1] = 0.0; - navGuideBrush[2] = 0.0; - navGuideBrush[3] = 1.0; - - sndEnable = true; - sndLngEditProcDoneSecs = 3.0; -#ifdef __linux__ - sndBatchQueueDone = "complete"; - sndLngEditProcDone = "window-attention"; -#endif - - // Reminder: 0 = SET mode, 1 = ADD mode - baBehav = { - 1, // ADDSET_TC_EXPCOMP - 1, // ADDSET_TC_BRIGHTNESS - 1, // ADDSET_TC_BLACKLEVEL - 1, // ADDSET_TC_CONTRAST - 1, // ADDSET_SH_HIGHLIGHTS - 1, // ADDSET_SH_SHADOWS - 1, // ADDSET_SH_LOCALCONTRAST - 1, // ADDSET_LC_BRIGHTNESS - 1, // ADDSET_LC_CONTRAST - 1, // ADDSET_SHARP_AMOUNT - 1, // ADDSET_WB_TEMPERATURE - 1, // ADDSET_WB_GREEN - 1, // ADDSET_ROTATE_DEGREE - 1, // ADDSET_DIST_AMOUNT - 1, // ADDSET_PERSPECTIVE - 1, // ADDSET_CA - 1, // ADDSET_VIGN_AMOUNT - 1, // ADDSET_VIGN_RADIUS - 1, // ADDSET_VIGN_STRENGTH - 1, // ADDSET_VIGN_CENTER - 1, // ADDSET_LC_CHROMATICITY - 1, // ADDSET_TC_SATURATION - 1, // ADDSET_TC_HLCOMPAMOUNT - 1, // ADDSET_TC_HLCOMPTHRESH - 1, // ADDSET_TC_SHCOMP - 1, // ADDSET_DIRPYREQ - 1, // ADDSET_DIRPYRDN_LUMA - 1, // ADDSET_DIRPYRDN_LUDET - 1, // ADDSET_DIRPYRDN_CHROMA - 1, // ADDSET_DIRPYRDN_CHROMARED - 1, // ADDSET_DIRPYRDN_CHROMABLUE - 1, // ADDSET_DIRPYRDN_GAMMA - 1, // ADDSET_CHMIXER - 1, // ADDSET_PREPROCESS_GREENEQUIL - 1, // ADDSET_PREPROCESS_LINEDENOISE - 1, // ADDSET_RAWCACORR - 1, // ADDSET_RAWEXPOS_LINEAR - 1, // ADDSET_RAWEXPOS_PRESER - 1, // ADDSET_RAWEXPOS_BLACKS - 1, // ADDSET_SHARPENEDGE_AMOUNT - 1, // ADDSET_SHARPENMICRO_AMOUNT - 1, // ADDSET_SHARPENEDGE_PASS - 1, // ADDSET_SHARPENMICRO_UNIFORMITY - 1, // ADDSET_VIBRANCE_PASTELS - 1, // ADDSET_VIBRANCE_SATURATED - 1, // ADDSET_FREE_OUPUT_GAMMA - 1, // ADDSET_FREE_OUTPUT_SLOPE - 1, // ADDSET_CAT_DEGREE - 1, // ADDSET_CAT_ADAPSCEN - 1, // ADDSET_CAT_ADAPLUM - 1, // ADDSET_CAT_LIGHT - 1, // ADDSET_CAT_RSTPRO - 1, // ADDSET_CAT_BADPIX - 1, // ADDSET_CAT_JLIGHT - 1, // ADDSET_CAT_CHROMA - 1, // ADDSET_CAT_CONTRAST - 1, // ADDSET_CAT_CHROMA_S - 1, // ADDSET_CAT_CHROMA_M - 1, // ADDSET_CAT_HUE - 1, // ADDSET_CAT_BADPIX - 1, // ADDSET_WB_EQUAL - 1, // ADDSET_GRADIENT_DEGREE - 1, // ADDSET_GRADIENT_FEATHER - 1, // ADDSET_GRADIENT_STRENGTH - 1, // ADDSET_GRADIENT_CENTER - 1, // ADDSET_PCVIGNETTE_STRENGTH - 1, // ADDSET_PCVIGNETTE_FEATHER - 1, // ADDSET_PCVIGNETTE_ROUNDNESS - 1, // ADDSET_BLACKWHITE_HUES - 1, // ADDSET_BLACKWHITE_GAMMA - 1, // ADDSET_DIRPYREQ_THRESHOLD - 1, // ADDSET_DIRPYREQ_SKINPROTECT - 1, // ADDSET_COLORTONING_SPLIT - 1, // ADDSET_COLORTONING_SATTHRESHOLD - 1, // ADDSET_COLORTONING_SATOPACITY - 1, // ADDSET_COLORTONING_BALANCE - 1, // ADDSET_COLORTONING_STRENGTH - 1, // ADDSET_DIRPYRDN_PASSES - 1, // ADDSET_RAWFFCLIPCONTROL - 1, // ADDSET_FILMSIMULATION_STRENGTH - 1, // ADDSET_WA - 1, // ADDSET_WA_SKINPROTECT - 1, // ADDSET_WA_THRESHOLD2 - 1, // ADDSET_WA_THRR - 1, // ADDSET_WA_THRRH - 1, // ADDSET_WA_THRESHOLD - 1, // ADDSET_WA_THRESHOLD2 - 1, // ADDSET_WA_CHRO - 1, // ADDSET_WA_CHROMA - 1, // ADDSET_WA_CONTRAST - 1, // ADDSET_WA_RESCON - 1, // ADDSET_WA_RESCONH - 1, // ADDSET_WA_RESCHRO - 1, // ADDSET_WA_SKYPROTECT - 1, // ADDSET_WA_EDGRAD - 1, // ADDSET_WA_EDGVAL - 1, // ADDSET_WA_STRENGTH - 1, // ADDSET_WA_EDGEDETECT - 1, // ADDSET_WA_EDGEDETECTTHR - 1, // ADDSET_WA_EDGEDETECTTHR2 - 1, // ADDSET_WA_TMRS - 1, // ADDSET_WA_GAMMA - 1, // ADDSET_RETI_STR - 1, // ADDSET_RETI_NEIGH - 1, // ADDSET_RETI_LIMD - 1, // ADDSET_RETI_GAIN - 1, // ADDSET_RETI_OFFS - 1, // ADDSET_RETI_VART - 1, // ADDSET_RETI_GAM - 1, // ADDSET_RETI_SLO - 1, // ADDSET_WB_TEMPBIAS - }; - - rtSettings.darkFramesPath = ""; - rtSettings.flatFieldsPath = ""; -#ifdef WIN32 - const gchar* sysRoot = g_getenv ("SystemRoot"); // Returns e.g. "c:\Windows" - - if (sysRoot != NULL) { - rtSettings.iccDirectory = Glib::ustring (sysRoot) + Glib::ustring ("\\System32\\spool\\drivers\\color"); - } else { - rtSettings.iccDirectory = "C:\\WINDOWS\\System32\\spool\\drivers\\color"; - } - -#elif defined __APPLE__ - rtSettings.iccDirectory = "/library/ColorSync/Profiles/Displays"; -#else - rtSettings.iccDirectory = "/usr/share/color/icc"; -#endif -// rtSettings.viewingdevice = 0; -// rtSettings.viewingdevicegrey = 3; - // rtSettings.viewinggreySc = 1; - rtSettings.leveldnv = 2; - rtSettings.leveldnti = 0; - rtSettings.leveldnaut = 0; - rtSettings.leveldnliss = 0; - rtSettings.leveldnautsimpl = 0; - - rtSettings.printerProfile = Glib::ustring(); - rtSettings.printerIntent = rtengine::RI_RELATIVE; - rtSettings.printerBPC = true; - rtSettings.monitorProfile = Glib::ustring(); - rtSettings.monitorIntent = rtengine::RI_RELATIVE; - rtSettings.monitorBPC = true; - rtSettings.autoMonitorProfile = false; - rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows) - rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile" - rtSettings.prophoto10 = "RT_Large_g10"; // these names appear in the menu "output profile" - rtSettings.srgb10 = "RT_sRGB_g10"; - rtSettings.widegamut = "WideGamutRGB"; - rtSettings.srgb = "RT_sRGB"; - rtSettings.bruce = "Bruce"; - rtSettings.beta = "BetaRGB"; - rtSettings.best = "BestRGB"; - rtSettings.rec2020 = "Rec2020"; - rtSettings.verbose = false; - rtSettings.gamutICC = true; - rtSettings.gamutLch = true; - rtSettings.amchroma = 40;//between 20 and 140 low values increase effect..and also artefacts, high values reduces - rtSettings.artifact_cbdl = 4.; - rtSettings.level0_cbdl = 0; - rtSettings.level123_cbdl = 30; - rtSettings.bot_left = 0; - rtSettings.top_left = 10; - rtSettings.top_right = 40; - rtSettings.bot_right = 75; - rtSettings.ed_detec = 3; //between 2 and 10 - rtSettings.ed_detecStr = 1.3; //not use - rtSettings.ed_low = 15.; //between 5 to 40 - rtSettings.ed_lipinfl = 0.8; //between 0.5 to 0.9 - rtSettings.ed_lipampl = 1.1; //between 1 and 2 - - - rtSettings.ciecamfloat = true; - rtSettings.protectred = 60; - rtSettings.protectredh = 0.3; - rtSettings.CRI_color = 0; - rtSettings.autocielab = true; - rtSettings.denoiselabgamma = 2; - rtSettings.HistogramWorking = false; - - rtSettings.daubech = false; - - rtSettings.nrauto = 10;//between 2 and 20 - rtSettings.nrautomax = 40;//between 5 and 100 - rtSettings.nrhigh = 0.45;//between 0.1 and 0.9 - rtSettings.nrwavlevel = 1;//integer between 0 and 2 - -// rtSettings.colortoningab =0.7; -//rtSettings.decaction =0.3; -// rtSettings.ciebadpixgauss=false; - rtSettings.rgbcurveslumamode_gamut = true; - lastIccDir = rtSettings.iccDirectory; - lastDarkframeDir = rtSettings.darkFramesPath; - lastFlatfieldDir = rtSettings.flatFieldsPath; -// rtSettings.bw_complementary = true; - // There is no reasonable default for curves. We can still suppose that they will take place - // in a subdirectory of the user's own ProcParams presets, i.e. in a subdirectory - // of the one pointed to by the "profile" field. - // The following fields will then be initialized when "profile" will have its final value, - // at the end of the "updatePaths" method. - lastRgbCurvesDir = ""; - lastLabCurvesDir = ""; - lastRetinexDir = ""; - lastDenoiseCurvesDir = ""; - lastWaveletCurvesDir = ""; - lastPFCurvesDir = ""; - lastHsvCurvesDir = ""; - lastToneCurvesDir = ""; - lastVibranceCurvesDir = ""; - lastProfilingReferenceDir = ""; - lastBWCurvesDir = ""; - lastLensProfileDir = ""; - gimpPluginShowInfoDialog = true; - maxRecentFolders = 15; - - rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; - std::cout << "." << rtSettings.lensfunDbDirectory << "." << std::endl; -} - -Options* Options::copyFrom (Options* other) -{ - *this = *other; - return this; -} - -void Options::filterOutParsedExtensions () -{ - parsedExtensions.clear(); - - for (unsigned int i = 0; i < parseExtensions.size(); i++) - if (parseExtensionsEnabled[i]) { - parsedExtensions.push_back (parseExtensions[i].lowercase()); - } -} - -void Options::readFromFile (Glib::ustring fname) -{ - setlocale (LC_NUMERIC, "C"); // to set decimal point to "." - - Glib::KeyFile keyFile; - - if ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { - Glib::ustring msg = Glib::ustring::compose ("Options file %1 does not exist", fname); - throw Error (msg); - } - - try { - if (keyFile.load_from_file (fname)) { - -// -------------------------------------------------------------------------------------------------------- - - if (keyFile.has_group ("General")) { - if (keyFile.has_key ("General", "TabbedEditor")) { - tabbedUI = keyFile.get_boolean ("General", "TabbedEditor"); - } - - if (keyFile.has_key ("General", "StartupDirectory")) { - if ( keyFile.get_string ("General", "StartupDirectory") == "home") { - startupDir = STARTUPDIR_HOME; - } else if ( keyFile.get_string ("General", "StartupDirectory") == "current") { - startupDir = STARTUPDIR_CURRENT; - } else if ( keyFile.get_string ("General", "StartupDirectory") == "last") { - startupDir = STARTUPDIR_LAST; - } else if ( keyFile.get_string ("General", "StartupDirectory") == "custom") { - startupDir = STARTUPDIR_CUSTOM; - } - } - - if (keyFile.has_key ("General", "StartupPath")) { - startupPath = keyFile.get_string ("General", "StartupPath"); - } - - if (keyFile.has_key ("General", "DateFormat")) { - dateFormat = keyFile.get_string ("General", "DateFormat"); - } - - if (keyFile.has_key ("General", "AdjusterMinDelay")) { - adjusterMinDelay = keyFile.get_integer ("General", "AdjusterMinDelay"); - } - - if (keyFile.has_key ("General", "AdjusterMaxDelay")) { - adjusterMaxDelay = keyFile.get_integer ("General", "AdjusterMaxDelay"); - } - - if (keyFile.has_key ("General", "StoreLastProfile")) { - savesParamsAtExit = keyFile.get_boolean ("General", "StoreLastProfile"); - } - - if (keyFile.has_key ("General", "MultiUser")) { - multiUser = keyFile.get_boolean ("General", "MultiUser"); - } - - if (keyFile.has_key ("General", "Version")) { - version = keyFile.get_string ("General", "Version"); - } - - if (keyFile.has_key ("General", "Language")) { - language = keyFile.get_string ("General", "Language"); - } - - if (keyFile.has_key ("General", "LanguageAutoDetect")) { - languageAutoDetect = keyFile.get_boolean ("General", "LanguageAutoDetect"); - } - - if (keyFile.has_key ("General", "Theme")) { - theme = keyFile.get_string ("General", "Theme"); - } - - if ( keyFile.has_key ("General", "DarkFramesPath")) { - rtSettings.darkFramesPath = keyFile.get_string ("General", "DarkFramesPath"); - } - - if ( keyFile.has_key ("General", "FlatFieldsPath")) { - rtSettings.flatFieldsPath = keyFile.get_string ("General", "FlatFieldsPath"); - } - - if ( keyFile.has_key ("General", "Verbose")) { - rtSettings.verbose = keyFile.get_boolean ( "General", "Verbose"); - } - - if (keyFile.has_key ("General", "BotLeft")) { - rtSettings.bot_left = keyFile.get_double ("General", "BotLeft"); - } - - if (keyFile.has_key ("General", "TopLeft")) { - rtSettings.top_left = keyFile.get_double ("General", "TopLeft"); - } - - if (keyFile.has_key ("General", "TopRight")) { - rtSettings.top_right = keyFile.get_double ("General", "TopRight"); - } - - if (keyFile.has_key ("General", "BotRight")) { - rtSettings.bot_right = keyFile.get_double ("General", "BotRight"); - } - - if (keyFile.has_key ("General", "EDdetec")) { - rtSettings.ed_detec = keyFile.get_double ("General", "EDdetec"); - } - - if (keyFile.has_key ("General", "EDdetecStr")) { - rtSettings.ed_detecStr = keyFile.get_double ("General", "EDdetecStr"); - } - - if (keyFile.has_key ("General", "EDLow")) { - rtSettings.ed_low = keyFile.get_double ("General", "EDLow"); - } - - if (keyFile.has_key ("General", "EDLipinfl")) { - rtSettings.ed_lipinfl = keyFile.get_double ("General", "EDLipinfl"); - } - - if (keyFile.has_key ("General", "EDLipampl")) { - rtSettings.ed_lipampl = keyFile.get_double ("General", "EDLipampl"); - } - - - } - - if (keyFile.has_group ("External Editor")) { - if (keyFile.has_key ("External Editor", "EditorKind")) { - editorToSendTo = keyFile.get_integer ("External Editor", "EditorKind"); - } - - if (keyFile.has_key ("External Editor", "GimpDir")) { - gimpDir = keyFile.get_string ("External Editor", "GimpDir"); - } - - if (keyFile.has_key ("External Editor", "PhotoshopDir")) { - psDir = keyFile.get_string ("External Editor", "PhotoshopDir"); - } - - if (keyFile.has_key ("External Editor", "CustomEditor")) { - customEditorProg = keyFile.get_string ("External Editor", "CustomEditor"); - } - } - - if (keyFile.has_group ("Output")) { - if (keyFile.has_key ("Output", "Format")) { - saveFormat.format = keyFile.get_string ("Output", "Format"); - } - - if (keyFile.has_key ("Output", "JpegQuality")) { - saveFormat.jpegQuality = keyFile.get_integer ("Output", "JpegQuality"); - } - - if (keyFile.has_key ("Output", "JpegSubSamp")) { - saveFormat.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSamp"); - } - - if (keyFile.has_key ("Output", "PngCompression")) { - saveFormat.pngCompression = keyFile.get_integer ("Output", "PngCompression"); - } - - if (keyFile.has_key ("Output", "PngBps")) { - saveFormat.pngBits = keyFile.get_integer ("Output", "PngBps"); - } - - if (keyFile.has_key ("Output", "TiffBps")) { - saveFormat.tiffBits = keyFile.get_integer ("Output", "TiffBps"); - } - - if (keyFile.has_key ("Output", "TiffUncompressed")) { - saveFormat.tiffUncompressed = keyFile.get_boolean ("Output", "TiffUncompressed"); - } - - if (keyFile.has_key ("Output", "SaveProcParams")) { - saveFormat.saveParams = keyFile.get_boolean ("Output", "SaveProcParams"); - } - - - if (keyFile.has_key ("Output", "FormatBatch")) { - saveFormatBatch.format = keyFile.get_string ("Output", "FormatBatch"); - } - - if (keyFile.has_key ("Output", "JpegQualityBatch")) { - saveFormatBatch.jpegQuality = keyFile.get_integer ("Output", "JpegQualityBatch"); - } - - if (keyFile.has_key ("Output", "JpegSubSampBatch")) { - saveFormatBatch.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSampBatch"); - } - - if (keyFile.has_key ("Output", "PngCompressionBatch")) { - saveFormatBatch.pngCompression = keyFile.get_integer ("Output", "PngCompressionBatch"); - } - - if (keyFile.has_key ("Output", "PngBpsBatch")) { - saveFormatBatch.pngBits = keyFile.get_integer ("Output", "PngBpsBatch"); - } - - if (keyFile.has_key ("Output", "TiffBpsBatch")) { - saveFormatBatch.tiffBits = keyFile.get_integer ("Output", "TiffBpsBatch"); - } - - if (keyFile.has_key ("Output", "TiffUncompressedBatch")) { - saveFormatBatch.tiffUncompressed = keyFile.get_boolean ("Output", "TiffUncompressedBatch"); - } - - if (keyFile.has_key ("Output", "SaveProcParamsBatch")) { - saveFormatBatch.saveParams = keyFile.get_boolean ("Output", "SaveProcParamsBatch"); - } - - if (keyFile.has_key ("Output", "Path")) { - savePathTemplate = keyFile.get_string ("Output", "Path"); - } - - if (keyFile.has_key ("Output", "PathTemplate")) { - savePathTemplate = keyFile.get_string ("Output", "PathTemplate"); - } - - if (keyFile.has_key ("Output", "PathFolder")) { - savePathFolder = keyFile.get_string ("Output", "PathFolder"); - } - - if (keyFile.has_key ("Output", "AutoSuffix")) { - autoSuffix = keyFile.get_boolean ("Output", "AutoSuffix"); - } - - if (keyFile.has_key ("Output", "ForceFormatOpts")) { - forceFormatOpts = keyFile.get_boolean ("Output", "ForceFormatOpts"); - } - - if (keyFile.has_key ("Output", "SaveMethodNum")) { - saveMethodNum = keyFile.get_integer ("Output", "SaveMethodNum"); - } - - if (keyFile.has_key ("Output", "UsePathTemplate")) { - saveUsePathTemplate = keyFile.get_boolean ("Output", "UsePathTemplate"); - } - - if (keyFile.has_key ("Output", "LastSaveAsPath")) { - lastSaveAsPath = keyFile.get_string ("Output", "LastSaveAsPath"); - } - - if (keyFile.has_key ("Output", "OverwriteOutputFile")) { - overwriteOutputFile = keyFile.get_boolean ("Output", "OverwriteOutputFile"); - } - - if (keyFile.has_key ("Output", "TunnelMetaData")) { - tunnelMetaData = keyFile.get_boolean ("Output", "TunnelMetaData"); - } - } - - if (keyFile.has_group ("Profiles")) { - if (keyFile.has_key ("Profiles", "Directory")) { - profilePath = keyFile.get_string ("Profiles", "Directory"); - } - - if (keyFile.has_key ("Profiles", "UseBundledProfiles")) { - useBundledProfiles = keyFile.get_boolean ("Profiles", "UseBundledProfiles"); - } - - if (keyFile.has_key ("Profiles", "LoadSaveProfilePath")) { - loadSaveProfilePath = keyFile.get_string ("Profiles", "LoadSaveProfilePath"); - } - - if (keyFile.has_key ("Profiles", "RawDefault")) { - defProfRaw = keyFile.get_string ("Profiles", "RawDefault"); - } - - if (keyFile.has_key ("Profiles", "ImgDefault")) { - defProfImg = keyFile.get_string ("Profiles", "ImgDefault"); - } - - if (keyFile.has_key ("Profiles", "FilledProfile")) { - filledProfile = keyFile.get_boolean ("Profiles", "FilledProfile"); - } - - if (keyFile.has_key ("Profiles", "SaveParamsWithFile")) { - saveParamsFile = keyFile.get_boolean ("Profiles", "SaveParamsWithFile"); - } - - if (keyFile.has_key ("Profiles", "SaveParamsToCache")) { - saveParamsCache = keyFile.get_boolean ("Profiles", "SaveParamsToCache"); - } - - if (keyFile.has_key ("Profiles", "LoadParamsFromLocation")) { - paramsLoadLocation = (PPLoadLocation)keyFile.get_integer ("Profiles", "LoadParamsFromLocation"); - } - - if (keyFile.has_key ("Profiles", "CustomProfileBuilder")) { - CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilder"); // for backward compatibility only - } - - if (keyFile.has_key ("Profiles", "CustomProfileBuilderPath")) { - CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilderPath"); - } - - if (keyFile.has_key ("Profiles", "CustomProfileBuilderKeys")) { - CPBKeys = (CPBKeyType)keyFile.get_integer ("Profiles", "CustomProfileBuilderKeys"); - } - } - - if (keyFile.has_group ("File Browser")) { - if (keyFile.has_key ("File Browser", "ThumbnailSize")) { - thumbSize = keyFile.get_integer ("File Browser", "ThumbnailSize"); - } - - if (keyFile.has_key ("File Browser", "ThumbnailSizeTab")) { - thumbSizeTab = keyFile.get_integer ("File Browser", "ThumbnailSizeTab"); - } - - if (keyFile.has_key ("File Browser", "ThumbnailSizeQueue")) { - thumbSizeQueue = keyFile.get_integer ("File Browser", "ThumbnailSizeQueue"); - } - - if (keyFile.has_key ("File Browser", "SameThumbSize")) { - sameThumbSize = keyFile.get_integer ("File Browser", "SameThumbSize"); - } - - if (keyFile.has_key ("File Browser", "BrowseOnlyRaw")) { - fbOnlyRaw = keyFile.get_boolean ("File Browser", "BrowseOnlyRaw"); - } - - if (keyFile.has_key ("File Browser", "BrowserShowsDate")) { - fbShowDateTime = keyFile.get_boolean ("File Browser", "BrowserShowsDate"); - } - - if (keyFile.has_key ("File Browser", "BrowserShowsExif")) { - fbShowBasicExif = keyFile.get_boolean ("File Browser", "BrowserShowsExif"); - } - - if (keyFile.has_key ("File Browser", "BrowserShowsExpComp")) { - fbShowExpComp = keyFile.get_boolean ("File Browser", "BrowserShowsExpComp"); - } - - if (keyFile.has_key ("File Browser", "BrowserShowsHidden")) { - fbShowHidden = keyFile.get_boolean ("File Browser", "BrowserShowsHidden"); - } - - if (keyFile.has_key ("File Browser", "MaxPreviewHeight")) { - maxThumbnailHeight = keyFile.get_integer ("File Browser", "MaxPreviewHeight"); - } - - if (keyFile.has_key ("File Browser", "MaxCacheEntries")) { - maxCacheEntries = keyFile.get_integer ("File Browser", "MaxCacheEntries"); - } - - if (keyFile.has_key ("File Browser", "ParseExtensions")) { - parseExtensions = keyFile.get_string_list ("File Browser", "ParseExtensions"); - } - - if (keyFile.has_key ("File Browser", "ParseExtensionsEnabled")) { - parseExtensionsEnabled = keyFile.get_integer_list ("File Browser", "ParseExtensionsEnabled"); - } - - if (keyFile.has_key ("File Browser", "ThumbnailArrangement")) { - fbArrangement = keyFile.get_integer ("File Browser", "ThumbnailArrangement"); - } - - if (keyFile.has_key ("File Browser", "ThumbnailInterpolation")) { - thumbInterp = keyFile.get_integer ("File Browser", "ThumbnailInterpolation"); - } - - if (keyFile.has_key ("File Browser", "FavoriteDirs")) { - favoriteDirs = keyFile.get_string_list ("File Browser", "FavoriteDirs"); - } - - if (keyFile.has_key ("File Browser", "RenameTemplates")) { - renameTemplates = keyFile.get_string_list ("File Browser", "RenameTemplates"); - } - - if (keyFile.has_key ("File Browser", "RenameUseTemplates")) { - renameUseTemplates = keyFile.get_boolean ("File Browser", "RenameUseTemplates"); - } - - if (keyFile.has_key ("File Browser", "ThumbnailZoomRatios")) { - thumbnailZoomRatios = keyFile.get_double_list ("File Browser", "ThumbnailZoomRatios"); - } - - if (keyFile.has_key ("File Browser", "OverlayedFileNames")) { - overlayedFileNames = keyFile.get_boolean ("File Browser", "OverlayedFileNames"); - } - - if (keyFile.has_key ("File Browser", "FilmStripOverlayedFileNames")) { - filmStripOverlayedFileNames = keyFile.get_boolean ("File Browser", "FilmStripOverlayedFileNames"); - } - - if (keyFile.has_key ("File Browser", "ShowFileNames")) { - showFileNames = keyFile.get_boolean ("File Browser", "ShowFileNames"); - } - - if (keyFile.has_key ("File Browser", "FilmStripShowFileNames")) { - filmStripShowFileNames = keyFile.get_boolean ("File Browser", "FilmStripShowFileNames"); - } - - if (keyFile.has_key ("File Browser", "InternalThumbIfUntouched")) { - internalThumbIfUntouched = keyFile.get_boolean ("File Browser", "InternalThumbIfUntouched"); - } - - if (keyFile.has_key ("File Browser", "menuGroupRank")) { - menuGroupRank = keyFile.get_boolean ("File Browser", "menuGroupRank"); - } - - if (keyFile.has_key ("File Browser", "menuGroupLabel")) { - menuGroupLabel = keyFile.get_boolean ("File Browser", "menuGroupLabel"); - } - - if (keyFile.has_key ("File Browser", "menuGroupFileOperations")) { - menuGroupFileOperations = keyFile.get_boolean ("File Browser", "menuGroupFileOperations"); - } - - if (keyFile.has_key ("File Browser", "menuGroupProfileOperations")) { - menuGroupProfileOperations = keyFile.get_boolean ("File Browser", "menuGroupProfileOperations"); - } - - if (keyFile.has_key ("File Browser", "menuGroupExtProg")) { - menuGroupExtProg = keyFile.get_boolean ("File Browser", "menuGroupExtProg"); - } - - if (keyFile.has_key ("File Browser", "MaxRecentFolders")) { - maxRecentFolders = keyFile.get_integer ("File Browser", "MaxRecentFolders"); - } - - recentFolders.reserve (maxRecentFolders + 10); // reserve some more than maxRecentFolders, because at runtime it stores more than that - - if (keyFile.has_key ("File Browser", "RecentFolders")) { - recentFolders = keyFile.get_string_list ("File Browser", "RecentFolders"); - } - } - - if (keyFile.has_group ("Clipping Indication")) { - if (keyFile.has_key ("Clipping Indication", "HighlightThreshold")) { - highlightThreshold = keyFile.get_integer ("Clipping Indication", "HighlightThreshold"); - } - - if (keyFile.has_key ("Clipping Indication", "ShadowThreshold")) { - shadowThreshold = keyFile.get_integer ("Clipping Indication", "ShadowThreshold"); - } - - if (keyFile.has_key ("Clipping Indication", "BlinkClipped")) { - blinkClipped = keyFile.get_boolean ("Clipping Indication", "BlinkClipped"); - } - } - - if (keyFile.has_group ("Performance")) { - if (keyFile.has_key ("Performance", "RgbDenoiseThreadLimit")) { - rgbDenoiseThreadLimit = keyFile.get_integer ("Performance", "RgbDenoiseThreadLimit"); - } - - if ( keyFile.has_key ("Performance", "NRauto")) { - rtSettings.nrauto = keyFile.get_double ("Performance", "NRauto"); - } - - if ( keyFile.has_key ("Performance", "NRautomax")) { - rtSettings.nrautomax = keyFile.get_double ("Performance", "NRautomax"); - } - - if ( keyFile.has_key ("Performance", "NRhigh")) { - rtSettings.nrhigh = keyFile.get_double ("Performance", "NRhigh"); - } - - if (rtSettings.nrhigh == 0.0) { //avoid crash by division by zero in noise reduction - rtSettings.nrhigh = 0.45; - } - - if ( keyFile.has_key ("Performance", "NRWavlevel")) { - rtSettings.nrwavlevel = keyFile.get_integer ("Performance", "NRWavlevel"); - } - - if (keyFile.has_key ("Performance", "LevNR")) { - rtSettings.leveldnv = keyFile.get_integer ("Performance", "LevNR"); - } - - if (keyFile.has_key ("Performance", "LevNRTI")) { - rtSettings.leveldnti = keyFile.get_integer ("Performance", "LevNRTI"); - } - - if (keyFile.has_key ("Performance", "LevNRAUT")) { - rtSettings.leveldnaut = keyFile.get_integer ("Performance", "LevNRAUT"); - } - - if (keyFile.has_key ("Performance", "LevNRLISS")) { - rtSettings.leveldnliss = keyFile.get_integer ("Performance", "LevNRLISS"); - } - - if (keyFile.has_key ("Performance", "SIMPLNRAUT")) { - rtSettings.leveldnautsimpl = keyFile.get_integer ("Performance", "SIMPLNRAUT"); - } - - if (keyFile.has_key ("Performance", "ClutCacheSize")) { - clutCacheSize = keyFile.get_integer ("Performance", "ClutCacheSize"); - } - - if (keyFile.has_key ("Performance", "MaxInspectorBuffers")) { - maxInspectorBuffers = keyFile.get_integer ("Performance", "MaxInspectorBuffers"); - } - - if (keyFile.has_key ("Performance", "PreviewDemosaicFromSidecar")) { - prevdemo = (prevdemo_t)keyFile.get_integer ("Performance", "PreviewDemosaicFromSidecar"); - } - - if (keyFile.has_key ("Performance", "Daubechies")) { - rtSettings.daubech = keyFile.get_boolean ("Performance", "Daubechies"); - } - - if (keyFile.has_key ("Performance", "SerializeTiffRead")) { - serializeTiffRead = keyFile.get_boolean ("Performance", "SerializeTiffRead"); - } - } - - if (keyFile.has_group ("GUI")) { - if (keyFile.has_key ("GUI", "WindowWidth")) { - windowWidth = keyFile.get_integer ("GUI", "WindowWidth"); - } - - if (keyFile.has_key ("GUI", "WindowHeight")) { - windowHeight = keyFile.get_integer ("GUI", "WindowHeight"); - } - - if (keyFile.has_key ("GUI", "WindowX")) { - windowX = keyFile.get_integer ("GUI", "WindowX"); - } - - if (keyFile.has_key ("GUI", "WindowY")) { - windowY = keyFile.get_integer ("GUI", "WindowY"); - } - - if (keyFile.has_key ("GUI", "WindowMonitor")) { - windowMonitor = keyFile.get_integer ("GUI", "WindowMonitor"); - } - - if (keyFile.has_key ("GUI", "MeowMonitor")) { - meowMonitor = keyFile.get_integer ("GUI", "MeowMonitor"); - } - - if (keyFile.has_key ("GUI", "MeowFullScreen")) { - meowFullScreen = keyFile.get_boolean ("GUI", "MeowFullScreen"); - } - - if (keyFile.has_key ("GUI", "MeowMaximized")) { - meowMaximized = keyFile.get_boolean ("GUI", "MeowMaximized"); - } - - if (keyFile.has_key ("GUI", "MeowWidth")) { - meowWidth = keyFile.get_integer ("GUI", "MeowWidth"); - } - - if (keyFile.has_key ("GUI", "MeowHeight")) { - meowHeight = keyFile.get_integer ("GUI", "MeowHeight"); - } - - if (keyFile.has_key ("GUI", "MeowX")) { - meowX = keyFile.get_integer ("GUI", "MeowX"); - } - - if (keyFile.has_key ("GUI", "MeowY")) { - meowY = keyFile.get_integer ("GUI", "MeowY"); - } - - if (keyFile.has_key ("GUI", "WindowMaximized")) { - windowMaximized = keyFile.get_boolean ("GUI", "WindowMaximized"); - } - - if (keyFile.has_key ("GUI", "DetailWindowWidth")) { - detailWindowWidth = keyFile.get_integer ("GUI", "DetailWindowWidth"); - } - - if (keyFile.has_key ("GUI", "DetailWindowHeight")) { - detailWindowHeight = keyFile.get_integer ("GUI", "DetailWindowHeight"); - } - - if (keyFile.has_key ("GUI", "DirBrowserWidth")) { - dirBrowserWidth = keyFile.get_integer ("GUI", "DirBrowserWidth"); - } - - if (keyFile.has_key ("GUI", "DirBrowserHeight")) { - dirBrowserHeight = keyFile.get_integer ("GUI", "DirBrowserHeight"); - } - - if (keyFile.has_key ("GUI", "SortType")) { - dirBrowserSortType = static_cast (keyFile.get_integer ("GUI", "SortType")); - } - - if (keyFile.has_key ("GUI", "PreferencesWidth")) { - preferencesWidth = keyFile.get_integer ("GUI", "PreferencesWidth"); - } - - if (keyFile.has_key ("GUI", "PreferencesHeight")) { - preferencesHeight = keyFile.get_integer ("GUI", "PreferencesHeight"); - } - - if (keyFile.has_key ("GUI", "SaveAsDialogWidth")) { - saveAsDialogWidth = keyFile.get_integer ("GUI", "SaveAsDialogWidth"); - } - - if (keyFile.has_key ("GUI", "SaveAsDialogHeight")) { - saveAsDialogHeight = keyFile.get_integer ("GUI", "SaveAsDialogHeight"); - } - - if (keyFile.has_key ("GUI", "ToolPanelWidth")) { - toolPanelWidth = keyFile.get_integer ("GUI", "ToolPanelWidth"); - } - - if (keyFile.has_key ("GUI", "BrowserToolPanelWidth")) { - browserToolPanelWidth = keyFile.get_integer ("GUI", "BrowserToolPanelWidth"); - } - - if (keyFile.has_key ("GUI", "BrowserToolPanelHeight")) { - browserToolPanelHeight = keyFile.get_integer ("GUI", "BrowserToolPanelHeight"); - } - - if (keyFile.has_key ("GUI", "BrowserToolPanelOpened")) { - browserToolPanelOpened = keyFile.get_boolean ("GUI", "BrowserToolPanelOpened"); - } - - if (keyFile.has_key ("GUI", "BrowserDirPanelOpened")) { - browserDirPanelOpened = keyFile.get_boolean ("GUI", "BrowserDirPanelOpened"); - } - - if (keyFile.has_key ("GUI", "EditorFilmStripOpened")) { - editorFilmStripOpened = keyFile.get_boolean ("GUI", "EditorFilmStripOpened"); - } - - if (keyFile.has_key ("GUI", "HistoryPanelWidth")) { - historyPanelWidth = keyFile.get_integer ("GUI", "HistoryPanelWidth"); - } - - if (keyFile.has_key ("GUI", "FontFamily")) { - fontFamily = keyFile.get_string ("GUI", "FontFamily"); - } - - if (keyFile.has_key ("GUI", "FontSize")) { - fontSize = keyFile.get_integer ("GUI", "FontSize"); - } - - if (keyFile.has_key ("GUI", "CPFontFamily")) { - CPFontFamily = keyFile.get_string ("GUI", "CPFontFamily"); - } - - if (keyFile.has_key ("GUI", "CPFontSize")) { - CPFontSize = keyFile.get_integer ("GUI", "CPFontSize"); - } - - if (keyFile.has_key ("GUI", "LastPreviewScale")) { - lastScale = keyFile.get_integer ("GUI", "LastPreviewScale"); - } - - if (keyFile.has_key ("GUI", "PanAccelFactor")) { - panAccelFactor = keyFile.get_integer ("GUI", "PanAccelFactor"); - } - - if (keyFile.has_key ("GUI", "RememberZoomAndPan")) { - rememberZoomAndPan = keyFile.get_boolean ("GUI", "RememberZoomAndPan"); - } - - if (keyFile.has_key ("GUI", "LastCropSize")) { - lastCropSize = keyFile.get_integer ("GUI", "LastCropSize"); - } - - if (keyFile.has_key ("GUI", "ShowHistory")) { - showHistory = keyFile.get_boolean ("GUI", "ShowHistory"); - } - - if (keyFile.has_key ("GUI", "ShowFilePanelState")) { - showFilePanelState = keyFile.get_integer ("GUI", "ShowFilePanelState"); - } - - if (keyFile.has_key ("GUI", "ShowInfo")) { - showInfo = keyFile.get_boolean ("GUI", "ShowInfo"); - } - - if (keyFile.has_key ("GUI", "MainNBVertical")) { - mainNBVertical = keyFile.get_boolean ("GUI", "MainNBVertical"); - } - - if (keyFile.has_key ("GUI", "ShowClippedHighlights")) { - showClippedHighlights = keyFile.get_boolean ("GUI", "ShowClippedHighlights"); - } - - if (keyFile.has_key ("GUI", "ShowClippedShadows")) { - showClippedShadows = keyFile.get_boolean ("GUI", "ShowClippedShadows"); - } - - if (keyFile.has_key ("GUI", "FrameColor")) { - bgcolor = keyFile.get_integer ("GUI", "FrameColor"); - } - - if (keyFile.has_key ("GUI", "ProcessingQueueEnbled")) { - procQueueEnabled = keyFile.get_boolean ("GUI", "ProcessingQueueEnbled"); - } - - if (keyFile.has_key ("GUI", "ToolPanelsExpanded")) { - tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded"); - } - - if (keyFile.has_key ("GUI", "ToolPanelsExpandedAutoSave")) { - autoSaveTpOpen = keyFile.get_boolean ("GUI", "ToolPanelsExpandedAutoSave"); - } - - if (keyFile.has_key ("GUI", "MultiDisplayMode")) { - multiDisplayMode = keyFile.get_integer ("GUI", "MultiDisplayMode"); - } - - //if (keyFile.has_key ("GUI", "CurvePanelsExpanded")) crvOpen = keyFile.get_integer_list ("GUI", "CurvePanelsExpanded"); - if (keyFile.has_key ("GUI", "CutOverlayBrush")) { - cutOverlayBrush = keyFile.get_double_list ("GUI", "CutOverlayBrush"); - } - - if (keyFile.has_key ("GUI", "NavGuideBrush")) { - navGuideBrush = keyFile.get_double_list ("GUI", "NavGuideBrush"); - } - - if (keyFile.has_key ("GUI", "HistogramPosition")) { - histogramPosition = keyFile.get_integer ("GUI", "HistogramPosition"); - } - - if (keyFile.has_key ("GUI", "HistogramBar")) { - histogramBar = keyFile.get_boolean ("GUI", "HistogramBar"); - } - - if (keyFile.has_key ("GUI", "HistogramFullMode")) { - histogramFullMode = keyFile.get_boolean ("GUI", "HistogramFullMode"); - } - - if (keyFile.has_key ("GUI", "NavigatorRGBUnit")) { - navRGBUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorRGBUnit"); - } - - if (keyFile.has_key ("GUI", "NavigatorHSVUnit")) { - navHSVUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorHSVUnit"); - } - - if (keyFile.has_key ("GUI", "ShowFilmStripToolBar")) { - showFilmStripToolBar = keyFile.get_boolean ("GUI", "ShowFilmStripToolBar"); - } - - if (keyFile.has_key ("GUI", "FileBrowserToolbarSingleRow")) { - FileBrowserToolbarSingleRow = keyFile.get_boolean ("GUI", "FileBrowserToolbarSingleRow"); - } - - if (keyFile.has_key ("GUI", "HideTPVScrollbar")) { - hideTPVScrollbar = keyFile.get_boolean ("GUI", "HideTPVScrollbar"); - } - - if (keyFile.has_key ("GUI", "UseIconNoText")) { - UseIconNoText = keyFile.get_boolean ("GUI", "UseIconNoText"); - } - - if (keyFile.has_key ("GUI", "HistogramWorking")) { - rtSettings.HistogramWorking = keyFile.get_boolean ("GUI", "HistogramWorking"); - } - - if (keyFile.has_key ("GUI", "CurveBBoxPosition")) { - curvebboxpos = keyFile.get_integer ("GUI", "CurveBBoxPosition"); - } - } - - if (keyFile.has_group ("Crop Settings")) { - if (keyFile.has_key ("Crop Settings", "PPI")) { - cropPPI = keyFile.get_integer ("Crop Settings", "PPI"); - } - } - - if (keyFile.has_group ("Color Management")) { - if (keyFile.has_key ("Color Management", "ICCDirectory")) { - rtSettings.iccDirectory = keyFile.get_string ("Color Management", "ICCDirectory"); - } - - if (keyFile.has_key ("Color Management", "PrinterIntent")) { - rtSettings.printerIntent = static_cast (keyFile.get_integer ("Color Management", "PrinterIntent")); - } - - if (keyFile.has_key ("Color Management", "PrinterBPC")) { - rtSettings.printerBPC = keyFile.get_boolean ("Color Management", "PrinterBPC"); - } - - if (keyFile.has_key ("Color Management", "PrinterProfile")) { - rtSettings.printerProfile = keyFile.get_string ("Color Management", "PrinterProfile"); - } - - if (keyFile.has_key ("Color Management", "MonitorProfile")) { - rtSettings.monitorProfile = keyFile.get_string ("Color Management", "MonitorProfile"); - } - - if (keyFile.has_key ("Color Management", "AutoMonitorProfile")) { - rtSettings.autoMonitorProfile = keyFile.get_boolean ("Color Management", "AutoMonitorProfile"); - } - - if (keyFile.has_key ("Color Management", "Autocielab")) { - rtSettings.autocielab = keyFile.get_boolean ("Color Management", "Autocielab"); - } - - if (keyFile.has_key ("Color Management", "RGBcurvesLumamode_Gamut")) { - rtSettings.rgbcurveslumamode_gamut = keyFile.get_boolean ("Color Management", "RGBcurvesLumamode_Gamut"); - } - - if (keyFile.has_key ("Color Management", "Intent")) { - rtSettings.monitorIntent = static_cast (keyFile.get_integer ("Color Management", "Intent")); - } - - if (keyFile.has_key ("Color Management", "MonitorBPC")) { - rtSettings.monitorBPC = keyFile.get_boolean ("Color Management", "MonitorBPC"); - } - - if (keyFile.has_key ("Color Management", "CRI")) { - rtSettings.CRI_color = keyFile.get_integer ("Color Management", "CRI"); - } - - if (keyFile.has_key ("Color Management", "DenoiseLabgamma")) { - rtSettings.denoiselabgamma = keyFile.get_integer ("Color Management", "DenoiseLabgamma"); - } - - /* - if (keyFile.has_key ("Color Management", "view")) { - rtSettings.viewingdevice = keyFile.get_integer ("Color Management", "view"); - } - - if (keyFile.has_key ("Color Management", "grey")) { - rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); - } - */ - /* - if (keyFile.has_key ("Color Management", "greySc")) { - rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); - } - */ - if (keyFile.has_key ("Color Management", "CBDLArtif")) { - rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif"); - } - - if (keyFile.has_key ("Color Management", "CBDLlevel0")) { - rtSettings.level0_cbdl = keyFile.get_double ("Color Management", "CBDLlevel0"); - } - - if (keyFile.has_key ("Color Management", "CBDLlevel123")) { - rtSettings.level123_cbdl = keyFile.get_double ("Color Management", "CBDLlevel123"); - } - - //if (keyFile.has_key ("Color Management", "Colortoningab")) rtSettings.colortoningab = keyFile.get_double("Color Management", "Colortoningab"); - //if (keyFile.has_key ("Color Management", "Decaction")) rtSettings.decaction = keyFile.get_double("Color Management", "Decaction"); - - if (keyFile.has_key ("Color Management", "WhiteBalanceSpotSize")) { - whiteBalanceSpotSize = keyFile.get_integer ("Color Management", "WhiteBalanceSpotSize"); - } - - if ( keyFile.has_key ("Color Management", "GamutICC")) { - rtSettings.gamutICC = keyFile.get_boolean ("Color Management", "GamutICC"); - } - - //if ( keyFile.has_key ("Color Management", "BWcomplement")) rtSettings.bw_complementary = keyFile.get_boolean("Color Management", "BWcomplement"); - if ( keyFile.has_key ("Color Management", "Ciecamfloat")) { - rtSettings.ciecamfloat = keyFile.get_boolean ("Color Management", "Ciecamfloat"); - } - - if ( keyFile.has_key ("Color Management", "AdobeRGB")) { - rtSettings.adobe = keyFile.get_string ("Color Management", "AdobeRGB"); - } - - if ( keyFile.has_key ("Color Management", "ProPhoto")) { - rtSettings.prophoto = keyFile.get_string ("Color Management", "ProPhoto"); - } - - if ( keyFile.has_key ("Color Management", "ProPhoto10")) { - rtSettings.prophoto10 = keyFile.get_string ("Color Management", "ProPhoto10"); - } - - if ( keyFile.has_key ("Color Management", "WideGamut")) { - rtSettings.widegamut = keyFile.get_string ("Color Management", "WideGamut"); - } - - if ( keyFile.has_key ("Color Management", "sRGB")) { - rtSettings.srgb = keyFile.get_string ("Color Management", "sRGB"); - } - - if ( keyFile.has_key ("Color Management", "sRGB10")) { - rtSettings.srgb10 = keyFile.get_string ("Color Management", "sRGB10"); - } - - if ( keyFile.has_key ("Color Management", "Beta")) { - rtSettings.beta = keyFile.get_string ("Color Management", "Beta"); - } - - if ( keyFile.has_key ("Color Management", "Best")) { - rtSettings.best = keyFile.get_string ("Color Management", "Best"); - } - - if ( keyFile.has_key ("Color Management", "Rec2020")) { - rtSettings.rec2020 = keyFile.get_string ("Color Management", "Rec2020"); - } - - if ( keyFile.has_key ("Color Management", "Bruce")) { - rtSettings.bruce = keyFile.get_string ("Color Management", "Bruce"); - } - - if ( keyFile.has_key ("Color Management", "GamutLch")) { - rtSettings.gamutLch = keyFile.get_boolean ("Color Management", "GamutLch"); - } - - if ( keyFile.has_key ("Color Management", "ProtectRed")) { - rtSettings.protectred = keyFile.get_integer ("Color Management", "ProtectRed"); - } - - if ( keyFile.has_key ("Color Management", "ProtectRedH")) { - rtSettings.protectredh = keyFile.get_double ("Color Management", "ProtectRedH"); - } - - if ( keyFile.has_key ("Color Management", "Amountchroma")) { - rtSettings.amchroma = keyFile.get_integer ("Color Management", "Amountchroma"); - } - - if ( keyFile.has_key ("Color Management", "ClutsDirectory")) { - clutsDir = keyFile.get_string ("Color Management", "ClutsDirectory"); - } - - //if( keyFile.has_key ("Color Management", "Ciebadpixgauss")) rtSettings.ciebadpixgauss = keyFile.get_boolean("Color Management", "Ciebadpixgauss"); - - } - - if (keyFile.has_group ("Batch Processing")) { - if (keyFile.has_key ("Batch Processing", "AdjusterBehavior")) { - baBehav = keyFile.get_integer_list ("Batch Processing", "AdjusterBehavior"); - } - } - - if (keyFile.has_group ("Sounds")) { - if (keyFile.has_key ("Sounds", "Enable")) { - sndEnable = keyFile.get_boolean ("Sounds", "Enable"); - } - - if (keyFile.has_key ("Sounds", "BatchQueueDone")) { - sndBatchQueueDone = keyFile.get_string ("Sounds", "BatchQueueDone"); - } - - if (keyFile.has_key ("Sounds", "LngEditProcDone")) { - sndLngEditProcDone = keyFile.get_string ("Sounds", "LngEditProcDone"); - } - - if (keyFile.has_key ("Sounds", "LngEditProcDoneSecs")) { - sndLngEditProcDoneSecs = keyFile.get_double ("Sounds", "LngEditProcDoneSecs"); - } - } - - if (keyFile.has_group ("Fast Export")) { - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpening" )) { - fastexport_bypass_sharpening = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpening" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenEdge" )) { - fastexport_bypass_sharpenEdge = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenMicro" )) { - fastexport_bypass_sharpenMicro = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" ); - } - - //if (keyFile.has_key ("Fast Export", "fastexport_bypass_lumaDenoise" )) fastexport_bypass_lumaDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" ); - //if (keyFile.has_key ("Fast Export", "fastexport_bypass_colorDenoise" )) fastexport_bypass_colorDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_colorDenoise" ); - if (keyFile.has_key ("Fast Export", "fastexport_bypass_defringe" )) { - fastexport_bypass_defringe = keyFile.get_boolean ("Fast Export", "fastexport_bypass_defringe" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrDenoise" )) { - fastexport_bypass_dirpyrDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sh_hq" )) { - fastexport_bypass_sh_hq = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sh_hq" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrequalizer" )) { - fastexport_bypass_dirpyrequalizer = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_wavelet" )) { - fastexport_bypass_wavelet = keyFile.get_boolean ("Fast Export", "fastexport_bypass_wavelet" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_raw_dmethod" )) { - fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_dmethod" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_raw_bayer_method" )) { - fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_bayer_method" ); - } - -//if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_all_enhance" )) fastexport_bypass_raw_bayer_all_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_all_enhance" ); - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_iterations" )) { - fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_iterations" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" )) { - fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_enhance" )) { - fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_enhance" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" )) { - fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" )) { - fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations")) { - fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations"); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_linenoise" )) { - fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_linenoise" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" )) { - fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_greenthresh" )) { - fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_greenthresh" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" )) { - fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_raw_xtrans_method" )) { - fastexport_raw_xtrans_method = keyFile.get_string ("Fast Export", "fastexport_raw_xtrans_method" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ccSteps" )) { - fastexport_bypass_raw_ccSteps = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ca" )) { - fastexport_bypass_raw_ca = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ca" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_df" )) { - fastexport_bypass_raw_df = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_df" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ff" )) { - fastexport_bypass_raw_ff = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ff" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_icm_input" )) { - fastexport_icm_input = keyFile.get_string ("Fast Export", "fastexport_icm_input" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_icm_working" )) { - fastexport_icm_working = keyFile.get_string ("Fast Export", "fastexport_icm_working" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_icm_output" )) { - fastexport_icm_output = keyFile.get_string ("Fast Export", "fastexport_icm_output" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_icm_output_intent" )) { - fastexport_icm_outputIntent = static_cast (keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); - } - - if (keyFile.has_key ("Fast Export", "fastexport_icm_output_bpc" )) { - fastexport_icm_outputBPC = keyFile.get_boolean ("Fast Export", "fastexport_icm_output_bpc" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_icm_gamma" )) { - fastexport_icm_gamma = keyFile.get_string ("Fast Export", "fastexport_icm_gamma" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_resize_enabled" )) { - fastexport_resize_enabled = keyFile.get_boolean ("Fast Export", "fastexport_resize_enabled" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_resize_scale" )) { - fastexport_resize_scale = keyFile.get_double ("Fast Export", "fastexport_resize_scale" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_resize_appliesTo" )) { - fastexport_resize_appliesTo = keyFile.get_string ("Fast Export", "fastexport_resize_appliesTo" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_resize_method" )) { - fastexport_resize_method = keyFile.get_string ("Fast Export", "fastexport_resize_method" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_resize_dataspec" )) { - fastexport_resize_dataspec = keyFile.get_integer ("Fast Export", "fastexport_resize_dataspec" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_resize_width" )) { - fastexport_resize_width = keyFile.get_integer ("Fast Export", "fastexport_resize_width" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) { - fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" ); - } - - if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) { - fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" ); - } - } - - if (keyFile.has_group ("Dialogs")) { - safeDirGet (keyFile, "Dialogs", "LastIccDir", lastIccDir); - safeDirGet (keyFile, "Dialogs", "LastDarkframeDir", lastDarkframeDir); - safeDirGet (keyFile, "Dialogs", "LastFlatfieldDir", lastFlatfieldDir); - safeDirGet (keyFile, "Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastLabCurvesDir", lastLabCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastRetinexDir", lastRetinexDir); - safeDirGet (keyFile, "Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastPFCurvesDir", lastPFCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastBWCurvesDir", lastBWCurvesDir); - - safeDirGet (keyFile, "Dialogs", "LastToneCurvesDir", lastToneCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); - safeDirGet (keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); - safeDirGet (keyFile, "Dialogs", "LastLensProfileDir", lastLensProfileDir); - - if (keyFile.has_key ("Dialogs", "GimpPluginShowInfoDialog")) { - gimpPluginShowInfoDialog = keyFile.get_boolean ("Dialogs", "GimpPluginShowInfoDialog"); - } - } - - if (keyFile.has_group ("Lensfun")) { - if (keyFile.has_key ("Lensfun", "DBDirectory")) { - rtSettings.lensfunDbDirectory = keyFile.get_string ("Lensfun", "DBDirectory"); - } - } - -// -------------------------------------------------------------------------------------------------------- - - filterOutParsedExtensions (); - - return; - - } - } catch (Glib::Error &err) { - Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Error code %1 while reading values from \"%2\":\n%3", err.code(), fname, err.what()); - - if (options.rtSettings.verbose) { - printf ("%s\n", msg.c_str()); - } - - throw Error (msg); - } catch (...) { - Glib::ustring msg = Glib::ustring::compose ("Options::readFromFile / Unknown exception while trying to load \"%1\"!", fname); - - if (options.rtSettings.verbose) { - printf ("%s\n", msg.c_str()); - } - - throw Error (msg); - } -} - -bool Options::safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section, - const Glib::ustring& entryName, Glib::ustring& destination) -{ - try { - - if (keyFile.has_key (section, entryName) && !keyFile.get_string (section, entryName).empty ()) { - destination = keyFile.get_string (section, entryName); - return true; - } - - } catch (Glib::KeyFileError&) {} - - return false; -} - -void Options::saveToFile (Glib::ustring fname) -{ - - Glib::ustring keyData; - - try { - - Glib::KeyFile keyFile; - - keyFile.set_boolean ("General", "TabbedEditor", tabbedUI); - keyFile.set_boolean ("General", "StoreLastProfile", savesParamsAtExit); - - if (startupDir == STARTUPDIR_HOME) { - keyFile.set_string ("General", "StartupDirectory", "home"); - } else if (startupDir == STARTUPDIR_CURRENT) { - keyFile.set_string ("General", "StartupDirectory", "current"); - } else if (startupDir == STARTUPDIR_CUSTOM) { - keyFile.set_string ("General", "StartupDirectory", "custom"); - } else if (startupDir == STARTUPDIR_LAST) { - keyFile.set_string ("General", "StartupDirectory", "last"); - } - - keyFile.set_string ("General", "StartupPath", startupPath); - keyFile.set_string ("General", "DateFormat", dateFormat); - keyFile.set_integer ("General", "AdjusterMinDelay", adjusterMinDelay); - keyFile.set_integer ("General", "AdjusterMaxDelay", adjusterMaxDelay); - keyFile.set_boolean ("General", "MultiUser", multiUser); - keyFile.set_string ("General", "Language", language); - keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); - keyFile.set_string ("General", "Theme", theme); - keyFile.set_string ("General", "Version", RTVERSION); - keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); - keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); - keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); - keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); - keyFile.set_double ("General", "TopLeft", rtSettings.top_left); - keyFile.set_double ("General", "TopRight", rtSettings.top_right); - keyFile.set_double ("General", "BotRight", rtSettings.bot_right); - keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); - keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); - keyFile.set_double ("General", "EDLow", rtSettings.ed_low); - keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); - keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); - - - keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); - keyFile.set_string ("External Editor", "GimpDir", gimpDir); - keyFile.set_string ("External Editor", "PhotoshopDir", psDir); - keyFile.set_string ("External Editor", "CustomEditor", customEditorProg); - - keyFile.set_boolean ("File Browser", "BrowseOnlyRaw", fbOnlyRaw); - keyFile.set_boolean ("File Browser", "BrowserShowsDate", fbShowDateTime); - keyFile.set_boolean ("File Browser", "BrowserShowsExif", fbShowBasicExif); - keyFile.set_boolean ("File Browser", "BrowserShowsExpComp", fbShowExpComp); - keyFile.set_boolean ("File Browser", "BrowserShowsHidden", fbShowHidden); - keyFile.set_integer ("File Browser", "ThumbnailSize", thumbSize); - keyFile.set_integer ("File Browser", "ThumbnailSizeTab", thumbSizeTab); - keyFile.set_integer ("File Browser", "ThumbnailSizeQueue", thumbSizeQueue); - keyFile.set_integer ("File Browser", "SameThumbSize", sameThumbSize); - keyFile.set_integer ("File Browser", "MaxPreviewHeight", maxThumbnailHeight); - keyFile.set_integer ("File Browser", "MaxCacheEntries", maxCacheEntries); - Glib::ArrayHandle pext = parseExtensions; - keyFile.set_string_list ("File Browser", "ParseExtensions", pext); - Glib::ArrayHandle pextena = parseExtensionsEnabled; - keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); - keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); - keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); - Glib::ArrayHandle pfav = favoriteDirs; - keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); - Glib::ArrayHandle pren = renameTemplates; - keyFile.set_string_list ("File Browser", "RenameTemplates", pren); - keyFile.set_boolean ("File Browser", "RenameUseTemplates", renameUseTemplates); - Glib::ArrayHandle ptzoom = thumbnailZoomRatios; - keyFile.set_double_list ("File Browser", "ThumbnailZoomRatios", ptzoom); - keyFile.set_boolean ("File Browser", "OverlayedFileNames", overlayedFileNames); - keyFile.set_boolean ("File Browser", "FilmStripOverlayedFileNames", filmStripOverlayedFileNames); - keyFile.set_boolean ("File Browser", "ShowFileNames", showFileNames ); - keyFile.set_boolean ("File Browser", "FilmStripShowFileNames", filmStripShowFileNames ); - keyFile.set_boolean ("File Browser", "InternalThumbIfUntouched", internalThumbIfUntouched ); - keyFile.set_boolean ("File Browser", "menuGroupRank", menuGroupRank); - keyFile.set_boolean ("File Browser", "menuGroupLabel", menuGroupLabel); - keyFile.set_boolean ("File Browser", "menuGroupFileOperations", menuGroupFileOperations); - keyFile.set_boolean ("File Browser", "menuGroupProfileOperations", menuGroupProfileOperations); - keyFile.set_boolean ("File Browser", "menuGroupExtProg", menuGroupExtProg); - keyFile.set_integer ("File Browser", "MaxRecentFolders", maxRecentFolders); - { - std::vector temp; - temp.reserve (maxRecentFolders); - - for (unsigned int i = 0; i < std::min (recentFolders.size(), maxRecentFolders); i++) { - temp.push_back (recentFolders[i]); - } - - keyFile.set_string_list ("File Browser", "RecentFolders", temp); - } - keyFile.set_integer ("Clipping Indication", "HighlightThreshold", highlightThreshold); - keyFile.set_integer ("Clipping Indication", "ShadowThreshold", shadowThreshold); - keyFile.set_boolean ("Clipping Indication", "BlinkClipped", blinkClipped); - - keyFile.set_integer ("Performance", "RgbDenoiseThreadLimit", rgbDenoiseThreadLimit); - keyFile.set_double ("Performance", "NRauto", rtSettings.nrauto); - keyFile.set_double ("Performance", "NRautomax", rtSettings.nrautomax); - keyFile.set_double ("Performance", "NRhigh", rtSettings.nrhigh); - keyFile.set_integer ("Performance", "NRWavlevel", rtSettings.nrwavlevel); - keyFile.set_integer ("Performance", "LevNR", rtSettings.leveldnv); - keyFile.set_integer ("Performance", "LevNRTI", rtSettings.leveldnti); - keyFile.set_integer ("Performance", "LevNRAUT", rtSettings.leveldnaut); - keyFile.set_integer ("Performance", "LevNRLISS", rtSettings.leveldnliss); - keyFile.set_integer ("Performance", "SIMPLNRAUT", rtSettings.leveldnautsimpl); - keyFile.set_integer ("Performance", "ClutCacheSize", clutCacheSize); - keyFile.set_integer ("Performance", "MaxInspectorBuffers", maxInspectorBuffers); - keyFile.set_integer ("Performance", "PreviewDemosaicFromSidecar", prevdemo); - keyFile.set_boolean ("Performance", "Daubechies", rtSettings.daubech); - keyFile.set_boolean ("Performance", "SerializeTiffRead", serializeTiffRead); - - keyFile.set_string ("Output", "Format", saveFormat.format); - keyFile.set_integer ("Output", "JpegQuality", saveFormat.jpegQuality); - keyFile.set_integer ("Output", "JpegSubSamp", saveFormat.jpegSubSamp); - keyFile.set_integer ("Output", "PngCompression", saveFormat.pngCompression); - keyFile.set_integer ("Output", "PngBps", saveFormat.pngBits); - keyFile.set_integer ("Output", "TiffBps", saveFormat.tiffBits); - keyFile.set_boolean ("Output", "TiffUncompressed", saveFormat.tiffUncompressed); - keyFile.set_boolean ("Output", "SaveProcParams", saveFormat.saveParams); - - keyFile.set_string ("Output", "FormatBatch", saveFormatBatch.format); - keyFile.set_integer ("Output", "JpegQualityBatch", saveFormatBatch.jpegQuality); - keyFile.set_integer ("Output", "JpegSubSampBatch", saveFormatBatch.jpegSubSamp); - keyFile.set_integer ("Output", "PngCompressionBatch", saveFormatBatch.pngCompression); - keyFile.set_integer ("Output", "PngBpsBatch", saveFormatBatch.pngBits); - keyFile.set_integer ("Output", "TiffBpsBatch", saveFormatBatch.tiffBits); - keyFile.set_boolean ("Output", "TiffUncompressedBatch", saveFormatBatch.tiffUncompressed); - keyFile.set_boolean ("Output", "SaveProcParamsBatch", saveFormatBatch.saveParams); - - keyFile.set_string ("Output", "PathTemplate", savePathTemplate); - keyFile.set_string ("Output", "PathFolder", savePathFolder); - keyFile.set_boolean ("Output", "AutoSuffix", autoSuffix); - keyFile.set_boolean ("Output", "ForceFormatOpts", forceFormatOpts); - keyFile.set_integer ("Output", "SaveMethodNum", saveMethodNum); - keyFile.set_boolean ("Output", "UsePathTemplate", saveUsePathTemplate); - keyFile.set_string ("Output", "LastSaveAsPath", lastSaveAsPath); - keyFile.set_boolean ("Output", "OverwriteOutputFile", overwriteOutputFile); - keyFile.set_boolean ("Output", "TunnelMetaData", tunnelMetaData); - - keyFile.set_string ("Profiles", "Directory", profilePath); - keyFile.set_boolean ("Profiles", "UseBundledProfiles", useBundledProfiles); - keyFile.set_string ("Profiles", "LoadSaveProfilePath", loadSaveProfilePath); - keyFile.set_string ("Profiles", "RawDefault", defProfRaw); - keyFile.set_string ("Profiles", "ImgDefault", defProfImg); - keyFile.set_boolean ("Profiles", "FilledProfile", filledProfile); - keyFile.set_boolean ("Profiles", "SaveParamsWithFile", saveParamsFile); - keyFile.set_boolean ("Profiles", "SaveParamsToCache", saveParamsCache); - keyFile.set_integer ("Profiles", "LoadParamsFromLocation", paramsLoadLocation); - keyFile.set_string ("Profiles", "CustomProfileBuilderPath", CPBPath); - keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); - - keyFile.set_integer ("GUI", "WindowWidth", windowWidth); - keyFile.set_integer ("GUI", "WindowHeight", windowHeight); - keyFile.set_integer ("GUI", "WindowX", windowX); - keyFile.set_integer ("GUI", "WindowY", windowY); - keyFile.set_integer ("GUI", "WindowMonitor", windowMonitor); - keyFile.set_integer ("GUI", "MeowMonitor", meowMonitor); - keyFile.set_boolean ("GUI", "MeowFullScreen", meowFullScreen); - keyFile.set_boolean ("GUI", "MeowMaximized", meowMaximized); - keyFile.set_integer ("GUI", "MeowWidth", meowWidth); - keyFile.set_integer ("GUI", "MeowHeight", meowHeight); - keyFile.set_integer ("GUI", "MeowX", meowX); - keyFile.set_integer ("GUI", "MeowY", meowY); - keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized); - keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth); - keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight); - keyFile.set_integer ("GUI", "DirBrowserWidth", dirBrowserWidth); - keyFile.set_integer ("GUI", "DirBrowserHeight", dirBrowserHeight); - keyFile.set_integer ("GUI", "SortType", dirBrowserSortType); - keyFile.set_integer ("GUI", "PreferencesWidth", preferencesWidth); - keyFile.set_integer ("GUI", "PreferencesHeight", preferencesHeight); - keyFile.set_integer ("GUI", "SaveAsDialogWidth", saveAsDialogWidth); - keyFile.set_integer ("GUI", "SaveAsDialogHeight", saveAsDialogHeight); - keyFile.set_integer ("GUI", "ToolPanelWidth", toolPanelWidth); - keyFile.set_integer ("GUI", "BrowserToolPanelWidth", browserToolPanelWidth); - keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight); - keyFile.set_boolean ("GUI", "BrowserToolPanelOpened", browserToolPanelOpened); - keyFile.set_boolean ("GUI", "EditorFilmStripOpened", editorFilmStripOpened); - keyFile.set_boolean ("GUI", "BrowserDirPanelOpened", browserDirPanelOpened); - keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); - keyFile.set_string ("GUI", "FontFamily", fontFamily); - keyFile.set_integer ("GUI", "FontSize", fontSize); - keyFile.set_string ("GUI", "CPFontFamily", CPFontFamily); - keyFile.set_integer ("GUI", "CPFontSize", CPFontSize); - keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); - keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); - keyFile.set_boolean ("GUI", "RememberZoomAndPan", rememberZoomAndPan); - keyFile.set_integer ("GUI", "LastCropSize", lastCropSize); - keyFile.set_boolean ("GUI", "ShowHistory", showHistory); - keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState); - keyFile.set_boolean ("GUI", "ShowInfo", showInfo); - keyFile.set_boolean ("GUI", "MainNBVertical", mainNBVertical); - keyFile.set_boolean ("GUI", "ShowClippedHighlights", showClippedHighlights); - keyFile.set_boolean ("GUI", "ShowClippedShadows", showClippedShadows); - keyFile.set_integer ("GUI", "FrameColor", bgcolor); - keyFile.set_boolean ("GUI", "ProcessingQueueEnbled", procQueueEnabled); - Glib::ArrayHandle tpopen = tpOpen; - keyFile.set_integer_list ("GUI", "ToolPanelsExpanded", tpopen); - keyFile.set_boolean ("GUI", "ToolPanelsExpandedAutoSave", autoSaveTpOpen); - keyFile.set_integer ("GUI", "MultiDisplayMode", multiDisplayMode); - keyFile.set_double_list ("GUI", "CutOverlayBrush", cutOverlayBrush); - keyFile.set_double_list ("GUI", "NavGuideBrush", navGuideBrush); - keyFile.set_integer ("GUI", "HistogramPosition", histogramPosition); - keyFile.set_boolean ("GUI", "HistogramBar", histogramBar); - keyFile.set_boolean ("GUI", "HistogramFullMode", histogramFullMode); - keyFile.set_integer ("GUI", "NavigatorRGBUnit", (int)navRGBUnit); - keyFile.set_integer ("GUI", "NavigatorHSVUnit", (int)navHSVUnit); - keyFile.set_boolean ("GUI", "ShowFilmStripToolBar", showFilmStripToolBar); - keyFile.set_boolean ("GUI", "FileBrowserToolbarSingleRow", FileBrowserToolbarSingleRow); - keyFile.set_boolean ("GUI", "HideTPVScrollbar", hideTPVScrollbar); - keyFile.set_boolean ("GUI", "UseIconNoText", UseIconNoText); - keyFile.set_boolean ("GUI", "HistogramWorking", rtSettings.HistogramWorking); - keyFile.set_integer ("GUI", "CurveBBoxPosition", curvebboxpos); - - //Glib::ArrayHandle crvopen = crvOpen; - //keyFile.set_integer_list ("GUI", "CurvePanelsExpanded", crvopen); - - keyFile.set_integer ("Crop Settings", "PPI", cropPPI); - - keyFile.set_string ("Color Management", "PrinterProfile", rtSettings.printerProfile); - keyFile.set_integer ("Color Management", "PrinterIntent", rtSettings.printerIntent); - keyFile.set_boolean ("Color Management", "PrinterBPC", rtSettings.printerBPC); - - keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); - keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); - keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); - keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); - keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); - keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); - keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); - //keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); - //keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); -// keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); - - keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); - keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); - keyFile.set_string ("Color Management", "ProPhoto10", rtSettings.prophoto10); - keyFile.set_string ("Color Management", "WideGamut", rtSettings.widegamut); - keyFile.set_string ("Color Management", "sRGB", rtSettings.srgb); - keyFile.set_string ("Color Management", "sRGB10", rtSettings.srgb10); - keyFile.set_string ("Color Management", "Beta", rtSettings.beta); - keyFile.set_string ("Color Management", "Best", rtSettings.best); - keyFile.set_string ("Color Management", "Rec2020", rtSettings.rec2020); - keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce); - keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize); - keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC); - //keyFile.set_boolean ("Color Management", "BWcomplement", rtSettings.bw_complementary); - keyFile.set_boolean ("Color Management", "Ciecamfloat", rtSettings.ciecamfloat); - keyFile.set_boolean ("Color Management", "GamutLch", rtSettings.gamutLch); - keyFile.set_integer ("Color Management", "ProtectRed", rtSettings.protectred); - keyFile.set_integer ("Color Management", "Amountchroma", rtSettings.amchroma); - keyFile.set_double ("Color Management", "ProtectRedH", rtSettings.protectredh); - keyFile.set_integer ("Color Management", "CRI", rtSettings.CRI_color); - keyFile.set_integer ("Color Management", "DenoiseLabgamma", rtSettings.denoiselabgamma); - //keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss); - keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); - //keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab); - //keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); - keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); - - - Glib::ArrayHandle bab = baBehav; - keyFile.set_integer_list ("Batch Processing", "AdjusterBehavior", bab); - - keyFile.set_boolean ("Sounds", "Enable", sndEnable); - keyFile.set_string ("Sounds", "BatchQueueDone", sndBatchQueueDone); - keyFile.set_string ("Sounds", "LngEditProcDone", sndLngEditProcDone); - keyFile.set_double ("Sounds", "LngEditProcDoneSecs", sndLngEditProcDoneSecs); - - - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening", fastexport_bypass_sharpening); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge", fastexport_bypass_sharpenEdge); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro", fastexport_bypass_sharpenMicro); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe", fastexport_bypass_defringe); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise", fastexport_bypass_dirpyrDenoise); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq", fastexport_bypass_sh_hq); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer", fastexport_bypass_dirpyrequalizer); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet", fastexport_bypass_wavelet); - keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method", fastexport_raw_bayer_method); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations", fastexport_bypass_raw_bayer_dcb_iterations); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance", fastexport_bypass_raw_bayer_dcb_enhance); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise", fastexport_bypass_raw_bayer_linenoise); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh", fastexport_bypass_raw_bayer_greenthresh); - keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method", fastexport_raw_xtrans_method); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps", fastexport_bypass_raw_ccSteps); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca", fastexport_bypass_raw_ca); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df", fastexport_bypass_raw_df); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff", fastexport_bypass_raw_ff); - keyFile.set_string ("Fast Export", "fastexport_icm_input", fastexport_icm_input); - keyFile.set_string ("Fast Export", "fastexport_icm_working", fastexport_icm_working); - keyFile.set_string ("Fast Export", "fastexport_icm_output", fastexport_icm_output); - keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent", fastexport_icm_outputIntent); - keyFile.set_boolean ("Fast Export", "fastexport_icm_output_bpc", fastexport_icm_outputBPC); - keyFile.set_string ("Fast Export", "fastexport_icm_gamma", fastexport_icm_gamma); - keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled", fastexport_resize_enabled); - keyFile.set_double ("Fast Export", "fastexport_resize_scale", fastexport_resize_scale); - keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo", fastexport_resize_appliesTo); - keyFile.set_string ("Fast Export", "fastexport_resize_method", fastexport_resize_method); - keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec", fastexport_resize_dataspec); - keyFile.set_integer ("Fast Export", "fastexport_resize_width", fastexport_resize_width); - keyFile.set_integer ("Fast Export", "fastexport_resize_height", fastexport_resize_height); - keyFile.set_integer ("Fast Export", "fastexport_use_fast_pipeline", fastexport_use_fast_pipeline); - - keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); - keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); - keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); - keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); - keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); - keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); - keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); - keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); - keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); - keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); - keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); - keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); - keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); - keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); - keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir); - keyFile.set_boolean ("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog); - - keyFile.set_string ("Lensfun", "DBDirectory", rtSettings.lensfunDbDirectory); - - keyData = keyFile.to_data (); - - } catch (Glib::KeyFileError &e) { - throw Error (e.what()); - } - - FILE *f = g_fopen (fname.c_str (), "wt"); - - if (f == nullptr) { - std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl; - Glib::ustring msg_ = Glib::ustring::compose (M ("MAIN_MSG_WRITEFAILED"), fname.c_str()); - throw Error (msg_); - } else { - fprintf (f, "%s", keyData.c_str ()); - fclose (f); - } -} - -void Options::load (bool lightweight) -{ - - // Find the application data path - - const gchar* path; - Glib::ustring dPath; - - path = g_getenv ("RT_SETTINGS"); - - if (path != nullptr) { - rtdir = Glib::ustring (path); - - if (!Glib::path_is_absolute (rtdir)) { - Glib::ustring msg = Glib::ustring::compose ("Settings path %1 is not absolute", rtdir); - throw Error (msg); - } - } else { -#ifdef WIN32 - WCHAR pathW[MAX_PATH] = {0}; - - if (SHGetSpecialFolderPathW (NULL, pathW, CSIDL_LOCAL_APPDATA, false)) { - char pathA[MAX_PATH]; - WideCharToMultiByte (CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); - rtdir = Glib::build_filename (Glib::ustring (pathA), Glib::ustring (CACHEFOLDERNAME)); - } - -#else - rtdir = Glib::build_filename (Glib::ustring (g_get_user_config_dir ()), Glib::ustring (CACHEFOLDERNAME)); -#endif - } - - if (options.rtSettings.verbose) { - printf ("Settings directory (rtdir) = %s\n", rtdir.c_str()); - } - - // Set the cache folder in RT's base folder - cacheBaseDir = Glib::build_filename (argv0, "cache"); - - // Read the global option file (the one located in the application's base folder) - try { - options.readFromFile (Glib::build_filename (argv0, "options")); - } catch (Options::Error &) { - // ignore errors here - } - - // Modify the path of the cache folder to the one provided in RT_CACHE environment variable - path = g_getenv ("RT_CACHE"); - - if (path != nullptr) { - cacheBaseDir = Glib::ustring (path); - - if (!Glib::path_is_absolute (cacheBaseDir)) { - Glib::ustring msg = Glib::ustring::compose ("Cache base dir %1 is not absolute", cacheBaseDir); - throw Error (msg); - } - } - // No environment variable provided, so falling back to the multi user mode, is enabled - else if (options.multiUser) { -#ifdef WIN32 - cacheBaseDir = Glib::build_filename (rtdir, "cache"); -#else - cacheBaseDir = Glib::build_filename (Glib::ustring (g_get_user_cache_dir()), Glib::ustring (CACHEFOLDERNAME)); -#endif - } - - // Check if RT is installed in Multi-User mode - if (options.multiUser) { - // Read the user option file (the one located somewhere in the user's home folder) - // Those values supersets those of the global option file - try { - options.readFromFile (Glib::build_filename (rtdir, "options")); - } catch (Options::Error &) { - // If the local option file does not exist or is broken, and the local cache folder does not exist, recreate it - if (!g_mkdir_with_parents (rtdir.c_str (), 511)) { - // Save the option file - options.saveToFile (Glib::build_filename (rtdir, "options")); - } - } - -#ifdef __APPLE__ - // make sure .local/share exists on OS X so we don't get problems with recently-used.xbel - g_mkdir_with_parents (g_get_user_data_dir(), 511); -#endif - } - - if (options.rtSettings.verbose) { - printf ("Cache directory (cacheBaseDir) = %s\n", cacheBaseDir.c_str()); - } - - // Update profile's path and recreate it if necessary - options.updatePaths(); - - // Check default Raw and Img procparams existence - if (options.defProfRaw.empty()) { - options.defProfRaw = DEFPROFILE_INTERNAL; - } else { - Glib::ustring tmpFName = options.findProfilePath (options.defProfRaw); - - if (!tmpFName.empty()) { - if (options.rtSettings.verbose) { - printf ("Raws' default profile \"%s\" found\n", options.defProfRaw.c_str()); - } - } else { - if (options.rtSettings.verbose) { - printf ("Raws' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfRaw.c_str()); - } - - options.defProfRaw = DEFPROFILE_INTERNAL; - options.defProfRawMissing = true; - } - } - - if (options.defProfImg.empty()) { - options.defProfImg = DEFPROFILE_INTERNAL; - } else { - Glib::ustring tmpFName = options.findProfilePath (options.defProfImg); - - if (!tmpFName.empty()) { - if (options.rtSettings.verbose) { - printf ("Images' default profile \"%s\" found\n", options.defProfImg.c_str()); - } - } else { - if (options.rtSettings.verbose) { - printf ("Images' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfImg.c_str()); - } - - options.defProfImg = DEFPROFILE_INTERNAL; - options.defProfImgMissing = true; - } - } - - //We handle languages using a hierarchy of translations. The top of the hierarchy is default. This includes a default translation for all items - // (most likely using simple English). The next level is the language: for instance, English, French, Chinese, etc. This file should contain a - // generic translation for all items which differ from default. Finally there is the locale. This is region-specific items which differ from the - // language file. These files must be name in the format (), where Language is the name of the language which it inherits from, - // and LC is the local code. Some examples of this would be English (US) (American English), French (FR) (Franch French), French (CA) (Canadian - // French), etc. - // - // Each level will only contain the differences between itself and its parent translation. For instance, English (UK) or English (CA) may - // include the translation "HISTORY_MSG_34;Avoid Colour Clipping" where English would translate it as "HISTORY_MSG_34;Avoid Color Clipping" (note - // the difference in the spelling of 'colour'). - // - // It is important that when naming the translation files, that you stick to the format or (). We depend on that to figure - // out which are the parent translations. Furthermore, there must be a file for each locale () -- you cannot have - // 'French (CA)' unless there is a file 'French'. - - Glib::ustring defaultTranslation = Glib::build_filename (argv0, "languages", "default"); - Glib::ustring languageTranslation = ""; - Glib::ustring localeTranslation = ""; - - if (options.languageAutoDetect) { - options.language = langMgr.getOSUserLanguage(); - } - - if (!options.language.empty()) { - std::vector langPortions = Glib::Regex::split_simple (" ", options.language); - - if (langPortions.size() >= 1) { - languageTranslation = Glib::build_filename (argv0, "languages", langPortions.at (0)); - } - - if (langPortions.size() >= 2) { - localeTranslation = Glib::build_filename (argv0, "languages", options.language); - } - } - - langMgr.load (localeTranslation, new MultiLangMgr (languageTranslation, new MultiLangMgr (defaultTranslation))); - - rtengine::init (&options.rtSettings, argv0, rtdir, !lightweight); -} - -void Options::save () -{ - - if (!options.multiUser) { - options.saveToFile (Glib::build_filename (argv0, "options")); - } else { - options.saveToFile (Glib::build_filename (rtdir, "options")); - } -} - -/* - * return true if ext is a parsed extension (retained or not) - */ -bool Options::is_parse_extention (Glib::ustring fname) -{ - Glib::ustring ext = getExtension (fname).lowercase(); - - if (!ext.empty()) { - // there is an extension to the filename - - // look out if it has one of the listed extensions (selected or not) - for (unsigned int i = 0; i < parseExtensions.size(); i++) { - if (ext == parseExtensions[i]) { - return true; - } - } - } - - return false; -} - -/* - * return true if fname ends with one of the retained image file extensions - */ -bool Options::has_retained_extention (Glib::ustring fname) -{ - - Glib::ustring ext = getExtension (fname).lowercase(); - - if (!ext.empty()) { - // there is an extension to the filename - - // look out if it has one of the retained extensions - for (unsigned int i = 0; i < parsedExtensions.size(); i++) { - if (ext == parsedExtensions[i]) { - return true; - } - } - } - - return false; -} - -/* - * return true if ext is an enabled extension - */ -bool Options::is_extention_enabled (Glib::ustring ext) -{ - for (int j = 0; j < (int)parseExtensions.size(); j++) - if (parseExtensions[j].casefold() == ext.casefold()) { - return j >= (int)parseExtensionsEnabled.size() || parseExtensionsEnabled[j]; - } - - return false; -} From 91fd578f4913e72ac996777678e6375371266f9a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 15 Sep 2017 22:09:45 +0200 Subject: [PATCH 122/126] Write PP3 before processing image, not after. Hopefully fixes #2494 --- rtgui/editorpanel.cc | 14 +++++++------- rtgui/editorpanel.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index f1835be89..4ea4e5099 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1734,15 +1734,18 @@ bool EditorPanel::idle_saveImage (ProgressConnector *pc, Gl ProgressConnector *ld = new ProgressConnector(); img->setSaveProgressListener (parent->getProgressListener()); + rtengine::procparams::ProcParams pparams; + ipc->getParams (&pparams); + if (sf.format == "tif") ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsTIFF), fname, sf.tiffBits, sf.tiffUncompressed), - sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); + sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams)); else if (sf.format == "png") ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsPNG), fname, sf.pngCompression, sf.pngBits), - sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); + sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams)); else if (sf.format == "jpg") ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsJPEG), fname, sf.jpegQuality, sf.jpegSubSamp), - sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); + sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams)); else { delete ld; } @@ -1762,7 +1765,7 @@ bool EditorPanel::idle_saveImage (ProgressConnector *pc, Gl return false; } -bool EditorPanel::idle_imageSaved (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf) +bool EditorPanel::idle_imageSaved (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams) { img->free (); @@ -1771,11 +1774,8 @@ bool EditorPanel::idle_imageSaved (ProgressConnector *pc, rtengine::IImage1 // save processing parameters, if needed if (sf.saveParams) { - rtengine::procparams::ProcParams pparams; - ipc->getParams (&pparams); // We keep the extension to avoid overwriting the profile when we have // the same output filename with different extension - //pparams.save (removeExtension (fname) + ".out" + paramFileExtension); pparams.save (fname + ".out" + paramFileExtension); } } else { diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 286905bf5..f01c43cde 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -146,7 +146,7 @@ private: void close (); BatchQueueEntry* createBatchQueueEntry (); - bool idle_imageSaved (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf); + bool idle_imageSaved (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams); bool idle_saveImage (ProgressConnector *pc, Glib::ustring fname, SaveFormat sf); bool idle_sendToGimp ( ProgressConnector *pc, Glib::ustring fname); bool idle_sentToGimp (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring filename); From a4672468344632233d792505a20e481f1436e353 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 16 Sep 2017 10:54:00 +0200 Subject: [PATCH 123/126] fix compilation failure when using lensfun 0.2.x Fixes #4085 --- CMakeLists.txt | 13 ++++++++++++ rtengine/CMakeLists.txt | 5 +++++ rtengine/rtlensfun.cc | 44 ++++++++++++++++++++++++++++++++++++++++- rtengine/rtlensfun.h | 2 ++ 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13ba209bf..c75b02288 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -445,6 +445,19 @@ if(UNIX) install(FILES rawtherapee.appdata.xml DESTINATION "${APPDATADIR}") endif() +# check whether the used version of lensfun has lfDatabase::LoadDirectory +include(CheckCXXSourceCompiles) +set(CMAKE_REQUIRED_INCLUDES ${LENSFUN_INCLUDE_DIRS}) +check_cxx_source_compiles( + "#include +int main() +{ + lfDatabase *db = 0; + bool b = db->LoadDirectory(0); + return 0; +}" LENSFUN_HAS_LOAD_DIRECTORY) + + add_subdirectory(rtexif) add_subdirectory(rtengine) add_subdirectory(rtgui) diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index 32d99cb8f..3d87c552d 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -113,6 +113,11 @@ set(RTENGINESOURCEFILES rtlensfun.cc ) +if(LENSFUN_HAS_LOAD_DIRECTORY) + set_source_files_properties(rtlensfun.cc PROPERTIES COMPILE_DEFINITIONS RT_LENSFUN_HAS_LOAD_DIRECTORY) +endif() + + if(NOT WITH_SYSTEM_KLT) set(RTENGINESOURCEFILES ${RTENGINESOURCEFILES} klt/convolve.cc diff --git a/rtengine/rtlensfun.cc b/rtengine/rtlensfun.cc index a352613ab..ae027da56 100644 --- a/rtengine/rtlensfun.cc +++ b/rtengine/rtlensfun.cc @@ -267,7 +267,12 @@ bool LFDatabase::init(const Glib::ustring &dbdir) std::cout << "..." << std::flush; } - bool ok = dbdir.empty() ? (instance_.data_->Load() == LF_NO_ERROR) : instance_.data_->LoadDirectory(dbdir.c_str()); + bool ok = false; + if (dbdir.empty()) { + ok = (instance_.data_->Load() == LF_NO_ERROR); + } else { + ok = instance_.LoadDirectory(dbdir.c_str()); + } if (settings->verbose) { std::cout << (ok ? "OK" : "FAIL") << std::endl; @@ -277,6 +282,43 @@ bool LFDatabase::init(const Glib::ustring &dbdir) } +bool LFDatabase::LoadDirectory(const char *dirname) +{ +#if RT_LENSFUN_HAS_LOAD_DIRECTORY + instance_.data_->LoadDirectory(dirname); +#else + // backported from lensfun 0.3.x + bool database_found = false; + + GDir *dir = g_dir_open (dirname, 0, NULL); + if (dir) + { + GPatternSpec *ps = g_pattern_spec_new ("*.xml"); + if (ps) + { + const gchar *fn; + while ((fn = g_dir_read_name (dir))) + { + size_t sl = strlen (fn); + if (g_pattern_match (ps, sl, fn, NULL)) + { + gchar *ffn = g_build_filename (dirname, fn, NULL); + /* Ignore errors */ + if (data_->Load (ffn) == LF_NO_ERROR) + database_found = true; + g_free (ffn); + } + } + g_pattern_spec_free (ps); + } + g_dir_close (dir); + } + + return database_found; +#endif +} + + LFDatabase::LFDatabase(): data_(nullptr) { diff --git a/rtengine/rtlensfun.h b/rtengine/rtlensfun.h index a4ff17ae9..d1cfd0ec4 100644 --- a/rtengine/rtlensfun.h +++ b/rtengine/rtlensfun.h @@ -117,6 +117,8 @@ private: float focalLen, float aperture, float focusDist, int width, int height, bool swap_xy) const; LFDatabase(); + bool LoadDirectory(const char *dirname); + static LFDatabase instance_; lfDatabase *data_; }; From 14378f39af5934796b65f5fb1d0310d6c8c4efaf Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 16 Sep 2017 12:37:58 +0200 Subject: [PATCH 124/126] Finally fixes #2494 --- rtgui/editorpanel.cc | 7 ++----- rtgui/editorpanel.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 4ea4e5099..f3e6189ba 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1722,7 +1722,7 @@ void EditorPanel::procParamsChanged (Thumbnail* thm, int whoChangedIt) } } -bool EditorPanel::idle_saveImage (ProgressConnector *pc, Glib::ustring fname, SaveFormat sf) +bool EditorPanel::idle_saveImage (ProgressConnector *pc, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams) { rtengine::IImage16* img = pc->returnValue(); delete pc; @@ -1734,9 +1734,6 @@ bool EditorPanel::idle_saveImage (ProgressConnector *pc, Gl ProgressConnector *ld = new ProgressConnector(); img->setSaveProgressListener (parent->getProgressListener()); - rtengine::procparams::ProcParams pparams; - ipc->getParams (&pparams); - if (sf.format == "tif") ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsTIFF), fname, sf.tiffBits, sf.tiffUncompressed), sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf, pparams)); @@ -1892,7 +1889,7 @@ void EditorPanel::saveAsPressed () ProgressConnector *ld = new ProgressConnector(); ld->startFunc (sigc::bind (sigc::ptr_fun (&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ), - sigc::bind (sigc::mem_fun ( *this, &EditorPanel::idle_saveImage ), ld, fnameOut, sf )); + sigc::bind (sigc::mem_fun ( *this, &EditorPanel::idle_saveImage ), ld, fnameOut, sf, pparams)); saveimgas->set_sensitive (false); sendtogimp->set_sensitive (false); } diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index f01c43cde..9c063661a 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -147,7 +147,7 @@ private: BatchQueueEntry* createBatchQueueEntry (); bool idle_imageSaved (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams); - bool idle_saveImage (ProgressConnector *pc, Glib::ustring fname, SaveFormat sf); + bool idle_saveImage (ProgressConnector *pc, Glib::ustring fname, SaveFormat sf, rtengine::procparams::ProcParams &pparams); bool idle_sendToGimp ( ProgressConnector *pc, Glib::ustring fname); bool idle_sentToGimp (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring filename); From 9f75b197eacfd9730657af197e4ed7cf74952cbd Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 16 Sep 2017 18:52:48 +0200 Subject: [PATCH 125/126] some cleanups --- rtengine/procparams.cc | 6 +++--- rtengine/procparams.h | 22 +++++++++++----------- rtgui/lensprofile.cc | 28 ++++++++++++++++------------ 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index a18982325..886e99c08 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -52,7 +52,7 @@ const int br = (int) options.rtSettings.bot_right; const int tl = (int) options.rtSettings.top_left; const int bl = (int) options.rtSettings.bot_left; -const char *LensProfParams::methodstring[static_cast(LensProfParams::eLcMode::lcp) + 1u] = {"none", "lfauto", "lfmanual", "lcp"}; +const char *LensProfParams::methodstring[static_cast(LensProfParams::eLcMode::LC_LCP) + 1u] = {"none", "lfauto", "lfmanual", "lcp"}; const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods] = {"amaze", "igv", "lmmse", "eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none", "pixelshift" }; const char *RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::numMethods] = {"3-pass (best)", "1-pass (medium)", "fast", "mono", "none" }; @@ -920,7 +920,7 @@ void ToneCurveParams::setDefaults() void LensProfParams::setDefaults() { - lcMode = eLcMode::none; + lcMode = eLcMode::LC_NOCORRECTION; lcpFile = ""; useDist = useVign = true; useCA = false; @@ -5836,7 +5836,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if(ppVersion < 327 && !lensProf.lcpFile.empty()) { - lensProf.lcMode = LensProfParams::eLcMode::lcp; + lensProf.lcMode = LensProfParams::eLcMode::LC_LCP; } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 9e7b728eb..8c7cb6a1d 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -830,13 +830,13 @@ class LensProfParams public: enum class eLcMode { - none, // No lens correction - lensfunAutoMatch, // Lens correction using auto matched lensfun database entry - lensfunManual, // Lens correction using manually selected lensfun database entry - lcp // Lens correction using lcp file + LC_NOCORRECTION, // No lens correction + LC_LENSFUNAUTOMATCH, // Lens correction using auto matched lensfun database entry + LC_LENSFUNMANUAL, // Lens correction using manually selected lensfun database entry + LC_LCP // Lens correction using lcp file }; - static const char *methodstring[static_cast(eLcMode::lcp) + 1u]; + static const char *methodstring[static_cast(eLcMode::LC_LCP) + 1u]; eLcMode lcMode; Glib::ustring lcpFile; bool useDist, useVign, useCA; @@ -852,22 +852,22 @@ public: bool useLensfun() const { - return lcMode == eLcMode::lensfunAutoMatch || lcMode == eLcMode::lensfunManual; + return lcMode == eLcMode::LC_LENSFUNAUTOMATCH || lcMode == eLcMode::LC_LENSFUNMANUAL; } bool lfAutoMatch() const { - return lcMode == eLcMode::lensfunAutoMatch; + return lcMode == eLcMode::LC_LENSFUNAUTOMATCH; } bool useLcp() const { - return lcMode == eLcMode::lcp && lcpFile.length() > 0; + return lcMode == eLcMode::LC_LCP && lcpFile.length() > 0; } bool lfManual() const { - return lcMode == eLcMode::lensfunManual; + return lcMode == eLcMode::LC_LENSFUNMANUAL; } Glib::ustring getMethodString(eLcMode mode) const @@ -877,12 +877,12 @@ public: eLcMode getMethodNumber(const Glib::ustring &mode) const { - for(size_t i = 0; i < static_cast(eLcMode::lcp); ++i) { + for(size_t i = 0; i < static_cast(eLcMode::LC_LCP); ++i) { if(methodstring[i] == mode) { return static_cast(i); } } - return eLcMode::none; + return eLcMode::LC_NOCORRECTION; } }; diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index b6cef05fc..7ce62b0a5 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -160,14 +160,18 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa corrLensfunAuto->set_sensitive(true); - if(pp->lensProf.lcMode == procparams::LensProfParams::eLcMode::lcp) { - corrLcpFile->set_active(true); - } else if(pp->lensProf.lcMode == procparams::LensProfParams::eLcMode::lensfunAutoMatch) { - corrLensfunAuto->set_active(true); - } else if(pp->lensProf.lcMode == procparams::LensProfParams::eLcMode::lensfunManual) { - corrLensfunManual->set_active(true); - } else { - corrOff->set_active(true); + switch(pp->lensProf.lcMode) { + case procparams::LensProfParams::eLcMode::LC_LCP : + corrLcpFile->set_active(true); + break; + case procparams::LensProfParams::eLcMode::LC_LENSFUNAUTOMATCH : + corrLensfunAuto->set_active(true); + break; + case procparams::LensProfParams::eLcMode::LC_LENSFUNMANUAL : + corrLensfunManual->set_active(true); + break; + case procparams::LensProfParams::eLcMode::LC_NOCORRECTION : + corrOff->set_active(true); } if (pp->lensProf.lcpFile.empty()) { @@ -270,13 +274,13 @@ void LensProfilePanel::setRawMeta(bool raw, const rtengine::ImageMetaData* pMeta void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) { if (corrLcpFile->get_active()) { - pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::lcp; + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_LCP; } else if(corrLensfunManual->get_active()) { - pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::lensfunManual; + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_LENSFUNMANUAL; } else if(corrLensfunAuto->get_active()) { - pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::lensfunAutoMatch; + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_LENSFUNAUTOMATCH; } else if(corrOff->get_active()) { - pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::none; + pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_NOCORRECTION; } if (LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename())) { From 10a4c5f1dea07d9ad01c31720265da5f7f44ca22 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 16 Sep 2017 20:04:24 +0200 Subject: [PATCH 126/126] CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access --- rtengine/dcraw.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 5bda02f86..0976278f0 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -2930,9 +2930,13 @@ void CLASS kodak_65000_load_raw() pred[0] = pred[1] = 0; len = MIN (256, width-col); ret = kodak_65000_decode (buf, len); - for (i=0; i < len; i++) - if ((RAW(row,col+i) = curve[ret ? buf[i] : - (pred[i & 1] += buf[i])]) >> 12) derror(); + for (i=0; i < len; i++) { + int idx = ret ? buf[i] : (pred[i & 1] += buf[i]); + if(idx >=0 && idx <= 0xffff) { + if ((RAW(row,col+i) = curve[idx]) >> 12) derror(); + } else + derror(); + } } }