Skip to content

Commit e7e7662

Browse files
author
Clang Robot
committed
Committing clang-format changes
1 parent 777c9e9 commit e7e7662

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/include/ImageDitherColor.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ uint8_t Image::findClosestPalette(int16_t r, int16_t g, int16_t b)
6767
int16_t pg = GREEN8(pallete[i]);
6868
int16_t pb = BLUE8(pallete[i]);
6969
int32_t currentDistance = SQR(r - pr) + SQR(g - pg) + SQR(b - pb);
70-
if (currentDistance < minDistance) {
70+
if (currentDistance < minDistance)
71+
{
7172
minDistance = currentDistance;
7273
contenderList[0] = i;
7374
contenderCount = 1;
74-
} else if (currentDistance == minDistance) {
75+
}
76+
else if (currentDistance == minDistance)
77+
{
7578
contenderList[contenderCount] = i;
7679
contenderCount++;
7780
}
@@ -80,7 +83,7 @@ uint8_t Image::findClosestPalette(int16_t r, int16_t g, int16_t b)
8083
// If your project has a good way to seed rand(),
8184
// you can use rand() here to improve dithering quality
8285
// when using shades that are exactly between palette colors.
83-
//return contenderList[contenderCount <= 1 ? 0 : rand() % contenderCount];
86+
// return contenderList[contenderCount <= 1 ? 0 : rand() % contenderCount];
8487

8588
return contenderList[0];
8689
}

src/include/ImageDitherColorKernels.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,3 @@ const int _kernelWidth = (sizeof _kernel[0] / sizeof _kernel[0][0]);
8989
const int _kernelHeight = (sizeof _kernel / sizeof _kernel[0]);
9090

9191
#endif
92-

0 commit comments

Comments
 (0)