Support dnggainmap (embedded correction) for Bayer files (#6382)
* dng gainmap support, #6379 * dng GainMap: control sensitivity of checkbox, #6379 * dng GainMap: partial paste * dng GainMap: moved isGainMapSupported() from dcraw.h to dcraw.cc * RawImageSource::applyDngGainMap: small speedup * Change GUI to separate gainmap from other flat-field; also reorder checkbox Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com>
This commit is contained in:
@@ -343,12 +343,12 @@ ToolPanelCoordinator::~ToolPanelCoordinator ()
|
||||
delete toolBar;
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool isMono)
|
||||
void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool isMono, bool isGainMapSupported)
|
||||
{
|
||||
if (isRaw) {
|
||||
if (isBayer) {
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
[this, isGainMapSupported]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(true);
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
@@ -362,6 +362,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
|
||||
preprocessWB->FoldableToolPanel::show();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
flatfield->setGainMap(isGainMapSupported);
|
||||
pdSharpening->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
return false;
|
||||
@@ -369,7 +370,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
|
||||
);
|
||||
} else if (isXtrans) {
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
[this, isGainMapSupported]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(true);
|
||||
sensorxtrans->FoldableToolPanel::show();
|
||||
@@ -383,6 +384,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
|
||||
preprocessWB->FoldableToolPanel::show();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
flatfield->setGainMap(isGainMapSupported);
|
||||
pdSharpening->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
return false;
|
||||
@@ -390,7 +392,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
|
||||
);
|
||||
} else if (isMono) {
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
[this, isGainMapSupported]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(true);
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
@@ -403,6 +405,7 @@ void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtr
|
||||
preprocessWB->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
flatfield->setGainMap(isGainMapSupported);
|
||||
pdSharpening->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user