The grayscale conversion used is: GRAY = 0.3R + 0.6G + 0.1B
In the previous test case:
if R=0xAA, G=0xCA, B=0x7B; then GRAY = 184.5 (decimal), which if consistent with other values would be rounded off to 185 (0xB9 hex). I fixed couple of those
if R=0x71, G=0xFF, B=0x00; then GRAY = 186.9 (decimal), in the previous version the decimal value 187 was used and in this version 187 is also used (0xBB). That is what I mean by rounding off consistently.
In the previous version the main problem was when
R=0xFF, G=0xFF, B=0xFF; then Gray should be 0xFF, but due to integer treatment, got Gray=0x00, so all white pixels became black. I added a test case which tests this.
Fixes #37