For recolering the pixels in a bitmap image in my C# project I want to round my RGB values either up to a value of 255 or down to 0;
Each value is a byte.
Right now I am doing the following:
(byte)(Pixels[i] < 128 ? 0 : 255);
I am sure this could be achieved in a quicker way and without type casting using bitwise operations. How would I go about doing this?