Skip to content

Commit

Permalink
Update GilbertCurve.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan authored May 13, 2024
1 parent 9f93858 commit 4eb27bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nQuantGpp/GilbertCurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace Peano
m_lookup[offset] = m_ditherFn(*m_pPalette, c2, bidx) + 1;
qPixelIndex = m_lookup[offset] - 1;

if (m_saliencies != nullptr && CIELABConvertor::Y_Diff(pixel, c2) > nMaxColors - margin) {
if (m_saliencies != nullptr && CIELABConvertor::Y_Diff(pixel, c2) > max(1, nMaxColors - margin)) {
Vec4b qPixel;
GrabPixel(qPixel, *m_pPalette, qPixelIndex, 0);
auto strength = 1 / 3.0f;
Expand Down

0 comments on commit 4eb27bd

Please sign in to comment.