Skip to content

Commit

Permalink
Update quantizer.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal Karaulov authored Dec 14, 2022
1 parent c66b755 commit d3de0c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/quantizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void Quantizer::FloydSteinbergDither(COLOR3* image, int64_t width, int64_t heigh
{
int i = width * (height - y - 1) + x;
int j = width * y + x;
unsigned int k = FixBounds(GetNearestIndexFast(image[j], m_pPalette));
unsigned int k = GetNearestIndexFast(image[j], m_pPalette);

target[i] = k;

Expand Down Expand Up @@ -211,7 +211,7 @@ void Quantizer::FloydSteinbergDither(COLOR3* image, int64_t width, int64_t heigh
{
int i = width * (height - y - 1) + x;
int j = width * y + x;
unsigned int k = FixBounds(GetNearestIndexFast(image[j], m_pPalette));
unsigned int k = GetNearestIndexFast(image[j], m_pPalette);
target[i] = k;
int diff[3];
diff[0] = image[j].r - m_pPalette[k].r;
Expand Down

0 comments on commit d3de0c0

Please sign in to comment.