Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan authored Sep 23, 2023
1 parent 29eeca5 commit a0a8202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nQuantGpp/GilbertCurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ namespace Peano
nMaxColors = palette.cols * palette.rows;
if (nMaxColors / weight > 5000 && (weight > .045 || (weight > .01 && nMaxColors <= 64)))
ditherMax = (uchar)sqr(5 + edge);
else if (nMaxColors > 16 && nMaxColors < 256)
ditherMax = (nMaxColors / weight) < 3200 ? (uchar)sqr(5 + edge) : (uchar)sqr(3 + edge);
else if (nMaxColors / weight < 3200 && nMaxColors > 16 && nMaxColors < 256)
ditherMax = (uchar)sqr(5 + edge);
thresold = DITHER_MAX > 9 ? -112 : -64;
auto pWeights = make_unique<float[]>(DITHER_MAX);
m_weights = pWeights.get();
Expand Down

0 comments on commit a0a8202

Please sign in to comment.