Skip to content

Commit 722d672

Browse files
authored
Update Frame.cpp
1 parent 3f926f4 commit 722d672

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Frame.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ bool Frame::CheckPixel(int row, int col, int red, int green, int blue, int alpha
491491
// Check pixel color
492492
const unsigned char* pixels = GetPixels(row);
493493
if (pixels[col_pos + 0] >= (red - threshold) && pixels[col_pos + 0] <= (red + threshold) &&
494-
pixels[col_pos + 0] >= (green - threshold) && pixels[col_pos + 0] <= (green + threshold) &&
495-
pixels[col_pos + 0] >= (blue - threshold) && pixels[col_pos + 0] <= (blue + threshold) &&
496-
pixels[col_pos + 0] >= (alpha - threshold) && pixels[col_pos + 0] <= (alpha + threshold)) {
494+
pixels[col_pos + 1] >= (green - threshold) && pixels[col_pos + 1] <= (green + threshold) &&
495+
pixels[col_pos + 2] >= (blue - threshold) && pixels[col_pos + 2] <= (blue + threshold) &&
496+
pixels[col_pos + 3] >= (alpha - threshold) && pixels[col_pos + 3] <= (alpha + threshold)) {
497497
// Pixel color matches successfully
498498
return true;
499499
} else {

0 commit comments

Comments
 (0)