Detect Image Size

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Detect Image Size

Post by fmw42 »

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
Post Reply