Here you can find the source of rgb(int pixel)
public static int[] rgb(int pixel)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] rgb(int pixel) { int r = (pixel & 0xff0000) >> 16; int g = (pixel & 0xff00) >> 8; int b = (pixel & 0xff); int[] m = { r, g, b }; return m; }/*from w ww . jav a2s . c o m*/ }