Gif/Jpg image dimension

Hi,

does any one know how I get the dimension of a Gif/Jpg image, i.e. width
and height (preferably using VisAD GifAdapter)?

Thanks,

Ugo