Fix L* and CC curve background histograms
The histograms were not being drawn using the full available width. Patch by Ingo Weyrich, fixes #4933
This commit is contained in:
@@ -4289,17 +4289,8 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
}
|
||||
|
||||
|
||||
LUTu hist16Clad;
|
||||
LUTu hist16Llad;
|
||||
|
||||
//preparate for histograms CIECAM
|
||||
if (pW != 1) { //only with improccoordinator
|
||||
hist16Clad (65536);
|
||||
hist16Clad.clear();
|
||||
hist16Llad (65536);
|
||||
hist16Llad.clear();
|
||||
|
||||
}
|
||||
const float histLFactor = pW != 1 ? histLCurve.getSize() / 100.f : 1.f;
|
||||
const float histCFactor = pW != 1 ? histCCurve.getSize() / 48000.f : 1.f;
|
||||
|
||||
#ifdef _DEBUG
|
||||
MyTime t1e, t2e;
|
||||
@@ -4799,8 +4790,7 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
|
||||
//update histogram C
|
||||
if (pW != 1) { //only with improccoordinator
|
||||
int posp = (int)sqrt (atmp * atmp + btmp * btmp);
|
||||
hist16Clad[posp]++;
|
||||
histCCurve[histCFactor * sqrt(atmp * atmp + btmp * btmp)]++;
|
||||
}
|
||||
|
||||
if (editPipette && editID == EUID_Lab_LCCurve) {
|
||||
@@ -4855,8 +4845,7 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
|
||||
//update histo LC
|
||||
if (pW != 1) { //only with improccoordinator
|
||||
int posl = Lprov1 * 327.68f;
|
||||
hist16Llad[posl]++;
|
||||
histLCurve[Lprov1 * histLFactor]++;
|
||||
}
|
||||
|
||||
Chprov1 = sqrt (SQR (atmp) + SQR (btmp)) / 327.68f;
|
||||
@@ -4943,13 +4932,6 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
}
|
||||
} // end of parallelization
|
||||
|
||||
if (pW != 1) { //only with improccoordinator
|
||||
//update histogram C with data chromaticity and not with CC curve
|
||||
hist16Clad.compressTo (histCCurve);
|
||||
//update histogram L with data luminance
|
||||
hist16Llad.compressTo (histLCurve);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
if (settings->verbose) {
|
||||
|
Reference in New Issue
Block a user