关于java.awt.peer.RobotPeer中的getRGBPixels (Rectangle scree)方法的疑问?该怎么处理

关于java.awt.peer.RobotPeer中的getRGBPixels (Rectangle scree)方法的疑问?想要知道getRGBPixels(Rectan

关于java.awt.peer.RobotPeer中的getRGBPixels (Rectangle scree)方法的疑问?
想要知道getRGBPixels(Rectangle   scree)方法返回的int数值的意义:
程序代码如下:
import   java.awt.peer.*;
import   java.awt.*;
import   sun.awt.ComponentFactory;
/**
  *
  *   @author   xiong
  */
public   class   Main   {
       
        /**   Creates   a   new   instance   of   Main   */
        public   Main()   {
        }
       
        /**
          *   @param   args   the   command   line   arguments
          */
        public   static   void   main(String[]   args)   {
                RobotPeer   peer=null;
                int[]   pixels;
                Rectangle   size   =   new   Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
                try
                {
                                try
                                {
                                        Toolkit   toolkit   =   Toolkit.getDefaultToolkit();
                                        if(toolkit   instanceof   ComponentFactory)
                                                peer   =   ((ComponentFactory)toolkit).createRobot(new   Robot(),  
                                                                GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice());
                                }
                                catch(Exception   exception)   {   }
                                pixels=peer.getRGBPixels(size);
                                System.out.println(pixels.length);
                                for(int   i=0;i <5;i++){
                                        System.out.print(pixels[i]+ "   ");
                                }


                        //return   peer   ==   null   ?   null   :   peer.getRGBPixels(screenRect);
                }
                catch(Exception   e)
                {
                        e.printStackTrace();
                }
                //   TODO   code   application   logic   here
        }
       
}
显示器色彩设为16位,1024*768分辨率下结果为:
run-single:
786432
-16753169   -16750089   -16750089   -16750089   -16750089  
生成成功(总时间:2   秒)

显示器色彩设为32位,1024*768分辨率下结果为:
run-single:
786432
-16556311   -16422412   -16422412   -16422412   -16422412  
生成成功(总时间:1   秒)

想请问一下那个int   数值是如何得来的??




[解决办法]
(pixels[i] > > 16) & 0xFF 是红色
(pixels[i] > > 8) & 0xFF 是绿色
(pixels[i]) & 0xFF 是蓝色

RGB就是这个意思