Change description profile FOIP

This commit is contained in:
Desmis 2018-04-07 12:52:45 +02:00
parent 4bcd6e01de
commit ceca81d193

View File

@ -1483,6 +1483,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
cmsMLU *mlu; cmsMLU *mlu;
cmsContext ContextID = cmsGetProfileContextID(outputProfile); // create context to modify some TAGs cmsContext ContextID = cmsGetProfileContextID(outputProfile); // create context to modify some TAGs
mlu = cmsMLUalloc(ContextID, 1); mlu = cmsMLUalloc(ContextID, 1);
Glib::ustring outPro;
// instruction with //ICC are used to generate ICC profile // instruction with //ICC are used to generate ICC profile
if (mlu == nullptr) { if (mlu == nullptr) {
@ -1513,25 +1514,29 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
} else { } else {
// create description with gamma + slope + primaries // create description with gamma + slope + primaries
std::wostringstream gammaWs; std::wostringstream gammaWs;
gammaWs.precision(2); //std::string gammaWsICC;
gammaWs << "Manual GammaTRC: g=" <<(float)icm.gampos << " s=" <<(float)icm.slpos; std::wstring gammaStrICC;
gammaWs.precision(6);
// gammaWs << "Manual GammaTRC: g=" <<(float)icm.gampos << " s=" <<(float)icm.slpos;
//Glib::ustring outPro;
outPro = outProfile + "_FOIP"+ std::to_string((float)icm.gampos)+" "+ std::to_string((float)icm.slpos) + ".icc";
gammaWs << outPro.c_str() <<(float)icm.gampos << " s=" <<(float)icm.slpos;
cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str());
// cmsSaveProfileToFile(outputProfile, outPro.c_str());
} }
cmsWriteTag(outputProfile, cmsSigProfileDescriptionTag, mlu);//desc changed cmsWriteTag(outputProfile, cmsSigProfileDescriptionTag, mlu);//desc changed
/* Glib::ustring manufacturer;
cmsMLUsetWide(mlu, "en", "US", L"General Public License - AdobeRGB compatible");//adapt to profil
cmsWriteTag(outputProfile, cmsSigCopyrightTag, mlu);
cmsMLUsetWide(mlu, "en", "US", L"RawTherapee"); manufacturer="RawTherapee_FOIP";
cmsWriteTag(outputProfile, cmsSigDeviceMfgDescTag, mlu); cmsMLUsetASCII(mlu, "en", "US", manufacturer.c_str());
cmsWriteTag(outputProfile, cmsSigDeviceMfgDescTag,mlu);
cmsMLUsetWide(mlu, "en", "US", L"RTMedium"); //adapt to profil
cmsWriteTag(outputProfile, cmsSigDeviceModelDescTag, mlu);
*/
cmsMLUfree(mlu); cmsMLUfree(mlu);
} }
@ -1541,6 +1546,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
cmsWriteTag(outputProfile, cmsSigRedTRCTag,(void*)GammaTRC ); cmsWriteTag(outputProfile, cmsSigRedTRCTag,(void*)GammaTRC );
cmsWriteTag(outputProfile, cmsSigGreenTRCTag,(void*)GammaTRC ); cmsWriteTag(outputProfile, cmsSigGreenTRCTag,(void*)GammaTRC );
cmsWriteTag(outputProfile, cmsSigBlueTRCTag,(void*)GammaTRC ); cmsWriteTag(outputProfile, cmsSigBlueTRCTag,(void*)GammaTRC );
cmsSaveProfileToFile(outputProfile, outPro.c_str());
if (GammaTRC) { if (GammaTRC) {
cmsFreeToneCurve(GammaTRC); cmsFreeToneCurve(GammaTRC);