For everyone else looking for a solution that is included in (most) distributions by default, here it is:
Command:
$ file <imagename>
Output:
<imagename>: PNG image data, 100 x 10, 8-bit/color RGB, non-interlaced
where 100 x 10 represents width x height respectively.
The file command shows dimensions of many image types. I add this solution because I generally try to avoid installing additional software, and ImageMagick (although awesome!) is using a sledgehammer to crack a nut here.
Use the command
identify
, which is part of ImageMagick.Examples:
or
For everyone else looking for a solution that is included in (most) distributions by default, here it is:
Command:
$ file <imagename>
Output:
<imagename>: PNG image data, 100 x 10, 8-bit/color RGB, non-interlaced
where 100 x 10 represents width x height respectively.The file command shows dimensions of many image types. I add this solution because I generally try to avoid installing additional software, and ImageMagick (although awesome!) is using a sledgehammer to crack a nut here.