MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / blend

Function blend

source/util/pixelMatch.cpp:27–29  ·  view source on GitHub ↗

blend semi-transparent color with white

Source from the content-addressed store, hash-verified

25
26// blend semi-transparent color with white
27U8 blend(U8 c, double a) {
28 return (U8)(255 + (c - 255) * a);
29}
30
31double rgb2y(U8 r, U8 g, U8 b) { return r * 0.29889531 + g * 0.58662247 + b * 0.11448223; }
32double rgb2i(U8 r, U8 g, U8 b) { return r * 0.59597799 - g * 0.27417610 - b * 0.32180189; }

Callers 3

colorDeltaFunction · 0.85
grayPixelFunction · 0.85
pixelmatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected