I have been trying to find what
(clr & 0x00ff0000) >> 16
I know from Java Tutorials that getRGB "Returns an integer pixel in the default RGB color model (TYPE_INT_ARGB) and default sRGB colorspace", that "The bitwise & operator performs a bitwise AND operation" and that ">>" shifts a bit pattern to the right, but what exactly does this whole thing do in simple words? How does it return 255 which is the value of "R" ?
int clr = image.getRGB(x,y)
Any help would be valuable and appreciated...
I am strugling to find an answer on this...
Do you know what 0x00ff0000 is?
is it a hexadecimal address or something?
Okay, so you say "The bitwise & operator performs a bitwise AND operation". Do you know what that means? Likewise with the shift?
If not, google out a few tutorials about "bitwise operators", regardless of the language, and read up on them.
Read the primitive datatypes section of Sun's tutorial.
Originally Posted by mortoneff