merge with Dev

This commit is contained in:
Desmis
2017-09-24 08:18:45 +02:00
42 changed files with 256 additions and 157 deletions

View File

@@ -1623,7 +1623,7 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
const int shThreshold = options.shadowThreshold;
const float ShawdowFac = 64.f / (options.shadowThreshold + 1);
const float HighlightFac = 64.f / (256 - options.highlightThreshold);
const bool showclippedAny = (!showR && !showG && !showB && !showL); // will show clipping if any of RGB chanels is clipped
const bool showclippedAny = (!showR && !showG && !showB && !showL); // will show clipping if any (all) of RGB chanels is (shadow) clipped
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@@ -1681,17 +1681,21 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
}
if (showcs) {
if ((showclippedAny || showR) && currWS[0] <= shThreshold ) {
bool scR = currWS[0] <= shThreshold;
bool scG = currWS[1] <= shThreshold;
bool scB = currWS[2] <= shThreshold;
if (((showclippedAny && (scG && scB)) || showR) && scR ) {
delta += currWS[0];
changedSH = true;
}
if ((showclippedAny || showG) && currWS[1] <= shThreshold ) {
if (((showclippedAny && (scR && scB)) || showG) && scG ) {
delta += currWS[1];
changedSH = true;
}
if ((showclippedAny || showB) && currWS[2] <= shThreshold ) {
if (((showclippedAny && (scR && scG)) || showB) && scB ) {
delta += currWS[2];
changedSH = true;
}

View File

@@ -182,7 +182,9 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
updateDisabled(false);
} else if (LCPStore::getInstance()->isValidLCPFileName(pp->lensProf.lcpFile)) {
fcbLCPFile->set_filename (pp->lensProf.lcpFile);
updateDisabled(true);
if(corrLcpFile->get_active()) {
updateDisabled(true);
}
} else {
fcbLCPFile->unselect_filename(fcbLCPFile->get_filename());
updateDisabled(false);
@@ -194,17 +196,18 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
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.lfManual()) {
setLensfunCamera(c.getMake(), c.getModel());
if (metadata) {
c = db->findCamera(metadata->getMake(), metadata->getModel());
setLensfunCamera(c.getMake(), c.getModel());
}
}
if (!setLensfunLens(pp->lensProf.lfLens) && !pp->lensProf.lfManual()) {
setLensfunLens(l.getLens());
if (metadata) {
LFLens l = db->findLens(c, metadata->getLens());
setLensfunLens(l.getLens());
}
}
lcModeChanged = lcpFileChanged = useDistChanged = useVignChanged = useCAChanged = false;
@@ -231,7 +234,7 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
void LensProfilePanel::updateLensfunWarning()
{
warning->hide();
if (corrLensfunManual->get_active()) {
if (corrLensfunManual->get_active() || corrLensfunAuto->get_active()) {
const LFDatabase *db = LFDatabase::getInstance();
auto itc = lensfunCameras->get_active();

View File

@@ -424,12 +424,16 @@ int processLineParams ( int argc, char **argv )
}
} else {
outputType = "jpg";
compression = atoi (currParam.substr (2).c_str());
if(currParam.size() < 3) {
compression = 92;
} else {
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;
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;
}
}
}