title: hasAlpha vs getAlphaRaster
body: <p>In Java, is it expected to be able to have a <code>BufferedImage</code> such that <code>getColorModel().hasAlpha()</code> will return true, but <code>getAlphaRaster()</code> will return null?</p>
  
  <p>I ask because there's a library I'm using (PDFBox specifically, in the <code>PDJpeg</code> class) that breaks on such an image.</p>
  
  <p>In this particular case I'm creating the image very simply using:</p>
  
  <pre><code>BufferedImage bi = ImageIO.read(new FileInputStream("/Users/dan/Downloads/test.png"));
  </code></pre>
  
  <p>I've attached the particular image that's failing for me below this question.</p>
  
  <p>Is there some sort of parameter I can pass to ImageIO or some kind of transformation I can do to my <code>BufferedImage</code> after it's loaded so that it won't run into this problem? </p>
  
  <p>I'm running Java 1.7.0_40 if it matters.</p>
  
  <p>Stack trace for completeness:</p>
  
  <pre><code>java.lang.NullPointerException
      at java.awt.image.ComponentColorModel.isCompatibleRaster(ComponentColorModel.java:2787)
      at java.awt.image.BufferedImage.&lt;init&gt;(BufferedImage.java:629)
      at org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg.createImageStream(PDJpeg.java:159)
      at org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg.&lt;init&gt;(PDJpeg.java:133)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/oVxeY.png" alt="enter image description here"></p>