How to get image size in pixel (WxH) on the command line in Linux
You can use the following command to get the size of an image file in pixels. For this example, plot.png will be the filename of the image file you want to check.
image_size.sh
identify -format "%wx%h\n" plot.pngExample output:
image_size_output.txt
1550x1037Example output if it’s not an image file
image_size_error.txt
identify-im6.q16: no decode delegate for this image format `PY' @ error/constitute.c/ReadImage/580.Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow