title: Convert RGB values to Integer
body: <p>So in a <code>BufferedImage</code>, 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:</p>
  
  <pre><code>// 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);
  </code></pre>
  
  <p>And so far, it works.</p>
  
  <p>What I need to do is <strong>figure out how to get an integer</strong> so I can use <code>BufferedImage.setRGB()</code>, because that takes the same type of data it gave me.</p>