referring to the page of the class PixelGrabber in the java 6 api page, http://java.sun.com/...xelGrabber.html ,
i would like to have some clarifications on the following syntax, taken from the above webpage :
public void handlesinglepixel(int x, int y, int pixel) {
int alpha = (pixel >> 24) & 0xff;
int red = (pixel >> 16) & 0xff;
int green = (pixel >> 8) & 0xff;
int blue = (pixel ) & 0xff;
// Deal with the pixel as necessary...
}
What does it mean the operator >> in this case? and what about "& 0xff" ?
Thanks for help,
Nite

New Topic/Question
Reply




MultiQuote





|