Fixed chromaticity -100 same as 0 and Bwtoning issue2127

This commit is contained in:
jdc
2013-12-15 11:33:01 +01:00
parent b350878528
commit c88774cacb
3 changed files with 9 additions and 3 deletions

View File

@@ -1263,6 +1263,7 @@ TP_ICM_WORKINGPROFILE;Working Profile
TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction
TP_IMPULSEDENOISE_THRESH;Threshold TP_IMPULSEDENOISE_THRESH;Threshold
TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift
TP_LABCURVE_CHROMA_TOOLTIP;To apply Bwtoning, set Chromaticity to -100
TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction
TP_LABCURVE_BRIGHTNESS;Lightness TP_LABCURVE_BRIGHTNESS;Lightness
TP_LABCURVE_CHROMATICITY;Chromaticity TP_LABCURVE_CHROMATICITY;Chromaticity

View File

@@ -2965,6 +2965,7 @@ void ImProcFunctions::chromiLuminanceCurve (int pW, LabImage* lold, LabImage* ln
bool highlight = params->hlrecovery.enabled; //Get the value if "highlight reconstruction" is activated bool highlight = params->hlrecovery.enabled; //Get the value if "highlight reconstruction" is activated
int chromaticity = params->labCurve.chromaticity; int chromaticity = params->labCurve.chromaticity;
bool bwToning = params->labCurve.chromaticity==-100 /*|| params->blackwhite.method=="Ch" */ || params->blackwhite.enabled; bool bwToning = params->labCurve.chromaticity==-100 /*|| params->blackwhite.method=="Ch" */ || params->blackwhite.enabled;
//if(chromaticity==-100) chromaticity==-99;
//if(bwToning) printf("OK bwto\n"); else printf("pas de bw\n"); //if(bwToning) printf("OK bwto\n"); else printf("pas de bw\n");
bool LCredsk = params->labCurve.lcredsk; bool LCredsk = params->labCurve.lcredsk;
bool ccut = ccutili; bool ccut = ccutili;
@@ -3340,13 +3341,16 @@ void ImProcFunctions::chromiLuminanceCurve (int pW, LabImage* lold, LabImage* ln
else { else {
// if(Lprov1 > maxlp) maxlp=Lprov1; // if(Lprov1 > maxlp) maxlp=Lprov1;
// if(Lprov1 < minlp) minlp=Lprov1; // if(Lprov1 < minlp) minlp=Lprov1;
if(!bwToning){
lnew->L[i][j]=Lprov1*327.68f; lnew->L[i][j]=Lprov1*327.68f;
lnew->a[i][j]=327.68f*Chprov1*cos(HH); lnew->a[i][j]=327.68f*Chprov1*cos(HH);
lnew->b[i][j]=327.68f*Chprov1*sin(HH); lnew->b[i][j]=327.68f*Chprov1*sin(HH);
}
else {
//Luv limiter only //Luv limiter only
//lnew->a[i][j] = atmp; lnew->a[i][j] = atmp;
//lnew->b[i][j] = btmp; lnew->b[i][j] = btmp;
}
} }
} }
} // end of parallelization } // end of parallelization

View File

@@ -32,6 +32,7 @@ LCurve::LCurve () : Gtk::VBox(), FoldableToolPanel(this) {
brightness = Gtk::manage (new Adjuster (M("TP_LABCURVE_BRIGHTNESS"), -100., 100., 1., 0.)); brightness = Gtk::manage (new Adjuster (M("TP_LABCURVE_BRIGHTNESS"), -100., 100., 1., 0.));
contrast = Gtk::manage (new Adjuster (M("TP_LABCURVE_CONTRAST"), -100., 100., 1., 0.)); contrast = Gtk::manage (new Adjuster (M("TP_LABCURVE_CONTRAST"), -100., 100., 1., 0.));
chromaticity = Gtk::manage (new Adjuster (M("TP_LABCURVE_CHROMATICITY"), -100., 100., 1., 0.)); chromaticity = Gtk::manage (new Adjuster (M("TP_LABCURVE_CHROMATICITY"), -100., 100., 1., 0.));
chromaticity->set_tooltip_markup(M("TP_LABCURVE_CHROMA_TOOLTIP"));
pack_start (*brightness); pack_start (*brightness);
brightness->show (); brightness->show ();