Image made through Toolkit returns -1 as width,height
<pre><code>java.awt.Toolkit kit = Toolkit.getDefaultToolkit();
try {
   java.awt.Image img,ig;
   img = kit.getImage("/home/aditya/Pictures/tile.png");
   ig =
      javax.imageio.ImageIO.read(
         new java.io.File("/home/aditya/Pictures/tile.png"));
}
int w  = img.getWidth(null);
int wp = ig .getWidth(null);
int h  = img.getHeight(null);
int hp = ig .getHeight(null);
System.out.println(wp+" "+hp+" "+w+" "+h); 
</code></pre>

<p>Always gives this output </p>

<pre><code>59 64 -1 -1
</code></pre>

<p>i.e. width,height of image created through toolkit always returns -1.</p>

<p>Any idea ?</p>
