Convert RGB values to Integer
问题 So in a BufferedImage , you receive a single integer that has the RGB values represented in it. So far I use the following to get the RGB values from it: // rgbs is an array of integers, every single integer represents the // RGB values combined in some way int r = (int) ((Math.pow(256,3) + rgbs[k]) / 65536); int g = (int) (((Math.pow(256,3) + rgbs[k]) / 256 ) % 256 ); int b = (int) ((Math.pow(256,3) + rgbs[k]) % 256); And so far, it works. What I need to do is figure out how to get an