Better fix for #4934

This commit is contained in:
heckflosse
2018-11-05 09:43:45 +01:00
parent 56e45087cf
commit fa91103aec
2 changed files with 7 additions and 3 deletions

View File

@@ -5264,6 +5264,10 @@ void ImProcFunctions::EPDToneMap (LabImage *lab, unsigned int Iterates, int skip
minL = 0.0f; //Disable the shift if there are no negative numbers. I wish there were just no negative numbers to begin with.
}
if (maxL == 0.f) { // avoid division by zero
maxL = 1.f;
}
#pragma omp parallel for
for (size_t i = 0; i < N; ++i)