[Kde-imaging] [Bug 107905] copy exif data from raw to converted images
Gilles Caulier
caulier.gilles at free.fr
Wed Sep 13 22:02:49 CEST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=107905
------- Additional Comments From caulier.gilles free fr 2006-09-13 22:02 -------
SVN commit 583928 by cgilles:
kipi-plugins from trunk : Raw Converter : new option to set the output color space to use during RAW image data decoding : SRGB, ADOBERGB, WIDEGAMUT, PROPHOTO
CCBUGS: 107905
M +7 -1 batchdialog.cpp
M +28 -0 dcrawsettingswidget.cpp
M +2 -0 dcrawsettingswidget.h
M +6 -0 dcrawutils.cpp
M +8 -1 singledialog.cpp
--- trunk/extragear/libs/kipi-plugins/rawconverter/batchdialog.cpp #583927:583928
@ -243,7 +243,11 @
m_saveSettingsBox->setConflictRule(
(SaveSettingsWidget::ConflictRule)config.readNumEntry("Conflict",
(int)(SaveSettingsWidget::OVERWRITE)));
-
+
+ m_decodingSettingsBox->setOutputColorSpace(
+ (RawDecodingSettings::OutputColorSpace)config.readNumEntry("Output Color Space",
+ (int)(RawDecodingSettings::SRGB)));
+
resize(configDialogSize(config, QString("Batch Raw Converter Dialog")));
}
@ -262,6 +266,7 @
config.writeEntry("Sigma Domain", m_decodingSettingsBox->sigmaDomain());
config.writeEntry("Sigma Range", m_decodingSettingsBox->sigmaRange());
config.writeEntry("Decoding Quality", (int)m_decodingSettingsBox->quality());
+ config.writeEntry("Output Color Space", (int)m_decodingSettingsBox->outputColorSpace());
config.writeEntry("Output Format", (int)m_saveSettingsBox->fileFormat());
config.writeEntry("Conflict", (int)m_saveSettingsBox->conflictRule());
@ -315,6 +320,7 @
rawDecodingSettings.NRSigmaRange = m_decodingSettingsBox->sigmaRange();
rawDecodingSettings.RAWQuality = m_decodingSettingsBox->quality();
rawDecodingSettings.outputFileFormat = m_saveSettingsBox->fileFormat();
+ rawDecodingSettings.outputColorSpace = m_decodingSettingsBox->outputColorSpace();
m_thread->setRawDecodingSettings(rawDecodingSettings);
processOne();
--- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawsettingswidget.cpp #583927:583928
@ -64,6 +64,8 @
unclipColorComboBox = 0;
reconstructLabel = 0;
reconstructSpinBox = 0;
+ outputColorSpaceLabel = 0;
+ outputColorSpaceComboBox = 0;
}
QLabel *brightnessLabel;
@ -72,9 +74,11 @
QLabel *NRSigmaDomainlabel;
QLabel *unclipColorLabel;
QLabel *reconstructLabel;
+ QLabel *outputColorSpaceLabel;
QComboBox *RAWQualityComboBox;
QComboBox *unclipColorComboBox;
+ QComboBox *outputColorSpaceComboBox;
QCheckBox *cameraWBCheckBox;
QCheckBox *fourColorCheckBox;
@ -237,6 +241,20 @
// ---------------------------------------------------------------
+ d->outputColorSpaceLabel = new QLabel(i18n("Color space:"), this);
+ d->outputColorSpaceComboBox = new QComboBox( false, this );
+ d->outputColorSpaceComboBox->insertItem( i18n("Raw (linear)"), 0 );
+ d->outputColorSpaceComboBox->insertItem( i18n("sRGB"), 1 );
+ d->outputColorSpaceComboBox->insertItem( i18n("Adobe RGB"), 2 );
+ d->outputColorSpaceComboBox->insertItem( i18n("Wide Gamut"), 3 );
+ d->outputColorSpaceComboBox->insertItem( i18n("Pro-Photo"), 4 );
+ QWhatsThis::add( d->outputColorSpaceComboBox, i18n("<p><b>Color space</b><p>"
+ "Select here the output color space used to decode RAW data.<p>"));
+ settingsBoxLayout->addMultiCellWidget(d->outputColorSpaceLabel, 11, 11, 0, 0);
+ settingsBoxLayout->addMultiCellWidget(d->outputColorSpaceComboBox, 11, 11, 1, 1);
+
+ // ---------------------------------------------------------------
+
connect(d->unclipColorComboBox, SIGNAL(activated(int)),
this, SLOT(slotUnclipColorActivated(int)));
@ -333,6 +351,11 @
}
}
+RawDecodingSettings::OutputColorSpace DcrawSettingsWidget::outputColorSpace()
+{
+ return (RawDecodingSettings::OutputColorSpace)(d->outputColorSpaceComboBox->currentItem());
+}
+
bool DcrawSettingsWidget::useNoiseReduction()
{
return d->enableNoiseReduction->isChecked();
@ -413,6 +436,11 @
}
}
+void DcrawSettingsWidget::setOutputColorSpace(RawDecodingSettings::OutputColorSpace c)
+{
+ d->outputColorSpaceComboBox->setCurrentItem((int)c);
+}
+
void DcrawSettingsWidget::setNoiseReduction(bool b)
{
d->enableNoiseReduction->setChecked(b);
--- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawsettingswidget.h #583927:583928
@ -53,6 +53,7 @
double sigmaDomain();
double sigmaRange();
RawDecodingSettings::DecodingQuality quality();
+ RawDecodingSettings::OutputColorSpace outputColorSpace();
void setCameraWB(bool b);
void setAutoColorBalance(bool b);
@ -64,6 +65,7 @
void setSigmaDomain(double b);
void setSigmaRange(double b);
void setQuality(RawDecodingSettings::DecodingQuality q);
+ void setOutputColorSpace(RawDecodingSettings::OutputColorSpace c);
private slots:
--- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawutils.cpp #583927:583928
@ -272,6 +272,7 @
// -b : Change the output brightness.
// -q : Use simple bilinear interpolation for quick results
// -B : Use bilateral filter to smooth noise while preserving edges.
+ // -o : Select the output colorspace used to decode RAW data.
command = "dcraw";
command += " -c ";
@ -315,6 +316,11 @
command += NRSigmaRange.setNum(rawDecodingSettings.NRSigmaRange);
command += " ";
}
+
+ command += "-o ";
+ QCString colorSpace;
+ command += colorSpace.setNum(rawDecodingSettings.outputColorSpace);
+ command += " ";
command += QFile::encodeName( KProcess::quote( filePath ) );
--- trunk/extragear/libs/kipi-plugins/rawconverter/singledialog.cpp #583927:583928
@ -238,6 +238,10 @
(SaveSettingsWidget::ConflictRule)config.readNumEntry("Conflict",
(int)(SaveSettingsWidget::OVERWRITE)));
+ m_decodingSettingsBox->setOutputColorSpace(
+ (RawDecodingSettings::OutputColorSpace)config.readNumEntry("Output Color Space",
+ (int)(RawDecodingSettings::SRGB)));
+
resize(configDialogSize(config, QString("Single Raw Converter Dialog")));
}
@ -256,6 +260,7 @
config.writeEntry("Sigma Domain", m_decodingSettingsBox->sigmaDomain());
config.writeEntry("Sigma Range", m_decodingSettingsBox->sigmaRange());
config.writeEntry("Decoding Quality", (int)m_decodingSettingsBox->quality());
+ config.writeEntry("Output Color Space", (int)m_decodingSettingsBox->outputColorSpace());
config.writeEntry("Output Format", (int)m_saveSettingsBox->fileFormat());
config.writeEntry("Conflict", (int)m_saveSettingsBox->conflictRule());
@ -282,6 +287,7 @
rawDecodingSettings.NRSigmaDomain = m_decodingSettingsBox->sigmaDomain();
rawDecodingSettings.NRSigmaRange = m_decodingSettingsBox->sigmaRange();
rawDecodingSettings.RAWQuality = m_decodingSettingsBox->quality();
+ rawDecodingSettings.outputColorSpace = m_decodingSettingsBox->outputColorSpace();
m_thread->setRawDecodingSettings(rawDecodingSettings);
@ -306,7 +312,8 @
rawDecodingSettings.NRSigmaRange = m_decodingSettingsBox->sigmaRange();
rawDecodingSettings.RAWQuality = m_decodingSettingsBox->quality();
rawDecodingSettings.outputFileFormat = m_saveSettingsBox->fileFormat();
-
+ rawDecodingSettings.outputColorSpace = m_decodingSettingsBox->outputColorSpace();
+
m_thread->setRawDecodingSettings(rawDecodingSettings);
KURL::List oneFile;
More information about the Kde-imaging
mailing list