| 65 | } |
| 66 | |
| 67 | double grayPixel(const U8* img, U32 i) { |
| 68 | double a = double(img[i + 3]) / 255; |
| 69 | U8 r = blend(img[i + 0], a); |
| 70 | U8 g = blend(img[i + 1], a); |
| 71 | U8 b = blend(img[i + 2], a); |
| 72 | return rgb2y(r, g, b); |
| 73 | } |
| 74 | |
| 75 | // check if a pixel is likely a part of anti-aliasing; |
| 76 | // based on "Anti-aliased Pixel and Intensity Slope Detector" paper by V. Vysniauskas, 2009 |
no test coverage detected