forked from KatrinaArnold/SigRecNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBMPextra.cpp
More file actions
38 lines (31 loc) · 1.21 KB
/
BMPextra.cpp
File metadata and controls
38 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*************************************************
* *
* BMPextra - an extension to EasyBMP *
* *
* Author: Luis Rei *
* email: luis.rei@gmail.com *
* *
* file: BMPextra.cpp *
* date added: 04-06-2007 *
* date modified: 04-06-2007 *
* version: 1.00 *
* *
* License: BSD (revised/modified) *
* Copyright: 2007 by Luis Rei *
* *
* description: Actual source file *
* *
*************************************************/
#include "BMPextra.h"
bool pixelIsWhite(RGBApixel pixel)
{
if ((int)pixel.Blue > 234 && (int)pixel.Green > 234 && (int)pixel.Red > 234)
return true;
return false;
}
bool pixelIsBlack(RGBApixel pixel)
{
if ((int)pixel.Blue < 20 && (int)pixel.Green < 20 && (int)pixel.Red < 20)
return true;
return false;
}