You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Update Frame.cpp
This commit is contained in:
@@ -491,9 +491,9 @@ bool Frame::CheckPixel(int row, int col, int red, int green, int blue, int alpha
|
||||
// Check pixel color
|
||||
const unsigned char* pixels = GetPixels(row);
|
||||
if (pixels[col_pos + 0] >= (red - threshold) && pixels[col_pos + 0] <= (red + threshold) &&
|
||||
pixels[col_pos + 0] >= (green - threshold) && pixels[col_pos + 0] <= (green + threshold) &&
|
||||
pixels[col_pos + 0] >= (blue - threshold) && pixels[col_pos + 0] <= (blue + threshold) &&
|
||||
pixels[col_pos + 0] >= (alpha - threshold) && pixels[col_pos + 0] <= (alpha + threshold)) {
|
||||
pixels[col_pos + 1] >= (green - threshold) && pixels[col_pos + 1] <= (green + threshold) &&
|
||||
pixels[col_pos + 2] >= (blue - threshold) && pixels[col_pos + 2] <= (blue + threshold) &&
|
||||
pixels[col_pos + 3] >= (alpha - threshold) && pixels[col_pos + 3] <= (alpha + threshold)) {
|
||||
// Pixel color matches successfully
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user