title: Displaying Png Image in J2me
body: <p>I am having  problem of displaying PNG image where as JPG image is Displaying Perfectly well.</p>
  
  <p>Here is the code of getting Image .</p>
  
  <pre><code>Image tImage=Image.createImage("/tasbeeh.jpg");
  </code></pre>
  
  <p>and then draw Image but for png </p>
  
  <pre><code>Image tImage=Image.createImage("/tasbeeh.png");
  </code></pre>
  
  <p>throws exception:</p>
  
  <pre class="lang-none prettyprint-override"><code>java.lang.NullPointerException:
  at start.SplashScreen.paint(+56)
  at javax.microedition.lcdui.Canvas.callPaint(+85)
  at javax.microedition.lcdui.Display.repaint(+82)
  </code></pre>
  
  <p>and</p>
  
  <pre class="lang-none prettyprint-override"><code>java.io.IOException
  at javax.microedition.lcdui.ImmutableImage.getImageFromStream(+15)
  at javax.microedition.lcdui.ImmutableImage.&lt;init&gt;(+20)
  at javax.microedition.lcdui.Image.createImage(+8) 
  </code></pre>