identify -ping imagename
That will avoid reading the image and just look at the headers. see http://www.imagemagick.org/Usage/basics/#controls
you can also get just the width and height by
identify -ping -format "%w x %h" imagename
see http://www.imagemagick.org/script/escape.php