General discussion


how do I get a Image file's resolution

By eric_7178 ·
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.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to how do I get a Image file ...

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.

Collapse -

by dimon_quaker In reply to how do I get a Image file ...

Use "identify" from ImageMagick ( and "awk"

$ identify -verbose 00004.jpg | awk '/Geometry/ {print($2)}' | awk -Fx '{print("Width:"$1"\nHeight:"$2)}'

Related Discussions

Related Forums