0

In this tip we will see how to use the command line (Terminal) under Ubuntu or any other Linux-based distribution to check the resolution of an image. This will help you avoid using third-party software with GUI or checking the image resolution from the image properties window using the context menu.

Open the terminal under Ubuntu (Ctrl+Alt+T), cd to the folder containing your images and run the following command:

identify image.png |grep -o "[[:digit:]]*x[[:digit:]]*" |head -1

Replace image.png with your own image file name and extension (jpg, gif, etc.). To check all image files resolution contained in a folder, run this command:

identify * |grep -o "[[:digit:]]*x[[:digit:]]*"

To check only a specific image format, use this command:

 identify *.gif |grep -o "[[:digit:]]*x[[:digit:]]*"

That's it!

Post a Comment

 
Top