Get The Width And Height Of An Image With ImageMagick

This is how I get the width and height of image files on the command line

Width:

Code
identify -format "%w" image.jpg

Height:

Code
identify -format "%h" image.jpg
Notes
  • These commands don't add a newline

  • To add a newline change them to `%w\n`` and `%h``