summaryrefslogtreecommitdiff
path: root/Pixel.h
diff options
context:
space:
mode:
authorChristian Völlinger <zerov83@gmail.com>2013-12-31 15:22:29 +0100
committerChristian Völlinger <zerov83@gmail.com>2013-12-31 15:22:29 +0100
commit00e51c9708642efff7c23f235921a324e1df9a37 (patch)
tree438d3ba7b17a35bf145daee0f8d03cd78225cec0 /Pixel.h
parentd2d7b2d550f965302b1d265622d3a5f273eee39a (diff)
downloadvdr-plugin-boblight-00e51c9708642efff7c23f235921a324e1df9a37.tar.gz
vdr-plugin-boblight-00e51c9708642efff7c23f235921a324e1df9a37.tar.bz2
Rewrite of black border detection.0.0.3
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