Thursday, February 2, 2012

Determine Image Size from Command Line

To get information from the command line about an image, do this:
$ identify filename.png

As an example:
$ identify button.png
button.png PNG 127x34 127x34+0+0 8-bit DirectClass 3.5KiB 0.000u 0:00.000

This shows, among other things, the interpreted filetype, dimensions (width x height), and file size.  You can get way more information by adding -verbose to the command.

Learn more.

No comments:

Post a Comment