Merge branch 'dev' into testoutputprofile

This commit is contained in:
Hombre
2018-06-25 01:07:02 +02:00
59 changed files with 580 additions and 372 deletions

View File

@@ -331,9 +331,11 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
}
if (!batchMode) {
dcbOptions->set_visible(pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::DCB));
dcbOptions->set_visible(pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::DCB) || pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::DCBVNG4));
lmmseOptions->set_visible(pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::LMMSE));
dualDemosaicOptions->set_visible(pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::AMAZEVNG4));
dualDemosaicOptions->set_visible(pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::AMAZEVNG4)
|| pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::DCBVNG4)
|| pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::RCDVNG4));
if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::getMethodString(procparams::RAWParams::BayerSensor::Method::PIXELSHIFT)) {
pixelShiftOptions->set_visible(pp->raw.bayersensor.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::PSMotionCorrectionMethod::CUSTOM);
pixelShiftFrame->show();
@@ -518,7 +520,7 @@ void BayerProcess::methodChanged ()
const RAWParams::BayerSensor::Method currentMethod = RAWParams::BayerSensor::Method(currentSelection);
if (!batchMode) {
if (currentMethod == procparams::RAWParams::BayerSensor::Method::DCB) {
if (currentMethod == procparams::RAWParams::BayerSensor::Method::DCB || currentMethod == procparams::RAWParams::BayerSensor::Method::DCBVNG4) {
dcbOptions->show();
} else {
dcbOptions->hide();
@@ -530,7 +532,7 @@ void BayerProcess::methodChanged ()
lmmseOptions->hide();
}
if (currentMethod == procparams::RAWParams::BayerSensor::Method::AMAZEVNG4) {
if (currentMethod == procparams::RAWParams::BayerSensor::Method::AMAZEVNG4 || currentMethod == procparams::RAWParams::BayerSensor::Method::DCBVNG4 || currentMethod == procparams::RAWParams::BayerSensor::Method::RCDVNG4) {
dualDemosaicOptions->show();
} else {
dualDemosaicOptions->hide();

View File

@@ -39,9 +39,10 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL"), f
rlabel->set_markup (Glib::ustring("\t<span foreground=\"#b00000\"><b>") + M("TP_CHMIXER_RED") + Glib::ustring(":</b></span>"));
rlabel->set_alignment(Gtk::ALIGN_START);
red[0] = Gtk::manage (new Adjuster ("", -200, 200, 1, 100, imgIcon[0]));
red[1] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[1]));
red[2] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[2]));
constexpr double RANGE = 500.0;
red[0] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 100, imgIcon[0]));
red[1] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[1]));
red[2] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[2]));
Gtk::HSeparator* rsep = Gtk::manage (new Gtk::HSeparator ());
@@ -58,9 +59,9 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL"), f
glabel->set_alignment(Gtk::ALIGN_START);
green[0] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[3]));
green[1] = Gtk::manage (new Adjuster ("", -200, 200, 1, 100, imgIcon[4]));
green[2] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[5]));
green[0] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[3]));
green[1] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 100, imgIcon[4]));
green[2] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[5]));
Gtk::HSeparator* gsep = Gtk::manage (new Gtk::HSeparator ());
@@ -75,9 +76,9 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL"), f
Gtk::Label* blabel = Gtk::manage (new Gtk::Label ());
blabel->set_markup (Glib::ustring("\t<span foreground=\"#1377d7\"><b>") + M("TP_CHMIXER_BLUE") + Glib::ustring(":</b></span>"));
blabel->set_alignment(Gtk::ALIGN_START);
blue[0] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[6]));
blue[1] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[7]));
blue[2] = Gtk::manage (new Adjuster ("", -200, 200, 1, 100, imgIcon[8]));
blue[0] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[6]));
blue[1] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 0, imgIcon[7]));
blue[2] = Gtk::manage (new Adjuster ("", -RANGE, RANGE, 0.1, 100, imgIcon[8]));
for (int i = 0; i < 3; i++) {
red[i]->setAdjusterListener (this);
@@ -111,9 +112,9 @@ void ChMixer::read (const ProcParams* pp, const ParamsEdited* pedited)
}
for (int i = 0; i < 3; i++) {
red[i]->setValue (pp->chmixer.red[i]);
green[i]->setValue (pp->chmixer.green[i]);
blue[i]->setValue (pp->chmixer.blue[i]);
red[i]->setValue (pp->chmixer.red[i] / 10.0);
green[i]->setValue (pp->chmixer.green[i] / 10.0);
blue[i]->setValue (pp->chmixer.blue[i] / 10.0);
}
enableListener ();
@@ -123,9 +124,9 @@ void ChMixer::write (ProcParams* pp, ParamsEdited* pedited)
{
for (int i = 0; i < 3; i++) {
pp->chmixer.red[i] = (int) red[i]->getValue ();
pp->chmixer.green[i] = (int) green[i]->getValue ();
pp->chmixer.blue[i] = (int) blue[i]->getValue ();
pp->chmixer.red[i] = red[i]->getValue() * 10;
pp->chmixer.green[i] = green[i]->getValue() * 10;
pp->chmixer.blue[i] = blue[i]->getValue() * 10;
}
pp->chmixer.enabled = getEnabled();
@@ -143,9 +144,9 @@ void ChMixer::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
{
for (int i = 0; i < 3; i++) {
red[i]->setDefault (defParams->chmixer.red[i]);
green[i]->setDefault (defParams->chmixer.green[i]);
blue[i]->setDefault (defParams->chmixer.blue[i]);
red[i]->setDefault (defParams->chmixer.red[i] / 10.f);
green[i]->setDefault (defParams->chmixer.green[i] / 10.f);
blue[i]->setDefault (defParams->chmixer.blue[i] / 10.f);
}
if (pedited)
@@ -167,9 +168,9 @@ void ChMixer::adjusterChanged (Adjuster* a, double newval)
if (listener && getEnabled()) {
Glib::ustring descr = Glib::ustring::compose ("R=%1,%2,%3\nG=%4,%5,%6\nB=%7,%8,%9",
(int)red[0]->getValue(), (int)red[1]->getValue(), (int)red[2]->getValue(),
(int)green[0]->getValue(), (int)green[1]->getValue(), (int)green[2]->getValue(),
(int)blue[0]->getValue(), (int)blue[1]->getValue(), (int)blue[2]->getValue());
red[0]->getValue(), red[1]->getValue(), red[2]->getValue(),
green[0]->getValue(), green[1]->getValue(), green[2]->getValue(),
blue[0]->getValue(), blue[1]->getValue(), blue[2]->getValue());
listener->panelChanged (EvChMixer, descr);
}
}
@@ -215,8 +216,14 @@ void ChMixer::trimValues (rtengine::procparams::ProcParams* pp)
{
for (int i = 0; i < 3; i++) {
red[i]->trimValue(pp->chmixer.red[i]);
green[i]->trimValue(pp->chmixer.green[i]);
blue[i]->trimValue(pp->chmixer.blue[i]);
double r = pp->chmixer.red[i] / 10.0;
double g = pp->chmixer.green[i] / 10.0;
double b = pp->chmixer.blue[i] / 10.0;
red[i]->trimValue(r);
green[i]->trimValue(g);
blue[i]->trimValue(b);
pp->chmixer.red[i] = r * 10;
pp->chmixer.green[i] = g * 10;
pp->chmixer.blue[i] = b * 10;
}
}

