Read embedded dcp profile from raw files

raw files, usually dng files, can provide a dcp profile by providing the
related tags.

This patch will make the "Use embedded" options in the color management
panel selectable if the source raw file embeds a dcp profile.
In this case the DCP panel will be enabled like when reading an external
dcp profile.

Additional changes:

* Rename "Use embedded, if possible" to just "Use embedded" since the
option is already disabled when no embedded profile is found.
* Update the "Use embedded" options tooltip as it's now not related to
  only non raw images.
This commit is contained in:
Simone Gotti
2024-02-26 11:32:01 +01:00
parent a5df36c569
commit 3e26976403
6 changed files with 41 additions and 27 deletions

View File

@@ -1328,7 +1328,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
if (isRaw) {
double pre_mul[3] = { redMultiplier, greenMultiplier, blueMultiplier };
RawImageSource::colorSpaceConversion (baseImg, params.icm, currWB, pre_mul, embProfile, camProfile, cam2xyz, camName );
RawImageSource::colorSpaceConversion (baseImg, params.icm, currWB, pre_mul, embProfile, camProfile, cam2xyz, camName, metadata->getFileName());
} else {
StdImageSource::colorSpaceConversion (baseImg, params.icm, embProfile, thumbImg->getSampleFormat());
}
@@ -1467,7 +1467,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
if (isRaw) {
cmsHPROFILE dummy;
RawImageSource::findInputProfile (params.icm.inputProfile, nullptr, camName, &dcpProf, dummy);
RawImageSource::findInputProfile (params.icm.inputProfile, nullptr, camName, metadata->getFileName(), &dcpProf, dummy);
if (dcpProf) {
dcpProf->setStep2ApplyState (params.icm.workingProfile, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as);