我想弄清楚jersey1是否有蓝色像素。另外,我使用按位运算符来找到它。为此,我应该使用按位还是(&)或按位或(|)。你能否向我解释他们彼此有什么不同?提前致谢。使用C++按位运算符查找匹配的颜色
const unsigned int GREEN= 0x0000FF00; //green
const unsigned int RED = 0x00FF0000; //red
const unsigned int BLUE = 0x000000FF; //blue
const unsigned int RGB = RED | GREEN | BLUE;
unsigned int jersey1 = 123;