title: How to obtain the red, green and blue values from gray value in java?
body: <p>I obtain the gray value of the pixel by :</p>
  
  <pre><code>val=img.getRGB(j, i) &amp; 0xFF;
  </code></pre>
  
  <p>for processing purpose.</p>
  
  <p>Now , after processing I want the red, green and blue values back. How do I do this?</p>