How do I get image dimensions outside of Form/Applet ?

I need to get the dimensions of an image but I am not in a form or an applet so I cannot use that as an ImageObserver. How can I get a default ImageObserver?
[164 byte] By [tlozinaa] at [2007-11-26 18:55:09]
# 1

Just send it null.

int width = image.getWidth(null);

If you aren't using an ImageObserver, or if your applet doesn't override the imageUpdate method, then you don't need to bother with the ImageObserver parameter. The ImageObserver only comes in to play when you call getWidth on an Image that is in the process of being constructed, and still has a width of -1. In that case, then the ImageObserver's imageUpdate method gets fired after the Image is created.

BillCa at 2007-7-9 20:33:07 > top of Java-index,Security,Cryptography...