Blog de Nathan Story

Quickly Get Image Dimensions on OS X and Linux

| Comments

I’m not sure if this is common knowledge, but it surprised me. You can use the file utility to quickly get the dimensions of an image (in addition to its standard output of filetype). Example:

$ file other.png
other.png: PNG image data, 120 x 44, 8-bit/color RGBA, non-interlaced

Much easier than opening to get two stupid numbers (: