Ok...
I need to know how to convert from 4 rgba values ( 0 - 255 ) to one single 32 bit integer.
I already have accuired the code for converting from the integer to rgba:
i need to know how to change the rgba array back... anyone know?Code:public static int [] int2rgba( int px ) { int [] rgba = new int[4]; rgba[3] = ( px >> 24 ) & 0xff; rgba[0] = ( px >> 16 ) & 0xff; rgba[1] = ( px >> 8 ) & 0xff; rgba[2] = px & 0xff; return rgba; }




Reply With Quote