BufferedImage too large ? Null pointer exception !

Hi,

I try to load a PNG image in my program : it works great with normal image size. But when I tried to load an image of 20000*100px, I got a NullPointerException.

Here my method to load the image :

BufferedImage graph = ImageIO.read("image.png");

And when I use :

System.out.println(getGraph().getWidth(null) +"," + getGraph().getHeight(null));

I have null pointer.

Can someone help me ?

Thanks ;)

[573 byte] By [Deathtiny42a] at [2007-11-27 6:36:14]
# 1
It's ok, the problem was somwhere else -> the genration of a bigger image file take a lot of time, so the image is not ready when the program wants to use it -> null pointer !The generation is not blocking, I'll fix that. Thx for reading.
Deathtiny42a at 2007-7-12 18:03:44 > top of Java-index,Security,Cryptography...