Bad behavior with blackwhite and gamma - after change avoid color shift - issue 7159 (#7165)
* Bad behavior with blackwhite and gamma - after change avoid color shift * Change with code Lawrence37 - chprov1 sincosval
This commit is contained in:
parent
b80c694a5f
commit
873729fe0f
@ -4778,13 +4778,22 @@ void ImProcFunctions::chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW,
|
|||||||
histLCurve[Lprov1 * histLFactor]++;
|
histLCurve[Lprov1 * histLFactor]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Chprov1 = sqrt(SQR(atmp) + SQR(btmp)) / 327.68f;
|
|
||||||
|
|
||||||
// labCurve.bwtoning option allows to decouple modulation of a & b curves by saturation
|
// labCurve.bwtoning option allows to decouple modulation of a & b curves by saturation
|
||||||
// with bwtoning enabled the net effect of a & b curves is visible
|
// with bwtoning enabled the net effect of a & b curves is visible
|
||||||
if (bwToning) {
|
if (bwToning) {
|
||||||
atmp -= lold->a[i][j];
|
atmp -= lold->a[i][j];
|
||||||
btmp -= lold->b[i][j];
|
btmp -= lold->b[i][j];
|
||||||
|
Chprov1 = sqrt(SQR(atmp) + SQR(btmp)) / 327.68f;
|
||||||
|
if (Chprov1 == 0.f) {
|
||||||
|
sincosval.x = 0.f;
|
||||||
|
sincosval.y = 1.f;
|
||||||
|
} else {
|
||||||
|
sincosval.x = btmp / (327.68f * Chprov1);
|
||||||
|
sincosval.y = atmp / (327.68f * Chprov1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Chprov1 = sqrt(SQR(atmp) + SQR(btmp)) / 327.68f;
|
||||||
}
|
}
|
||||||
|
|
||||||
lnew->L[i][j] = Lprov1 * 327.68f;
|
lnew->L[i][j] = Lprov1 * 327.68f;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user