how do I get a Image file's resolution
I am creating shell scripts for image archiving. I need to create a script that will determine and display a jpeg files resolution.
Any assistance will be greatly appreciated.
Linux
I am creating shell scripts for image archiving. I need to create a script that will determine and display a jpeg files resolution.
Any assistance will be greatly appreciated.
by jaqui
make sure you have gd, and php installed.
then using php, write your scripts to use the gd libs / functions.
( bash script or perl will also work )
gd, image manipulation for php based web galleries.
includes generating thumbnail images on the fly.
by dimon_quaker
Use "identify" from ImageMagick (http://www.imagemagick.org/) and "awk"
$ identify -verbose 00004.jpg | awk '/Geometry/ {print($2)}' | awk -Fx '{print("Width:"$1"\nHeight:"$2)}'
This discussion is closed to new replies.
Sort by Trending