modification of LUT of Output-profiles Output-gamma Free-Gamma, suppression of discontinuity
This commit is contained in:
parent
2e4c07d4ff
commit
c1ece88d07
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -342,10 +342,10 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int
|
||||
else if (profi=="BestRGB") {p1=0.7347; p2=0.2653; p3=0.2150; p4=0.7750; p5=0.1300; p6=0.0350;select_temp=1;} // Best primaries
|
||||
if (!freegamma) {//if Free gamma not selected
|
||||
// gamma : ga0,ga1,ga2,ga3,ga4,ga5 by calcul
|
||||
if(gam=="BT709_g2.2_s4.5") {ga0=2.222;ga1=1./1.099258;ga2=0.099258/1.099258;ga3=1./4.5; ga4=0.01805;ga5=0.0;}//BT709 2.2 4.5 - my prefered as D.Coffin ga4=0.01805
|
||||
else if (gam=="sRGB_g2.4_s12.92") {ga0=CurveFactory::sRGBGammaCurve-0.0001; ga1=1./1.0550; ga2=0.0550/1.0550;ga3=1./12.92;ga4=0.039289;}//sRGB 2.4 12.92 - RT default as Lightroom
|
||||
else if (gam=="High_g1.3_s3.35") {ga0=1.3 ; ga1=1./1.001724; ga2=0.001724/1.001724;ga3=1./3.35;ga4=0.001715;}//for high dynamic images
|
||||
else if (gam== "Low_g2.6_s6.9") {ga0=2.6 ; ga1=1./1.12213; ga2=0.12213/1.12213;ga3=1./6.90;ga4=0.01;} //gamma 2.6 variable : for low contrast images
|
||||
if(gam=="BT709_g2.2_s4.5") {ga0=2.22;ga1=0.909995;ga2=0.090005;ga3=0.222222; ga4=0.081071;ga5=0.0;}//BT709 2.2 4.5 - my prefered as D.Coffin
|
||||
else if (gam=="sRGB_g2.4_s12.92") {ga0=2.40; ga1=0.947858; ga2=0.052142;ga3=0.077399;ga4=0.039293;}//sRGB 2.4 12.92 - RT default as Lightroom
|
||||
else if (gam=="High_g1.3_s3.35") {ga0=1.3 ; ga1=0.998279; ga2=0.001721;ga3=0.298507;ga4=0.005746;}//for high dynamic images
|
||||
else if (gam== "Low_g2.6_s6.9") {ga0=2.6 ; ga1=0.891161; ga2=0.108839;ga3=0.144928;ga4=0.076332;} //gamma 2.6 variable : for low contrast images
|
||||
else if (gam=="linear_g1.0") {ga0=1.0; ga1=1.;ga2=0.;ga3=1./eps;ga4=0.;}//gamma=1 linear : for high dynamic images (cf : D.Coffin...)
|
||||
else if (gam=="standard_g2.2") {ga0=2.2; ga1=1.;ga2=0.;ga3=1./eps;ga4=0.;}//gamma=2.2 (as gamma of Adobe, Widegamut...)
|
||||
else if (gam=="standard_g1.8") {ga0=1.8; ga1=1.;ga2=0.;ga3=1./eps;ga4=0.;}//gamma=1.8 (as gamma of Prophoto)
|
||||
@ -354,10 +354,12 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int
|
||||
{
|
||||
if(slpos==0) slpos=eps;
|
||||
calcGamma(pwr, ts, mode, imax,g_a0,g_a1,g_a2,g_a3,g_a4,g_a5);// call to calcGamma with selected gamma and slope : return parameters for LCMS2
|
||||
ga0=gampos;ga1=1./(1.0+g_a4);ga2=g_a4/(1.0 + g_a4);ga3=1./slpos; ga4=g_a3;ga5=0;
|
||||
ga4=g_a3*ts;
|
||||
//printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4);
|
||||
ga0=gampos;ga1=1./(1.0+g_a4);ga2=g_a4/(1.0 + g_a4);ga3=1./slpos;ga5=0;
|
||||
//printf("ga0=%f ga1=%f ga2=%f ga3=%f ga4=%f\n", ga0,ga1,ga2,ga3,ga4);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(select_temp==1) t50=5003;// for Widegamut, Prophoto Best, Beta D50
|
||||
else if (select_temp==2) t50=6504;// for sRGB, AdobeRGB, Bruce D65
|
||||
|
||||
|
@ -342,9 +342,9 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
|
||||
// instruction with //ICC are used for generate icc profile
|
||||
if (DescriptionMLU == NULL) printf("Error Description\n");
|
||||
cmsMLUsetWide(CopyrightMLU, "en", "US", L"No copyright Rawtherapee -Prophoto compatible") ;//adapt to profil
|
||||
cmsMLUsetWide(CopyrightMLU, "en", "US", L"No copyright Rawtherapee -AdobeRGB compatible") ;//adapt to profil
|
||||
cmsMLUsetWide(DmndMLU, "en", "US", L"Rawtherapee") ;
|
||||
cmsMLUsetWide(DmddMLU, "en", "US", L"RTLarge") ; //adapt to profil
|
||||
cmsMLUsetWide(DmddMLU, "en", "US", L"RTMedium") ; //adapt to profil
|
||||
//display Tag desc with : selection of gamma and Primaries
|
||||
if(params.icm.gamma=="High_g1.3_s3.35" && !params.icm.freegamma) {
|
||||
wchar_t string1[80] = L"GammaTRC: High g1.3 s3.35";
|
||||
@ -365,7 +365,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
wchar_t string4[80] = L"GammaTRC: BT709 g2.2 s4.5";
|
||||
wcsncat( string4, stri[ns], 36 );
|
||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string4);
|
||||
}
|
||||
}
|
||||
else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) {
|
||||
wchar_t string5[80] = L"GammaTRC: Linear g1.0";
|
||||
wcsncat( string5, stri[ns], 32 );
|
||||
@ -387,7 +387,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
// else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma BT709(IEC61966 equivalent)");
|
||||
// else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma sRGB(IEC61966 equivalent)");
|
||||
// else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma Linear1.0(IEC61966 equivalent)");
|
||||
// else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma BT709(Prophoto compatible)");
|
||||
//else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma BT709(Prophoto compatible)");
|
||||
// else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma sRGB(Prophoto compatible)");
|
||||
// else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma Linear1.0(Prophoto compatible)");
|
||||
|
||||
@ -422,9 +422,9 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string);}//display description with gamma + slope + primaries
|
||||
|
||||
cmsWriteTag(jprof, cmsSigProfileDescriptionTag, DescriptionMLU);//desc changed
|
||||
//cmsWriteTag(jprof, cmsSigCopyrightTag, CopyrightMLU);
|
||||
//cmsWriteTag(jprof, cmsSigDeviceMfgDescTag, DmndMLU);
|
||||
//cmsWriteTag(jprof, cmsSigDeviceModelDescTag, DmddMLU);
|
||||
cmsWriteTag(jprof, cmsSigCopyrightTag, CopyrightMLU);
|
||||
cmsWriteTag(jprof, cmsSigDeviceMfgDescTag, DmndMLU);
|
||||
cmsWriteTag(jprof, cmsSigDeviceModelDescTag, DmddMLU);
|
||||
|
||||
// Calculate output profile's rTRC bTRC gTRC
|
||||
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters);
|
||||
@ -432,8 +432,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
cmsWriteTag(jprof, cmsSigRedTRCTag, (void*)GammaTRC[0] );
|
||||
cmsWriteTag(jprof, cmsSigBlueTRCTag, (void*)GammaTRC[2] );
|
||||
//for generation ICC profiles : here Prophoto ==> Large
|
||||
// if(params.icm.gamma== "BT709_g2.2_s4.5") cmsSaveProfileToFile(jprof, "RT_Large_gBT709.icc");
|
||||
// else if (params.icm.gamma== "sRGB_g2.4_s12.92") cmsSaveProfileToFile(jprof, "RT_Large_gsRGB.icc");
|
||||
// if(params.icm.gamma== "BT709_g2.2_s4.5") cmsSaveProfileToFile(jprof, "RT_sRGB_gBT709.icm");
|
||||
// else if (params.icm.gamma== "sRGB_g2.4_s12.92") cmsSaveProfileToFile(jprof, "RT_Medium_gsRGB.icc");
|
||||
// else if (params.icm.gamma== "linear_g1.0") cmsSaveProfileToFile(jprof, "RT_Large_g10.icc");
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user