title: Loading 8-bit grayscale image using ImageIO
body: <p>I want to load a 8-bit grayscale image using <code>grayscaleImage = ImageIO.read(grayscaleFile)</code>. However, the <code>BufferedImage</code> class (which is the type of <code>grayscaleImage</code>) only provides a method <code>getRGB(int x, int y)</code>. So, what are the values of <code>color.getRed()</code>, <code>color.getGreen()</code>, <code>color.getBlue()</code> and <code>color.getAlpha()</code> where</p>
  
  <pre><code>Color color = new Color(grayscaleImage.getRGB(x, y), true);
  </code></pre>
  
  <p>From a first observation, it seems like the 8-bit value, stored in the image file at pixel <code>(x,y)</code>, is propagated into the red, green and blue component of <code>color</code> while it's alpha value is fixed at <code>255</code>.</p>
  
  <p>Can someone confirm this observation?</p>