title: Java ImageIO Grayscale PNG Issue
body: <p>I have a grayscale image ("lena" actually) which I want to experiment with. I got it as a <strong>512x512 PNG file with 216 shades</strong> of gray. </p>
  
  <p>What happens is, when I read it with Java ImageIO, like that:</p>
  
  <pre><code>    String name = args[0];
      File fi = new File(name);
      BufferedImage img = ImageIO.read(fi);
  </code></pre>
  
  <p>I get a BufferedImage with <strong>only 154 colours</strong>! I only realized this, cause my processed images which looked sallow, lacking deep black. </p>
  
  <p>Even more irritating, when I use XnView convert the PNG to a GIF, which is a lossless procedure in this case, read the GIF with above code, I get all 216 colours in my BufferedImage.</p>
  
  <p>Is there some kind of documentation or description, what happens to my PNG, when ImageIO reads it? Are there settings to fix that? I did these experiments on a fairly recent JDK1.8. It is just that my trust in Java PNG support is lost now and I will use coloured PNG later. </p>