MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / RgbToGray

Function RgbToGray

jni/stasm/misc.cpp:681–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681static byte RgbToGray( // CIE conversion to gray using integer arithmetic
682 const RGBV rgb)
683{
684 return byte((2990 * rgb[2] + 5870 * rgb[1] + 1140 * rgb[0] + 5000) / 10000);
685}
686
687void DesaturateImg( // for apps and debugging, unneeded for ASM
688 CImage& img) // io: convert to gray (but still an RGB image)

Callers 1

DesaturateImgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected