magick input.png -format '%wx%h' info:

Category: Media & Conversion

magick input.png -format '%wx%h' info:

Print the image dimensions

Prints just the image dimensions, like 800x600, using -format and the info: pseudo-file. %w and %h are the width and height format tokens. Great for scripts that branch on image size.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.