Fixed some bugs and change some tags ICC
This commit is contained in:
@@ -1384,6 +1384,10 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage
|
||||
|
||||
//lcmsMutex->lock(); Mutex acquired by the caller
|
||||
cmsWhitePointFromTemp(&xyD,(double)temp);
|
||||
// cmsCIExyY d60_aces= {0.32168, 0.33767, 1.0};
|
||||
|
||||
// xyD = d60_aces;
|
||||
|
||||
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); //5 = smoother than 4
|
||||
cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile
|
||||
//cmsSetProfileVersion(oprofdef, 4.3);
|
||||
@@ -1490,6 +1494,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// outProfile = options.rtSettings.prophoto;
|
||||
|
||||
//begin adaptation rTRC gTRC bTRC
|
||||
//"outputProfile" profile has the same characteristics than RGB values, but TRC are adapted... for applying profile
|
||||
@@ -1558,18 +1563,35 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
||||
gammaWs << outPro.c_str() <<(float)icm.gampos << " s=" <<(float)icm.slpos;
|
||||
|
||||
cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str());
|
||||
cmsMLU *copyright = cmsMLUalloc(NULL, 1);
|
||||
|
||||
cmsMLUsetASCII(copyright, "en", "US", "No copyright Rawtherapee");
|
||||
cmsWriteTag(outputProfile, cmsSigCopyrightTag, copyright);
|
||||
cmsMLUfree(copyright);
|
||||
cmsMLU *descrip = cmsMLUalloc(NULL, 1);
|
||||
|
||||
cmsMLUsetASCII(descrip, "en", "US", "Rawtherapee");
|
||||
cmsWriteTag(outputProfile, cmsSigDeviceModelDescTag, descrip);
|
||||
cmsMLUfree(descrip);
|
||||
|
||||
|
||||
}
|
||||
|
||||
cmsWriteTag(outputProfile, cmsSigProfileDescriptionTag, mlu);//desc changed
|
||||
cmsMLUfree(mlu);
|
||||
|
||||
Glib::ustring manufacturer;
|
||||
|
||||
manufacturer="RawTherapee_FOIP";
|
||||
cmsMLUsetASCII(mlu, "en", "US", manufacturer.c_str());
|
||||
cmsWriteTag(outputProfile, cmsSigDeviceMfgDescTag,mlu);
|
||||
cmsMLU *MfgDesc;
|
||||
MfgDesc = cmsMLUalloc(NULL, 1);
|
||||
cmsMLUsetASCII(MfgDesc, "en", "US", manufacturer.c_str());
|
||||
cmsWriteTag(outputProfile, cmsSigDeviceMfgDescTag, MfgDesc);
|
||||
cmsMLUfree(MfgDesc);
|
||||
|
||||
//cmsMLUsetASCII(mlu, "en", "US", manufacturer.c_str());
|
||||
//cmsWriteTag(outputProfile, cmsSigDeviceMfgDescTag,mlu);
|
||||
|
||||
cmsMLUfree(mlu);
|
||||
}
|
||||
if(icm.wprofile == "v4") {
|
||||
cmsSetProfileVersion(outputProfile, 4.3);
|
||||
@@ -1646,7 +1668,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
||||
p[3] = 0.999993;
|
||||
p[4] = 0.00009989;
|
||||
p[5] = -0.077007;
|
||||
temp = ColorTemp::D60;
|
||||
temp = ColorTemp::D50;
|
||||
} else {
|
||||
p[0] = 0.7347; //ProPhoto and default primaries
|
||||
p[1] = 0.2653;
|
||||
@@ -1664,6 +1686,9 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
||||
};
|
||||
|
||||
cmsWhitePointFromTemp(&xyD,(double)temp);
|
||||
//cmsCIExyY d60_aces= {0.32168, 0.33767, 1.0};
|
||||
|
||||
//xyD = d60_aces;
|
||||
cmsToneCurve* GammaTRC[3];
|
||||
|
||||
|
||||
|
@@ -256,14 +256,15 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch
|
||||
priHBox->pack_start (*prilab, Gtk::PACK_SHRINK);
|
||||
wprimari = Gtk::manage (new MyComboBoxText ());
|
||||
priHBox->pack_start (*wprimari, Gtk::PACK_EXPAND_WIDGET);
|
||||
|
||||
fgVBox->pack_start(*priHBox, Gtk::PACK_EXPAND_WIDGET);
|
||||
|
||||
std::vector<Glib::ustring> wprinames = rtengine::ICCStore::getInstance()->getWorkingProfiles();
|
||||
|
||||
for (size_t i = 0; i < wprinames.size(); i++) {
|
||||
for (size_t i = 1; i < wprinames.size(); i++) {
|
||||
if(i == 1 || i >= 5 ) {
|
||||
wprimari->append (wprinames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
wprimari->set_active (6);
|
||||
|
||||
@@ -976,6 +977,9 @@ void ICMPanel::GamChanged()
|
||||
wgamma->set_sensitive(false);
|
||||
gampos->set_sensitive(true);
|
||||
slpos->set_sensitive(true);
|
||||
wprimari->set_sensitive(true);
|
||||
wprofile->set_sensitive(true);
|
||||
|
||||
}
|
||||
} else {
|
||||
listener->panelChanged (EvGAMFREE, M("GENERAL_DISABLED"));
|
||||
@@ -984,6 +988,8 @@ void ICMPanel::GamChanged()
|
||||
wgamma->set_sensitive(true);
|
||||
gampos->set_sensitive(false);
|
||||
slpos->set_sensitive(false);
|
||||
wprimari->set_sensitive(false);
|
||||
wprofile->set_sensitive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user