summaryrefslogtreecommitdiff
path: root/Pixel.h
diff options
context:
space:
mode:
Diffstat (limited to 'Pixel.h')
-rw-r--r--Pixel.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/Pixel.h b/Pixel.h
index 9d9adf6..55a684f 100644
--- a/Pixel.h
+++ b/Pixel.h
@@ -26,9 +26,19 @@
struct Pixel
{
- unsigned char b;
- unsigned char g;
- unsigned char r;
- unsigned char a;
+ unsigned char b;
+ unsigned char g;
+ unsigned char r;
+ unsigned char a;
+
+ int isBlack(int threshold = 3) {
+
+ if (r > threshold || g > threshold || b > threshold) {
+ return false;
+ }
+ return true;
+ }
+
};
+
#endif \ No newline at end of file