From 44fabd51eb75b631827edfa48c82d04734f57468 Mon Sep 17 00:00:00 2001 From: Miller Cy Chan Date: Thu, 4 Jul 2024 11:32:27 +0800 Subject: [PATCH] Update GilbertCurve.cpp --- nQuantCpp/GilbertCurve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nQuantCpp/GilbertCurve.cpp b/nQuantCpp/GilbertCurve.cpp index 3e11946..b60b091 100644 --- a/nQuantCpp/GilbertCurve.cpp +++ b/nQuantCpp/GilbertCurve.cpp @@ -258,7 +258,7 @@ namespace Peano int density = m_nMaxColor > 16 ? 3200 : 1500; if (m_nMaxColor / weight > 5000 && (weight > .045 || (weight > .01 && m_nMaxColor <= 64))) ditherMax = (BYTE)sqr(5 + edge); - else if (m_nMaxColor / weight < density && m_nMaxColor >= 16 && m_nMaxColor < 256) + else if (DITHER_MAX > 9 && m_nMaxColor / weight < density && m_nMaxColor >= 16 && m_nMaxColor < 256) ditherMax = (BYTE)sqr(5 + edge); thresold = DITHER_MAX > 9 ? -112 : -64; auto pLookup = make_unique(USHRT_MAX + 1);