This is an alternative to "Convert RGB to Gray Scale Without Using Pointers".
I'm afraid there are better ways of doing this, based on the power of the framework; in this case, ColorMatrix is the tool to use. See example here[^]. (Warning: Make sure to use correct matrix elements, corresponding to the coefficients mentioned in the tip/trick).