From 0ffc7d9617de17cfc69c82b79db8c5cdf29838e7 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sun, 25 Nov 2018 08:47:39 +0100 Subject: [PATCH 01/15] Add frames to lensprofile.cc --- rtgui/lensprofile.cc | 48 +++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index e110792ec..b2043963a 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -65,18 +65,19 @@ LensProfilePanel::LensProfilePanel() : } // Main containers: + + Gtk::Frame *nodesFrame = Gtk::manage(new Gtk::Frame(M("TP_LENSPROFILE_MODE_HEADER"))); modesGrid->get_style_context()->add_class("grid-spacing"); setExpandAlignProperties(modesGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + + Gtk::Frame *distFrame = Gtk::manage(new Gtk::Frame(M("TP_LENSPROFILE_USE_HEADER"))); distGrid->get_style_context()->add_class("grid-spacing"); setExpandAlignProperties(distGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); // Mode choice widgets: - Gtk::Label* const corrHeaderLbl = Gtk::manage(new Gtk::Label(M("TP_LENSPROFILE_MODE_HEADER"))); - setExpandAlignProperties(corrHeaderLbl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - corrUnchangedRB->hide(); corrGroup = corrUnchangedRB->get_group(); @@ -133,37 +134,34 @@ LensProfilePanel::LensProfilePanel() : // Choice of properties to correct, applicable to all modes: - Gtk::Label* const useHeaderLbl = Gtk::manage(new Gtk::Label(M("TP_LENSPROFILE_USE_HEADER"))); - setExpandAlignProperties(useHeaderLbl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - // Populate modes grid: - modesGrid->attach(*corrHeaderLbl, 0, 0, 2, 1); - modesGrid->attach(*corrUnchangedRB, 0, 1, 2, 1); - modesGrid->attach(*corrOffRB, 0, 2, 2, 1); - modesGrid->attach(*corrLensfunAutoRB, 0, 3, 2, 1); - modesGrid->attach(*corrLensfunManualRB, 0, 4, 2, 1); + modesGrid->attach(*corrUnchangedRB, 0, 0, 3, 1); + modesGrid->attach(*corrOffRB, 0, 1, 3, 1); + modesGrid->attach(*corrLensfunAutoRB, 0, 2, 3, 1); + modesGrid->attach(*corrLensfunManualRB, 0, 3, 3, 1); - modesGrid->attach(*lensfunCamerasLbl, 0, 5, 1, 1); - modesGrid->attach(*lensfunCameras, 1, 5, 1, 1); - modesGrid->attach(*lensfunLensesLbl, 0, 6, 1, 1); - modesGrid->attach(*lensfunLenses, 1, 6, 1, 1); - modesGrid->attach(*warning, 2, 6, 1, 1); + modesGrid->attach(*lensfunCamerasLbl, 0, 4, 1, 1); + modesGrid->attach(*lensfunCameras, 1, 4, 1, 1); + modesGrid->attach(*lensfunLensesLbl, 0, 5, 1, 1); + modesGrid->attach(*lensfunLenses, 1, 5, 1, 1); + modesGrid->attach(*warning, 2, 4, 1, 2); - modesGrid->attach(*corrLcpFileRB, 0, 7, 1, 1); - modesGrid->attach(*corrLcpFileChooser, 1, 7, 1, 1); + modesGrid->attach(*corrLcpFileRB, 0, 6, 1, 1); + modesGrid->attach(*corrLcpFileChooser, 1, 6, 2, 1); // Populate distortions grid: - distGrid->attach(*useHeaderLbl, 0, 0, 1, 1); - distGrid->attach(*ckbUseDist, 0, 1, 1, 1); - distGrid->attach(*ckbUseVign, 0, 2, 1, 1); - distGrid->attach(*ckbUseCA, 0, 3, 1, 1); + distGrid->attach(*ckbUseDist, 0, 0, 1, 1); + distGrid->attach(*ckbUseVign, 0, 1, 1, 1); + distGrid->attach(*ckbUseCA, 0, 2, 1, 1); // Attach grids: - - pack_start(*modesGrid); - pack_start(*distGrid); + nodesFrame->add(*modesGrid); + distFrame->add(*distGrid); + + pack_start(*nodesFrame, Gtk::PACK_EXPAND_WIDGET); + pack_start(*distFrame, Gtk::PACK_EXPAND_WIDGET); // Signals: From 0f6edfe8ddbf4cf9e4ac5bf826f2e995179ab37b Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sun, 25 Nov 2018 18:06:45 +0100 Subject: [PATCH 02/15] Profiled Lens Correction Buf fix Fixed bug https://github.com/Beep6581/RawTherapee/issues/5002 Profiled Lens Correction does not seem to use (Unchanged) mode in Batch Edit --- rtgui/lensprofile.cc | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index b2043963a..66857dc79 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -78,9 +78,6 @@ LensProfilePanel::LensProfilePanel() : // Mode choice widgets: - corrUnchangedRB->hide(); - corrGroup = corrUnchangedRB->get_group(); - setExpandAlignProperties(corrLcpFileChooser, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); // Manually-selected profile widgets: @@ -136,19 +133,18 @@ LensProfilePanel::LensProfilePanel() : // Populate modes grid: - modesGrid->attach(*corrUnchangedRB, 0, 0, 3, 1); - modesGrid->attach(*corrOffRB, 0, 1, 3, 1); - modesGrid->attach(*corrLensfunAutoRB, 0, 2, 3, 1); - modesGrid->attach(*corrLensfunManualRB, 0, 3, 3, 1); + modesGrid->attach(*corrOffRB, 0, 0, 3, 1); + modesGrid->attach(*corrLensfunAutoRB, 0, 1, 3, 1); + modesGrid->attach(*corrLensfunManualRB, 0, 2, 3, 1); - modesGrid->attach(*lensfunCamerasLbl, 0, 4, 1, 1); - modesGrid->attach(*lensfunCameras, 1, 4, 1, 1); - modesGrid->attach(*lensfunLensesLbl, 0, 5, 1, 1); - modesGrid->attach(*lensfunLenses, 1, 5, 1, 1); - modesGrid->attach(*warning, 2, 4, 1, 2); + modesGrid->attach(*lensfunCamerasLbl, 0, 3, 1, 1); + modesGrid->attach(*lensfunCameras, 1, 3, 1, 1); + modesGrid->attach(*lensfunLensesLbl, 0, 4, 1, 1); + modesGrid->attach(*lensfunLenses, 1, 4, 1, 1); + modesGrid->attach(*warning, 2, 3, 1, 2); - modesGrid->attach(*corrLcpFileRB, 0, 6, 1, 1); - modesGrid->attach(*corrLcpFileChooser, 1, 6, 2, 1); + modesGrid->attach(*corrLcpFileRB, 0, 5, 1, 1); + modesGrid->attach(*corrLcpFileChooser, 1, 5, 1, 1); // Populate distortions grid: @@ -183,10 +179,6 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa disableListener(); conUseDist.block(true); - if (!batchMode) { - corrUnchangedRB->hide(); - } - corrLensfunAutoRB->set_sensitive(true); switch (pp->lensProf.lcMode) { @@ -397,10 +389,9 @@ void LensProfilePanel::setBatchMode(bool yes) FoldableToolPanel::setBatchMode(yes); if (yes) { - corrUnchangedRB->show(); + corrUnchangedRB->set_group(corrGroup); + modesGrid->attach_next_to(*corrUnchangedRB, Gtk::POS_TOP, 3, 1); corrUnchangedRB->set_active(true); - } else { - corrUnchangedRB->hide(); } } From 66e90142389b0bc5fbfd8fa9d815bfec18866cb2 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 26 Nov 2018 23:15:21 +0100 Subject: [PATCH 03/15] Batch mode fixed --- rtgui/lensprofile.cc | 55 ++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 66857dc79..787cb2cad 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -179,7 +179,7 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa disableListener(); conUseDist.block(true); - corrLensfunAutoRB->set_sensitive(true); + // corrLensfunAutoRB->set_sensitive(true); switch (pp->lensProf.lcMode) { case procparams::LensProfParams::LcMode::LCP: { @@ -190,6 +190,9 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa case procparams::LensProfParams::LcMode::LENSFUNAUTOMATCH: { corrLensfunAutoRB->set_active(true); + if (batchMode) { + setManualParamsVisibility(false); + } break; } @@ -204,6 +207,10 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa break; } } + + if (multiImage) { + corrUnchangedRB->set_active(true); + } if (pp->lensProf.lcpFile.empty()) { const Glib::ustring lastFolder = corrLcpFileChooser->get_current_folder(); @@ -227,24 +234,29 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa const LFDatabase* const db = LFDatabase::getInstance(); LFCamera c; - if (!setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel) && !pp->lensProf.lfManual()) { + if (pp->lensProf.lfAutoMatch()) { if (metadata) { c = db->findCamera(metadata->getMake(), metadata->getModel()); setLensfunCamera(c.getMake(), c.getModel()); } + } else if (pp->lensProf.lfManual()) { + setLensfunCamera(pp->lensProf.lfCameraMake, pp->lensProf.lfCameraModel); } - if (!setLensfunLens(pp->lensProf.lfLens) && !pp->lensProf.lfManual()) { + if (pp->lensProf.lfAutoMatch()) { if (metadata) { const LFLens l = db->findLens(c, metadata->getLens()); setLensfunLens(l.getLens()); } + } else if (pp->lensProf.lfManual()) { + setLensfunLens(pp->lensProf.lfLens); } lcModeChanged = lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false; useLensfunChanged = lensfunAutoChanged = lensfunCameraChanged = lensfunLensChanged = false; - if (!batchMode && !checkLensfunCanCorrect(true)) { + /* + if (!batchMode && !checkLensfunCanCorrect(true)) { if (corrLensfunAutoRB->get_active()) { corrOffRB->set_active(true); } @@ -252,9 +264,10 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa corrLensfunAutoRB->set_sensitive(false); } - if (corrLensfunManualRB->get_active() && !checkLensfunCanCorrect(false)) { + if (!batchMode && corrLensfunManualRB->get_active() && !checkLensfunCanCorrect(true)) { corrOffRB->set_active(true); - } + } + */ updateLensfunWarning(); @@ -293,7 +306,7 @@ void LensProfilePanel::write(rtengine::procparams::ProcParams* pp, ParamsEdited* const auto itc = lensfunCameras->get_active(); - if (itc) { + if (itc && !corrLensfunAutoRB->get_active()) { pp->lensProf.lfCameraMake = (*itc)[lf->lensfunModelCam.make]; pp->lensProf.lfCameraModel = (*itc)[lf->lensfunModelCam.model]; } else { @@ -303,7 +316,7 @@ void LensProfilePanel::write(rtengine::procparams::ProcParams* pp, ParamsEdited* const auto itl = lensfunLenses->get_active(); - if (itl) { + if (itl && !corrLensfunAutoRB->get_active()) { pp->lensProf.lfLens = (*itl)[lf->lensfunModelLens.lens]; } else { pp->lensProf.lfLens = ""; @@ -386,13 +399,13 @@ void LensProfilePanel::onUseCAChanged() void LensProfilePanel::setBatchMode(bool yes) { - FoldableToolPanel::setBatchMode(yes); - if (yes) { - corrUnchangedRB->set_group(corrGroup); - modesGrid->attach_next_to(*corrUnchangedRB, Gtk::POS_TOP, 3, 1); - corrUnchangedRB->set_active(true); - } + FoldableToolPanel::setBatchMode(yes); + + corrUnchangedRB->set_group(corrGroup); + modesGrid->attach_next_to(*corrUnchangedRB, Gtk::POS_TOP, 3, 1); + corrUnchangedRB->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &LensProfilePanel::onCorrModeChanged), corrUnchangedRB)); + corrUnchangedRB->set_active(true); } void LensProfilePanel::onLensfunCameraChanged() @@ -454,15 +467,21 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) } else if (rbChanged == corrLensfunAutoRB) { useLensfunChanged = true; lensfunAutoChanged = true; + lensfunCameraChanged = true; + lensfunLensChanged = true; lcpFileChanged = true; useDistChanged = true; useVignChanged = true; ckbUseDist->set_sensitive(true); ckbUseVign->set_sensitive(true); - ckbUseCA->set_sensitive(false); + ckbUseCA->set_sensitive(true); - if (metadata) { + + if (batchMode) { + setLensfunCamera("", ""); + setLensfunLens(""); + } else if (metadata) { const bool disabled = disableListener(); const LFDatabase* const db = LFDatabase::getInstance(); const LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel()); @@ -479,6 +498,8 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) } else if (rbChanged == corrLensfunManualRB) { useLensfunChanged = true; lensfunAutoChanged = true; + lensfunCameraChanged = true; + lensfunLensChanged = true; lcpFileChanged = true; useDistChanged = true; useVignChanged = true; @@ -515,7 +536,7 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) lcModeChanged = true; updateLensfunWarning(); - if (rbChanged == corrLensfunManualRB || rbChanged == corrLensfunAutoRB) { + if (rbChanged == corrLensfunManualRB || (!batchMode && rbChanged == corrLensfunAutoRB)) { setManualParamsVisibility(true); } else { setManualParamsVisibility(false); From 90122c419eb21ab9aca41f7947f2cf1b7a5f9d28 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Tue, 27 Nov 2018 20:17:52 +0100 Subject: [PATCH 04/15] Added inconsitent status to checkboxes and radio buttons --- rtgui/lensprofile.cc | 68 +++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 787cb2cad..544093984 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -207,10 +207,6 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa break; } } - - if (multiImage) { - corrUnchangedRB->set_active(true); - } if (pp->lensProf.lcpFile.empty()) { const Glib::ustring lastFolder = corrLcpFileChooser->get_current_folder(); @@ -264,17 +260,34 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa corrLensfunAutoRB->set_sensitive(false); } - if (!batchMode && corrLensfunManualRB->get_active() && !checkLensfunCanCorrect(true)) { + if (!batchMode && corrLensfunManualRB->get_active() && !checkLensfunCanCorrect(false)) { corrOffRB->set_active(true); } */ + + ckbUseDist->set_active(pp->lensProf.useDist); + ckbUseVign->set_active(pp->lensProf.useVign); + ckbUseCA->set_active(pp->lensProf.useCA); + + if (pedited) { + corrUnchangedRB->set_active(!pedited->lensProf.lcMode); + ckbUseDist->set_inconsistent(!pedited->lensProf.useDist); + ckbUseVign->set_inconsistent(!pedited->lensProf.useVign); + ckbUseCA->set_inconsistent(!pedited->lensProf.useCA); + + if (!pedited->lensProf.lfCameraMake || !pedited->lensProf.lfCameraModel) { + setLensfunCamera("", ""); + } + if (!pedited->lensProf.lfLens) { + setLensfunLens(""); + } + + ckbUseDist->set_sensitive(true); + ckbUseVign->set_sensitive(true); + ckbUseCA->set_sensitive(true); + } updateLensfunWarning(); - - ckbUseDist->set_active(pp->lensProf.useDist); - ckbUseVign->set_active(pp->lensProf.useVign && isRaw); - ckbUseCA->set_active(pp->lensProf.useCA && isRaw && ckbUseCA->get_sensitive()); - enableListener(); conUseDist.block(false); } @@ -338,7 +351,7 @@ void LensProfilePanel::write(rtengine::procparams::ProcParams* pp, ParamsEdited* void LensProfilePanel::setRawMeta(bool raw, const rtengine::FramesMetaData* pMeta) { - if (!raw || pMeta->getFocusDist() <= 0) { + if ((!raw || pMeta->getFocusDist() <= 0) && !batchMode) { disableListener(); // CA is very focus layer dependent, otherwise it might even worsen things @@ -373,6 +386,10 @@ void LensProfilePanel::onLCPFileChanged() void LensProfilePanel::onUseDistChanged() { useDistChanged = true; + if (ckbUseDist->get_inconsistent()) { + ckbUseDist->set_inconsistent(false); + ckbUseDist->set_active(false); + } if (listener) { listener->panelChanged(EvLCPUseDist, ckbUseDist->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); @@ -382,6 +399,10 @@ void LensProfilePanel::onUseDistChanged() void LensProfilePanel::onUseVignChanged() { useVignChanged = true; + if (ckbUseVign->get_inconsistent()) { + ckbUseVign->set_inconsistent(false); + ckbUseVign->set_active(false); + } if (listener) { listener->panelChanged(EvLCPUseVign, ckbUseVign->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); @@ -391,6 +412,10 @@ void LensProfilePanel::onUseVignChanged() void LensProfilePanel::onUseCAChanged() { useCAChanged = true; + if (ckbUseCA->get_inconsistent()) { + ckbUseCA->set_inconsistent(false); + ckbUseCA->set_active(false); + } if (listener) { listener->panelChanged(EvLCPUseCA, ckbUseCA->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); @@ -464,6 +489,7 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) ckbUseCA->set_sensitive(false); mode = M("GENERAL_NONE"); + } else if (rbChanged == corrLensfunAutoRB) { useLensfunChanged = true; lensfunAutoChanged = true; @@ -478,23 +504,21 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) ckbUseCA->set_sensitive(true); + disableListener(); if (batchMode) { setLensfunCamera("", ""); setLensfunLens(""); } else if (metadata) { - const bool disabled = disableListener(); const LFDatabase* const db = LFDatabase::getInstance(); const LFCamera c = db->findCamera(metadata->getMake(), metadata->getModel()); const LFLens l = db->findLens(c, metadata->getLens()); setLensfunCamera(c.getMake(), c.getModel()); setLensfunLens(l.getLens()); - - if (disabled) { - enableListener(); - } } - + enableListener(); + mode = M("TP_LENSPROFILE_CORRECTION_AUTOMATCH"); + } else if (rbChanged == corrLensfunManualRB) { useLensfunChanged = true; lensfunAutoChanged = true; @@ -509,6 +533,7 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) ckbUseCA->set_sensitive(false); mode = M("TP_LENSPROFILE_CORRECTION_MANUAL"); + } else if (rbChanged == corrLcpFileRB) { useLensfunChanged = true; lensfunAutoChanged = true; @@ -519,6 +544,7 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) updateDisabled(true); mode = M("TP_LENSPROFILE_CORRECTION_LCPFILE"); + } else if (rbChanged == corrUnchangedRB) { useLensfunChanged = false; lensfunAutoChanged = false; @@ -644,9 +670,11 @@ void LensProfilePanel::LFDbHelper::fillLensfunLenses() void LensProfilePanel::updateDisabled(bool enable) { - ckbUseDist->set_sensitive(enable); - ckbUseVign->set_sensitive(enable && isRaw); - ckbUseCA->set_sensitive(enable && allowFocusDep); + if (!batchMode) { + ckbUseDist->set_sensitive(enable); + ckbUseVign->set_sensitive(enable && isRaw); + ckbUseCA->set_sensitive(enable && allowFocusDep); + } } bool LensProfilePanel::setLensfunCamera(const Glib::ustring& make, const Glib::ustring& model) From 6b0558c9e3e0329c09bacc8f06556b83bfa2160c Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Wed, 28 Nov 2018 07:44:28 +0100 Subject: [PATCH 05/15] Listener fix --- rtgui/lensprofile.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index 544093984..ae8bbb7fe 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -424,7 +424,6 @@ void LensProfilePanel::onUseCAChanged() void LensProfilePanel::setBatchMode(bool yes) { - FoldableToolPanel::setBatchMode(yes); corrUnchangedRB->set_group(corrGroup); @@ -504,7 +503,7 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) ckbUseCA->set_sensitive(true); - disableListener(); + const bool disabled = disableListener(); if (batchMode) { setLensfunCamera("", ""); setLensfunLens(""); @@ -515,7 +514,9 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged) setLensfunCamera(c.getMake(), c.getModel()); setLensfunLens(l.getLens()); } - enableListener(); + if (disabled) { + enableListener(); + } mode = M("TP_LENSPROFILE_CORRECTION_AUTOMATCH"); From f21f9cae9c01c99b222b6f7c3de97aee77735b43 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 29 Nov 2018 20:38:07 +0100 Subject: [PATCH 06/15] Added Franz Trischberger to 'Other contributors' section. --- AUTHORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index a9f501919..15e3e13d4 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -63,4 +63,5 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati Johan Thor Vitalis Tiknius TooWaBoo + Franz Trischberger Colin Walker From a6a6fa26da5ec0d2d18003a9ad4242583b17dd78 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Thu, 29 Nov 2018 21:11:30 +0100 Subject: [PATCH 07/15] Added "restart required" label for theme #4968 --- rtgui/preferences.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 9141b0e3f..19fa41d2b 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -1002,6 +1002,8 @@ Gtk::Widget* Preferences::getGeneralPanel () Gtk::Label* themeLbl = Gtk::manage(new Gtk::Label(M("PREFERENCES_APPEARANCE_THEME") + ":")); setExpandAlignProperties(themeLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + Gtk::Label* themeRestartLbl = Gtk::manage ( new Gtk::Label (Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + setExpandAlignProperties(themeRestartLbl, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); themeCBT = Gtk::manage(new Gtk::ComboBoxText()); themeCBT->set_active(0); @@ -1048,7 +1050,8 @@ Gtk::Widget* Preferences::getGeneralPanel () appearanceGrid->attach(*themeLbl, 0, 0, 1, 1); appearanceGrid->attach(*themeCBT, 1, 0, 1, 1); - appearanceGrid->attach(*vSep, 2, 0, 1, 3); + appearanceGrid->attach(*themeRestartLbl, 2, 0, 2, 1); + appearanceGrid->attach(*vSep, 2, 1, 1, 3); appearanceGrid->attach(*mainFontLbl, 0, 1, 1, 1); appearanceGrid->attach(*mainFontFB, 1, 1, 1, 1); appearanceGrid->attach(*cropMaskColorLbl, 3, 1, 1, 1); From d0fe52c3eac74ee34e62d7d87acc2ac6a0f074a1 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 30 Nov 2018 11:24:55 +0100 Subject: [PATCH 08/15] Japanese updated by firefly, closes #5044 --- rtdata/languages/Japanese | 90 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 568d7c842..abc8ae4e7 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -765,13 +765,18 @@ HISTORY_MSG_493;L*a*b*調整 HISTORY_MSG_CLAMPOOG;色域外の色を切り取る HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - カラー補正 HISTORY_MSG_COLORTONING_LABREGION_AB;CT - 色の補正 +HISTORY_MSG_COLORTONING_LABREGION_CHANNEL;CT - 色チャンネル HISTORY_MSG_COLORTONING_LABREGION_CHROMATICITYMASK;CT - 色度のマスク HISTORY_MSG_COLORTONING_LABREGION_HUEMASK;CT - 色相のマスク HISTORY_MSG_COLORTONING_LABREGION_LIGHTNESS;CT - 明度 HISTORY_MSG_COLORTONING_LABREGION_LIGHTNESSMASK;CT - 輝度のマスク HISTORY_MSG_COLORTONING_LABREGION_LIST;CT - リスト +HISTORY_MSG_COLORTONING_LABREGION_MASKBLUR;CT - マスクぼかし +HISTORY_MSG_COLORTONING_LABREGION_OFFSET;CT - オフセット +HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - 強化 HISTORY_MSG_COLORTONING_LABREGION_SATURATION;CT - 彩度 HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK;CT - マスクの表示 +HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - スロープ HISTORY_MSG_DEHAZE_DEPTH;霞除去 - 深度 HISTORY_MSG_DEHAZE_ENABLED;霞除去 HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;霞除去 - 深度マップの表示 @@ -1065,9 +1070,15 @@ PARTIALPASTE_VIBRANCE;自然な彩度 PARTIALPASTE_VIGNETTING;周辺光量補正 PARTIALPASTE_WHITEBALANCE;ホワイトバランス PREFERENCES_ADD;追加 +PREFERENCES_APPEARANCE;外観 +PREFERENCES_APPEARANCE_COLORPICKERFONT;カラーピッカーのフォント +PREFERENCES_APPEARANCE_CROPMASKCOLOR;切り抜きのマスクカラー +PREFERENCES_APPEARANCE_MAINFONT;メインフォント PREFERENCES_APPEARANCE_NAVGUIDECOLOR;ナビゲーターのガイドカラー +PREFERENCES_APPEARANCE_THEME;テーマ PREFERENCES_APPLNEXTSTARTUP;要再起動 PREFERENCES_AUTOMONPROFILE;OSのメインモニター・プロファイルを使用 +PREFERENCES_AUTOSAVE_TP_OPEN;プログラム終了時の機能パネルの開閉状態を保存 PREFERENCES_BATCH_PROCESSING;バッチ処理 PREFERENCES_BEHADDALL;すべて '追加' PREFERENCES_BEHADDALLHINT;すべてのパラメータを 追加モードにします\nバッチツールパネルで設定される調整値が、各画像の既定値に加算されます @@ -1080,12 +1091,12 @@ PREFERENCES_CACHECLEAR_ALL;cacheに入れられたファイルを全てクリア PREFERENCES_CACHECLEAR_ALLBUTPROFILES;cacheに入れた処理プロファイル以外をクリア: PREFERENCES_CACHECLEAR_ONLYPROFILES;cacheに入れた処理プロファイルだけをクリア: PREFERENCES_CACHECLEAR_SAFETY;casheに入れたファイルだけをクリア。元画像に付随した処理プロファイルはそのまま -PREFERENCES_CACHEMAXENTRIES;キャッシュエントリーの最大数 +PREFERENCES_CACHEMAXENTRIES;cacheに入れるファイルの最大数 PREFERENCES_CACHEOPTS;cache オプション PREFERENCES_CACHETHUMBHEIGHT;サムネイル縦の最大値 PREFERENCES_CLIPPINGIND;クリッピング領域の表示 PREFERENCES_CLUTSCACHE;HaldCLUT cache -PREFERENCES_CLUTSCACHE_LABEL;cacheに置けるHaldCLUTの最大数 +PREFERENCES_CLUTSCACHE_LABEL;cacheに入れるHaldCLUTの最大数 PREFERENCES_CLUTSDIR;HaldCLUTのディレクトリー PREFERENCES_CMMBPC;ブラックポイントの補正 PREFERENCES_CROP;切り抜き画像の編集 @@ -1126,6 +1137,7 @@ PREFERENCES_EDITORCMDLINE;カスタムコマンドライン PREFERENCES_EDITORLAYOUT;編集 レイアウト PREFERENCES_EXTERNALEDITOR;外部エディタ PREFERENCES_FBROWSEROPTS;ファイルブラウザ/サムネイルのオプション +PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;ファイルブラウザのツールバーを圧縮 PREFERENCES_FILEFORMAT;ファイル形式 PREFERENCES_FLATFIELDFOUND;検出 PREFERENCES_FLATFIELDSDIR;フラットフィールド・ディレクトリ @@ -1223,13 +1235,13 @@ PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;現在の画像のズームレベルとパ PREFERENCES_SAVE_TP_OPEN_NOW;機能パネルの今の開閉状態を保存する PREFERENCES_SELECTLANG;言語選択 PREFERENCES_SERIALIZE_TIFF_READ;TIFFファイルの読み込み設定 -PREFERENCES_SERIALIZE_TIFF_READ_LABEL;TIFFファイルのシリアル化 +PREFERENCES_SERIALIZE_TIFF_READ_LABEL;TIFFファイルの読み込みをシリアライズ PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;画像フォルダーが多数の非圧縮のTIFFファイルで閉められている場合、このオプションを有効にすることで、サムネイル画像生成の効率が上がります PREFERENCES_SET;設定 PREFERENCES_SHOWBASICEXIF;基本Exif情報を表示 PREFERENCES_SHOWDATETIME;日付表示 PREFERENCES_SHOWEXPOSURECOMPENSATION;露光補正追加 -PREFERENCES_SHOWFILMSTRIPTOOLBAR;画像スライドのツールバーを表示する +PREFERENCES_SHOWFILMSTRIPTOOLBAR;画像スライドにツールバーを表示する PREFERENCES_SHTHRESHOLD;シャドウ・クリッピング領域のしきい値 PREFERENCES_SINGLETAB;シングルタブモードモード PREFERENCES_SINGLETABVERTAB;シングル編集タブモード, 垂直タブ @@ -1407,6 +1419,7 @@ TP_COARSETRAF_TOOLTIP_HFLIP;左右反転 TP_COARSETRAF_TOOLTIP_ROTLEFT;90度左回転\nショートカット: [\n\nシングル・エディタ・タブのショートカット: Alt-[ TP_COARSETRAF_TOOLTIP_ROTRIGHT;90度右回転\nショートカット: ]\n\nシングル・エディタ・タブのショートカット: Alt-] TP_COARSETRAF_TOOLTIP_VFLIP;上下反転 +TP_COLORAPP_ABSOLUTELUMINANCE;絶対輝度 TP_COLORAPP_ALGO;アルゴリズム TP_COLORAPP_ALGO_ALL;すべて TP_COLORAPP_ALGO_JC;明度 + 色度 (JC) @@ -1417,6 +1430,7 @@ TP_COLORAPP_BADPIXSL;ホット/バッドピクセルフィルター TP_COLORAPP_BADPIXSL_TOOLTIP;明るい部分のホット/バッドピクセルを圧縮します\n 0は効果なし 1は中間 2はガウスほかし\n\nこれらアーティファクトはCIECAM02の限界に起因するものです。色域を抑制する代わりに、イメージに暗い影が現れるのを防ぎます TP_COLORAPP_BRIGHT;明るさ (Q) TP_COLORAPP_BRIGHT_TOOLTIP;CIECAM02の明るさは L*a*b*やRGBとは異なり、白の輝度を計算に入れます +TP_COLORAPP_CAT02ADAPTATION_TOOLTIP;設定を手動で行う場合、65以上の設定値を推奨 TP_COLORAPP_CHROMA;色度 (C) TP_COLORAPP_CHROMA_M;鮮やかさ (M) TP_COLORAPP_CHROMA_M_TOOLTIP;CIECAM02の鮮やかさは L*a*b*やRGBの鮮やかさとは異なります @@ -1447,6 +1461,7 @@ TP_COLORAPP_LABEL_SCENE;撮影環境条件 TP_COLORAPP_LABEL_VIEWING;観視条件 TP_COLORAPP_LIGHT;明度 (J) TP_COLORAPP_LIGHT_TOOLTIP;CIECAM02の明度は L*a*b*やRGBの明度とは異なります +TP_COLORAPP_MEANLUMINANCE;中間輝度 (Yb%) TP_COLORAPP_MODEL;ホワイトポイント・モデル TP_COLORAPP_MODEL_TOOLTIP;WB [RT] + [出力]:\nRTのホワイトバランスは、撮影環境に使用されます。CIECAM02はD50の設定, 出力デバイスのホワイトバランスは「環境設定」の「カラーマネジメント」の設定\n\nWB [RT+CAT02] + [出力]:\nRTのホワイトバランス設定は、CAT02で使用され、出力デバイスのホワイトバランスは環境設定の値を使用します TP_COLORAPP_NEUTRAL;リセット @@ -1490,14 +1505,23 @@ TP_COLORTONING_LABGRID;L*a*b*カラー補正グリッド TP_COLORTONING_LABGRID_VALUES;HL: a=%1 b=%2\nS: a=%3 b=%4 TP_COLORTONING_LABREGIONS;L*a*b*の補正領域 TP_COLORTONING_LABREGION_ABVALUES;a=%1 b=%2 +TP_COLORTONING_LABREGION_CHANNEL;色チャンネル +TP_COLORTONING_LABREGION_CHANNEL_ALL;全ての色チャンネル +TP_COLORTONING_LABREGION_CHANNEL_B;ブルー +TP_COLORTONING_LABREGION_CHANNEL_G;グリーン +TP_COLORTONING_LABREGION_CHANNEL_R;レッド TP_COLORTONING_LABREGION_CHROMATICITYMASK;色度 TP_COLORTONING_LABREGION_HUEMASK;色相 TP_COLORTONING_LABREGION_LIGHTNESS;明度 TP_COLORTONING_LABREGION_LIGHTNESSMASK;明度 TP_COLORTONING_LABREGION_LIST_TITLE;補正 TP_COLORTONING_LABREGION_MASK;マスク +TP_COLORTONING_LABREGION_MASKBLUR;マスクぼかし +TP_COLORTONING_LABREGION_OFFSET;オフセット +TP_COLORTONING_LABREGION_POWER;強化 TP_COLORTONING_LABREGION_SATURATION;彩度 TP_COLORTONING_LABREGION_SHOWMASK;マスクの表示 +TP_COLORTONING_LABREGION_SLOPE;スロープ TP_COLORTONING_LUMA;明度 TP_COLORTONING_LUMAMODE;明度を維持 TP_COLORTONING_LUMAMODE_TOOLTIP;カラー(レッド、グリーン、シアン、ブルーなど)を変える際に、これを有効にすると、各ピクセルの明度は維持されます。 @@ -1537,6 +1561,8 @@ TP_CROP_GUIDETYPE;ガイドタイプ: TP_CROP_H;高さ TP_CROP_LABEL;切り抜き TP_CROP_PPI;PPI= +TP_CROP_RESETCROP;リセット +TP_CROP_SELECTCROP;セレクト TP_CROP_W;W 幅 TP_CROP_X;X TP_CROP_Y;Y @@ -1782,7 +1808,16 @@ TP_LABCURVE_RSTPRO_TOOLTIP;色度スライダーとCCカーブを使用するこ TP_LENSGEOM_AUTOCROP;自動的に切り抜き選択 TP_LENSGEOM_FILL;オートフィル TP_LENSGEOM_LABEL;レンズ / ジオメトリ +TP_LENSPROFILE_CORRECTION_AUTOMATCH;自動で +TP_LENSPROFILE_CORRECTION_LCPFILE;LCPファイル +TP_LENSPROFILE_CORRECTION_MANUAL;手動で TP_LENSPROFILE_LABEL;レンズ補正 プロファイル +TP_LENSPROFILE_LENS_WARNING;注意:レンズプロファイルに使われるクロップファクターはカメラのクロップファクターより大きいので、誤った結果になる可能性があります。 +TP_LENSPROFILE_MODE_HEADER;レンズプロファイルを選択 +TP_LENSPROFILE_USE_CA;色収差 +TP_LENSPROFILE_USE_GEOMETRIC;歪曲収差 +TP_LENSPROFILE_USE_HEADER;補正する収差を選択: +TP_LENSPROFILE_USE_VIGNETTING;周辺光量 TP_LOCALCONTRAST_AMOUNT;量 TP_LOCALCONTRAST_DARKNESS;暗い部分のレベル TP_LOCALCONTRAST_LABEL;ローカルコントラスト @@ -1825,6 +1860,7 @@ TP_PRSHARPENING_LABEL;リサイズ後のシャープ化 TP_PRSHARPENING_TOOLTIP;リサイズ後の画像をシャープ化します。但し、リサイズの方式がランチョスの場合に限ります。プレビュー画面でこの機能の効果を見ることは出来ません。使用法に関してはRawPediaを参照して下さい。 TP_RAWCACORR_AUTO;自動補正 TP_RAWCACORR_AUTOIT;繰り返し +TP_RAWCACORR_AUTOIT_TOOLTIP;”自動補正”が有効になっている場合にこの設定が可能です。\n自動補正の作用は控えめなため、全ての色収差が常に補正されるとは限りません。\n残りの色収差を補正するためには、自動色収差補正の繰り返しを最大5回行います。\n繰り返すたびに、直前の繰り返しで残った色収差を軽減しますが、その分処理時間は増えます。 TP_RAWCACORR_AVOIDCOLORSHIFT;色ずれを回避 TP_RAWCACORR_CABLUE;ブルー TP_RAWCACORR_CARED;レッド @@ -1929,6 +1965,7 @@ TP_RESIZE_WIDTH;幅 TP_RETINEX_CONTEDIT_HSL;ヒストグラムイコライザ HSL TP_RETINEX_CONTEDIT_LAB;ヒストグラムイコライザ L*a*b* TP_RETINEX_CONTEDIT_LH;色相イコライザ +TP_RETINEX_CONTEDIT_MAP;イコライザ TP_RETINEX_CURVEEDITOR_CD;輝度=f(輝度) TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;輝度に応じた輝度の関数 L=f(L)\nハロとアーティファクトを減らすためにrawデータを補正します TP_RETINEX_CURVEEDITOR_LH;強さ=f(色相) @@ -1966,6 +2003,7 @@ TP_RETINEX_LABEL;レティネックス TP_RETINEX_LABEL_MASK;マスク TP_RETINEX_LABSPACE;L*a*b* TP_RETINEX_LOW;低 +TP_RETINEX_MAP;方式 TP_RETINEX_MAP_GAUS;ガウシアンマスク TP_RETINEX_MAP_MAPP;シャープマスク (一部ウェーブレット) TP_RETINEX_MAP_MAPT;シャープマスク (全てウェーブレット) @@ -2275,6 +2313,7 @@ TP_WBALANCE_LED_CRS;CRS SP12 WWMR16 TP_WBALANCE_LED_HEADER;LED TP_WBALANCE_LED_LSI;LSI Lumelex 2040 TP_WBALANCE_METHOD;モード +TP_WBALANCE_PICKER;ピック TP_WBALANCE_SHADE;日陰 TP_WBALANCE_SIZE;サイズ: TP_WBALANCE_SOLUX35;Solux 3500K @@ -2297,46 +2336,3 @@ ZOOMPANEL_ZOOMFITSCREEN;画像全体を画面に合わせる\nショートカッ ZOOMPANEL_ZOOMIN;ズームイン\nショートカット: + ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!HISTORY_MSG_COLORTONING_LABREGION_CHANNEL;CT - Channel -!HISTORY_MSG_COLORTONING_LABREGION_MASKBLUR;CT - region mask blur -!HISTORY_MSG_COLORTONING_LABREGION_OFFSET;CT - region offset -!HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - region power -!HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - region slope -!PREFERENCES_APPEARANCE;Appearance -!PREFERENCES_APPEARANCE_COLORPICKERFONT;Color picker font -!PREFERENCES_APPEARANCE_CROPMASKCOLOR;Crop mask color -!PREFERENCES_APPEARANCE_MAINFONT;Main font -!PREFERENCES_APPEARANCE_THEME;Theme -!PREFERENCES_AUTOSAVE_TP_OPEN;Save tool collapsed/expanded state on exit -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Compact toolbars in File Browser -!TP_COLORAPP_ABSOLUTELUMINANCE;Absolute luminance -!TP_COLORAPP_CAT02ADAPTATION_TOOLTIP;When setting manually, values above 65 are recommended. -!TP_COLORAPP_MEANLUMINANCE;Mean luminance (Yb%) -!TP_COLORTONING_LABREGION_CHANNEL;Channel -!TP_COLORTONING_LABREGION_CHANNEL_ALL;All -!TP_COLORTONING_LABREGION_CHANNEL_B;Blue -!TP_COLORTONING_LABREGION_CHANNEL_G;Green -!TP_COLORTONING_LABREGION_CHANNEL_R;Red -!TP_COLORTONING_LABREGION_MASKBLUR;Mask Blur -!TP_COLORTONING_LABREGION_OFFSET;Offset -!TP_COLORTONING_LABREGION_POWER;Power -!TP_COLORTONING_LABREGION_SLOPE;Slope -!TP_CROP_RESETCROP;Reset -!TP_CROP_SELECTCROP;Select -!TP_LENSPROFILE_CORRECTION_AUTOMATCH;Automatically -!TP_LENSPROFILE_CORRECTION_LCPFILE;LCP file -!TP_LENSPROFILE_CORRECTION_MANUAL;Manually -!TP_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. -!TP_LENSPROFILE_MODE_HEADER;Select the lens profile: -!TP_LENSPROFILE_USE_CA;Chromatic aberration -!TP_LENSPROFILE_USE_GEOMETRIC;Geometric -!TP_LENSPROFILE_USE_HEADER;Select distortions to correct: -!TP_LENSPROFILE_USE_VIGNETTING;Vignetting -!TP_RAWCACORR_AUTOIT_TOOLTIP;This setting is available if "Auto-correction" is checked.\nAuto-correction is conservative, meaning that it often does not correct all chromatic aberration.\nTo correct the remaining chromatic aberration, you can use up to five iterations of automatic chromatic aberration correction.\nEach iteration will reduce the remaining chromatic aberration from the last iteration at the cost of additional processing time. -!TP_RETINEX_CONTEDIT_MAP;Equalizer -!TP_RETINEX_MAP;Method -!TP_WBALANCE_PICKER;Pick From 9362f13fccfe0ac0f80ae8bfcd37073c3507b37b Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 1 Dec 2018 13:20:30 +0100 Subject: [PATCH 09/15] Wrong border interpolation when using DCB with raw border = 0, fixes #5047 --- rtengine/demosaic_algos.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index a324a7ca6..8e726738e 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -3083,6 +3083,7 @@ BENCHFUN free(buffer0); } + border_interpolate2(W, H, 1, rawData, red, green, blue); if(plistener) { plistener->setProgress (1.0); } From 4673ae3b24baf966054c6b22ba0bf99924eb4a96 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 1 Dec 2018 13:32:51 +0100 Subject: [PATCH 10/15] Wrong border interpolation when using IGV, fixes #5048 --- rtengine/demosaic_algos.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index 8e726738e..aa763f01f 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -1425,8 +1425,6 @@ void RawImageSource::igv_interpolate(int winw, int winh) chr[2] = hdif; chr[3] = vdif; - border_interpolate2(winw, winh, 7, rawData, red, green, blue); - if (plistener) { plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::IGV))); plistener->setProgress (0.0); @@ -1781,6 +1779,7 @@ void RawImageSource::igv_interpolate(int winw, int winh) } } }// End of parallelization + border_interpolate2(winw, winh, 8, rawData, red, green, blue); if (plistener) { plistener->setProgress (1.0); @@ -1815,8 +1814,6 @@ void RawImageSource::igv_interpolate(int winw, int winh) vdif = (float (*)) calloc(width * height / 2, sizeof * vdif); hdif = (float (*)) calloc(width * height / 2, sizeof * hdif); - border_interpolate2(winw, winh, 7, rawData, red, green, blue); - if (plistener) { plistener->setProgressStr (Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::IGV))); plistener->setProgress (0.0); @@ -2045,6 +2042,8 @@ void RawImageSource::igv_interpolate(int winw, int winh) blue [row][col] = CLIP(rgb[1][indx] - 65535.f * chr[1][indx]); } }// End of parallelization + border_interpolate2(winw, winh, 8, rawData, red, green, blue); + if (plistener) { plistener->setProgress (1.0); From 89f09b6ad6afae89ba98b81e6a15b86dbe9f7854 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 1 Dec 2018 14:00:51 +0100 Subject: [PATCH 11/15] better raw crop for Canon PowerShot A3100 IS --- rtengine/camconst.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 2113c5532..637a3a61d 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1131,6 +1131,10 @@ Camera constants: }, // Canon Powershot + { // Quality C, CHDK DNGs, raw frame correction + "make_model": "Canon PowerShot A3100 IS", + "raw_crop": [ 24, 12, 4032, 3024 ] // full size 4036X3026 + }, { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out "make_model": "Canon PowerShot A480", From 5c73de9f83b6d35dc85e215f5debacc2311afe04 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 1 Dec 2018 14:20:31 +0100 Subject: [PATCH 12/15] better raw crop for Canon PowerShot SX150 IS --- rtengine/camconst.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 637a3a61d..022ca6e86 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1217,6 +1217,11 @@ Camera constants: "ranges": { "white": 4050 } // nominal 4080-4093 }, + { // Quality C + "make_model": "Canon PowerShot SX150 IS", + "raw_crop": [ 26, 10, 4364, 3254 ] // cut 2pix left and right + }, + { // Quality C "make_model": "Canon PowerShot SX220 HS", "raw_crop": [ 92, 16, 4072, 3042 ] // Cut 2pix at lower border because of too high values in blue channel From e29ff3cce2ab5c8922b1468aa0e6a88255a1486f Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 1 Dec 2018 11:47:47 +0100 Subject: [PATCH 13/15] crop: added new locked ratio "Current" --- rtdata/languages/default | 1 + rtgui/crop.cc | 79 +++++++++++++++++++++++++++++++++++----- rtgui/crop.h | 4 +- 3 files changed, 73 insertions(+), 11 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 10c8ed730..da79ec3ac 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -223,6 +223,7 @@ GENERAL_AUTO;Automatic GENERAL_BEFORE;Before GENERAL_CANCEL;Cancel GENERAL_CLOSE;Close +GENERAL_CURRENT;Current GENERAL_DISABLE;Disable GENERAL_DISABLED;Disabled GENERAL_ENABLE;Enable diff --git a/rtgui/crop.cc b/rtgui/crop.cc index a6b418bd7..a06965840 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -52,12 +52,29 @@ int notifyListenerUI (void* data) return 0; } + +inline void get_custom_ratio(int w, int h, double &rw, double &rh) +{ + if (w < h) { + double r = double(h) / double(w); + int rr = r * 100 + 0.5; + rw = 1.0; + rh = rr / 100.0; + } else { + double r = double(w) / double(h); + int rr = r * 100 + 0.5; + rw = rr / 100.0; + rh = 1.0; + } } +} // namespace + Crop::Crop(): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), crop_ratios{ {M("GENERAL_ASIMAGE"), 0.0}, + {M("GENERAL_CURRENT"), -1.0}, {"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 @@ -176,10 +193,17 @@ Crop::Crop(): guide = Gtk::manage (new MyComboBoxText ()); setExpandAlignProperties(guide, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - + + customRatioLabel = Gtk::manage(new Gtk::Label("")); + customRatioLabel->hide(); + Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); + hb->pack_start(*orientation); + hb->pack_start(*customRatioLabel); + + settingsgrid->set_column_homogeneous(true); settingsgrid->attach (*fixr, 0, 0, 1, 1); settingsgrid->attach (*ratio, 1, 0, 1, 1); - settingsgrid->attach (*orientation, 2, 0, 1, 1); + settingsgrid->attach (*hb, 2, 0, 1, 1); settingsgrid->attach (*guidelab, 0, 1, 1, 1); settingsgrid->attach (*guide, 1, 1, 2, 1); pack_start (*settingsgrid, Gtk::PACK_SHRINK, 0 ); @@ -349,13 +373,6 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited) setDimensions (pp->crop.x + pp->crop.w, pp->crop.y + pp->crop.h); } - if (pp->crop.ratio == "As Image") { - ratio->set_active(0); - } else { - ratio->set_active_text (pp->crop.ratio); - } - fixr->set_active (pp->crop.fixratio); - const bool flip_orientation = pp->crop.fixratio && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0; if (pp->crop.orientation == "Landscape") { @@ -396,6 +413,20 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited) nw = pp->crop.w; nh = pp->crop.h; + customRatioLabel->hide(); + orientation->show(); + if (pp->crop.ratio == "As Image") { + ratio->set_active(0); + } else if (pp->crop.ratio == "Current") { + ratio->set_active(1); + updateCurrentRatio(); + customRatioLabel->show(); + orientation->hide(); + } else { + ratio->set_active_text (pp->crop.ratio); + } + fixr->set_active (pp->crop.fixratio); + lastRotationDeg = pp->coarse.rotate; wDirty = false; @@ -448,7 +479,13 @@ void Crop::write (ProcParams* pp, ParamsEdited* pedited) pp->crop.w = nw; pp->crop.h = nh; pp->crop.fixratio = fixr->get_active (); - pp->crop.ratio = ratio->get_active_text (); + if (ratio->get_active_row_number() == 0) { + pp->crop.ratio = "As Image"; + } else if (ratio->get_active_row_number() == 1) { + pp->crop.ratio = "Current"; + } else { + 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() && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0; @@ -701,6 +738,15 @@ void Crop::ratioFixedChanged () // change to orientation or ration void Crop::ratioChanged () { + if (ratio->get_active_row_number() == 1) { + orientation->hide(); + updateCurrentRatio(); + customRatioLabel->show(); + } else { + orientation->show(); + customRatioLabel->hide(); + } + if (!fixr->get_active ()) { fixr->set_active(true); // will adjust ratio anyway } else { @@ -880,6 +926,10 @@ bool Crop::refreshSpins (bool notify) wconn.block (false); hconn.block (false); + if (ratio->get_active_row_number() == 1 && !fixr->get_active()) { + updateCurrentRatio(); + } + refreshSize (); if (notify) { @@ -1405,3 +1455,12 @@ void Crop::setBatchMode (bool batchMode) removeIfThere (methodgrid, selectCrop); removeIfThere (methodgrid, resetCrop); } + + +void Crop::updateCurrentRatio() +{ + double rw, rh; + get_custom_ratio(w->get_value(), h->get_value(), rw, rh); + customRatioLabel->set_text(Glib::ustring::compose("%1:%2", rw, rh)); + crop_ratios[1].value = double(w->get_value())/double(h->get_value()); +} diff --git a/rtgui/crop.h b/rtgui/crop.h index a16683d1b..ed0661598 100644 --- a/rtgui/crop.h +++ b/rtgui/crop.h @@ -95,9 +95,10 @@ private: double value; }; - const std::vector crop_ratios; + std::vector crop_ratios; void adjustCropToRatio(); + void updateCurrentRatio(); Gtk::CheckButton* fixr; MyComboBoxText* ratio; @@ -117,6 +118,7 @@ private: Gtk::Label* sizein; Gtk::Grid* ppigrid; Gtk::Grid* methodgrid; + Gtk::Label *customRatioLabel; int maxw, maxh; double nx, ny; From bb428421f2549944623a75cce88990c985d13011 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 1 Dec 2018 21:00:26 +0100 Subject: [PATCH 14/15] better raw crop for LG mobile LG-H815 --- rtengine/camconst.json | 1 + 1 file changed, 1 insertion(+) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 022ca6e86..1b2d0cdfa 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1352,6 +1352,7 @@ Camera constants: "make_model": "LG mobile LG-H815", "dcraw_matrix": [ 5859,547,-1250,-6484,15547,547,-2422,5625,3906 ], // DNG D65 //"dcraw_matrix": [ 11563,-2891,-3203,-5313,15625,625,-781,2813,5625 ], // DNG A + "raw_crop": [ 0, 0, 5312, 2986 ], // cropped last two rows because last row was garbage "ranges": { "white": 1000 } }, { // Quality C From f38f0b0ef77f7808100ea8bb52a4d2d95c089ae0 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 1 Dec 2018 21:18:12 +0100 Subject: [PATCH 15/15] Be less restrictive regarding variance in pass 2 of dual demosaic auto contrast threshold calculation --- rtengine/rt_algo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rt_algo.cc b/rtengine/rt_algo.cc index 22ea5c76b..3925fc1ec 100644 --- a/rtengine/rt_algo.cc +++ b/rtengine/rt_algo.cc @@ -282,7 +282,7 @@ void buildBlendMask(float** luminance, float **blend, int W, int H, float &contr Lum[i][j] = luminance[i + minY][j + minX]; } } - contrastThreshold = (pass == 0 || minvar <= 2.f) ? calcContrastThreshold(Lum, Blend, tilesize, tilesize) / 100.f : 0.f; + contrastThreshold = (pass == 0 || minvar <= 4.f) ? calcContrastThreshold(Lum, Blend, tilesize, tilesize) / 100.f : 0.f; break; } }