View File

@@ -48,14 +48,26 @@ std::vector<Glib::ustring> listSubDirs (const Glib::RefPtr<Gio::File>& dir, bool
auto enumerator = dir->enumerate_children ("standard::name,standard::type,standard::is-hidden");
while (auto file = enumerator->next_file ()) {
if (file->get_file_type () != Gio::FILE_TYPE_DIRECTORY) {
continue;
while (true) {
try {
auto file = enumerator->next_file ();
if (!file) {
break;
}
if (file->get_file_type () != Gio::FILE_TYPE_DIRECTORY) {
continue;
}
if (!addHidden && file->is_hidden ()) {
continue;
}
subDirs.push_back (file->get_name ());
} catch (const Glib::Exception& exception) {
if (options.rtSettings.verbose) {
std::cerr << exception.what () << std::endl;
}
}
if (!addHidden && file->is_hidden ()) {
continue;
}
subDirs.push_back (file->get_name ());
}
} catch (const Glib::Exception& exception) {

View File

@@ -1023,6 +1023,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc)
ipc->setPreviewScale (10); // Important
tpc->initImage (ipc, tmb->getType() == FT_Raw);
ipc->setHistogramListener (this);
iareapanel->imageArea->indClippedPanel->silentlyDisableSharpMask();
// iarea->fitZoom (); // tell to the editorPanel that the next image has to be fitted to the screen
iareapanel->imageArea->setPreviewHandler (previewHandler);

View File

@@ -564,21 +564,31 @@ std::vector<Glib::ustring> FileCatalog::getFileList ()
auto enumerator = dir->enumerate_children ("standard::name");
while (auto file = enumerator->next_file ()) {
while (true) {
try {
auto file = enumerator->next_file ();
if (!file) {
break;
}
const Glib::ustring fname = file->get_name ();
const Glib::ustring fname = file->get_name ();
auto lastdot = fname.find_last_of ('.');
if (lastdot >= fname.length () - 1) {
continue;
auto lastdot = fname.find_last_of ('.');
if (lastdot >= fname.length () - 1) {
continue;
}
const auto fext = fname.substr (lastdot + 1).lowercase ();
if (extensions.count (fext) == 0) {
continue;
}
names.emplace_back (Glib::build_filename (selectedDirectory, fname));
} catch (Glib::Exception& exception) {
if (options.rtSettings.verbose) {
std::cerr << exception.what () << std::endl;
}
}
const auto fext = fname.substr (lastdot + 1).lowercase ();
if (extensions.count (fext) == 0) {
continue;
}
names.emplace_back (Glib::build_filename (selectedDirectory, fname));
}
} catch (Glib::Exception& exception) {

View File

@@ -98,6 +98,14 @@ void IndicateClippedPanel::toggleFocusMask ()
previewFocusMask->set_active(!previewFocusMask->get_active());
}
void IndicateClippedPanel::silentlyDisableSharpMask ()
{
ConnectionBlocker conBlocker(connSharpMask);
previewSharpMask->set_active(false);
previewSharpMask->set_image(*iSoff);
}
void IndicateClippedPanel::toggleSharpMask ()
{
previewSharpMask->set_active(!previewSharpMask->get_active());

View File

@@ -40,6 +40,7 @@ public:
void buttonToggled(Gtk::ToggleButton* tb);
void toggleClipped(bool highlights); // inverts a toggle programmatically
void toggleFocusMask();
void silentlyDisableSharpMask(); // toggle the button off without throwing a toggle event
void toggleSharpMask();
sigc::connection connFocusMask, connSharpMask, connClippedS, connClippedH;

View File

@@ -6,8 +6,10 @@
/*
Log of version changes
338 2018-06-14
339 2018-06-25
[ICM] enhanced custom output profile
338 2018-06-15
increased precision for the channel mixer
337 2018-06-13
new scales for the LabGrid color toning parameters
336 2018-06-01

View File

@@ -118,7 +118,8 @@ void XTransProcess::read(const rtengine::procparams::ProcParams* pp, const Param
dualDemosaicContrast->setValue (pp->raw.xtranssensor.dualDemosaicContrast);
ccSteps->setValue (pp->raw.xtranssensor.ccSteps);
if (!batchMode) {
dualDemosaicOptions->set_visible(pp->raw.xtranssensor.method == procparams::RAWParams::XTransSensor::getMethodString(procparams::RAWParams::XTransSensor::Method::FOUR_PASS));
dualDemosaicOptions->set_visible(pp->raw.xtranssensor.method == procparams::RAWParams::XTransSensor::getMethodString(procparams::RAWParams::XTransSensor::Method::FOUR_PASS)
|| pp->raw.xtranssensor.method == procparams::RAWParams::XTransSensor::getMethodString(procparams::RAWParams::XTransSensor::Method::TWO_PASS));
}
methodconn.block (false);
@@ -192,7 +193,7 @@ void XTransProcess::methodChanged ()
oldSelection = curSelection;
if (!batchMode) {
if (currentMethod == procparams::RAWParams::XTransSensor::Method::FOUR_PASS) {
if (currentMethod == procparams::RAWParams::XTransSensor::Method::FOUR_PASS || currentMethod == procparams::RAWParams::XTransSensor::Method::TWO_PASS) {
dualDemosaicOptions->show();
} else {
dualDemosaicOptions->hide();