Allow custom raw border in range 1..16 for pixelshift files

This commit is contained in:
heckflosse 2018-06-30 14:22:11 +02:00
parent 4b227709d1
commit be07fd83c5
3 changed files with 3 additions and 7 deletions

View File

@ -231,10 +231,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
}
}
if(imgsrc->getSensorType() == ST_BAYER) {
if(params.raw.bayersensor.method!= RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
if(params.raw.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
imgsrc->setBorder(params.raw.bayersensor.border);
} else {
imgsrc->setBorder(4);
imgsrc->setBorder(std::max(params.raw.bayersensor.border, 1));
}
}
bool autoContrast = false;

View File

@ -163,7 +163,7 @@ private:
if(params.raw.bayersensor.method!= RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
imgsrc->setBorder(params.raw.bayersensor.border);
} else {
imgsrc->setBorder(4);
imgsrc->setBorder(std::max(params.raw.bayersensor.border, 1));
}
}
imgsrc->getFullSize (fw, fh, tr);

View File

@ -353,11 +353,9 @@ void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const Params
|| 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)) {
borderbox->hide();
pixelShiftOptions->set_visible(pp->raw.bayersensor.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::PSMotionCorrectionMethod::CUSTOM);
pixelShiftFrame->show();
} else {
borderbox->show();
pixelShiftFrame->hide();
}
@ -566,7 +564,6 @@ void BayerProcess::methodChanged ()
}
if (currentMethod == procparams::RAWParams::BayerSensor::Method::PIXELSHIFT) {
borderbox->hide();
if(pixelShiftMotionMethod->get_active_row_number() == 2) {
pixelShiftOptions->show();
} else {
@ -574,7 +571,6 @@ void BayerProcess::methodChanged ()
}
pixelShiftFrame->show();
} else {
borderbox->show();
pixelShiftFrame->hide();
}
}