diff options
Diffstat (limited to 'Pixel.h')
-rw-r--r-- | Pixel.h | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -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 |