I believe that GD doesn's support jpg format. If you
want image height/width there are easier ways of doing it
such as the
modules. (Image::Magick is way overkill if you only need height
and width, but it is the swiss-army knife of perl
image manipulation modules).