Skip to content

Commit 2e6bc15

Browse files
authored
Add files via upload
1 parent 966514b commit 2e6bc15

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎nQuantCpp/GilbertCurve.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,7 @@ namespace Peano
406406
else if (weight < .03 && m_nMaxColor / weight < density && m_nMaxColor >= 16 && m_nMaxColor < 256)
407407
ditherMax = (BYTE)sqr(5 + edge);
408408

409-
if (!sortedByYDiff)
410-
initWeights(DITHER_MAX);
409+
initWeights(DITHER_MAX);
411410

412411
if (width >= height)
413412
generate2d(0, 0, width, 0, 0, height);

‎nQuantCpp/PnnLABQuantizer.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ namespace PnnLABQuant
635635
};
636636

637637
const auto bitmapHeight = pixels.size() / bitmapWidth;
638-
bool fullDither = !hasAlpha() && nMaxColors >= 128 && (weight < .02 || weight > .09);
638+
bool fullDither = !hasAlpha() && nMaxColors >= 128 && weight < .02;
639639
if (isGA && !hasAlpha() && nMaxColors >= 128)
640640
fullDither = true;
641641

0 commit comments

Comments
 (0)