• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

Find out JPG screen size within shell script

Solaris 2.7 // bash

Hi,

I need to determine height / width of JPG files within a shell script. Which tool can be used for that?

Thanks
0
hitzeu
Asked:
hitzeu
1 Solution
 
ahoffmannCommented:
there exist a jpegtran program (not shure where to find it), which can be used as follows:
    jpegtran -verbose your.jpg |& grep -i width
0
 
hitzeuAuthor Commented:
URL is http://www.ijg.org/

Thanks a lot, ahoffmann
0
 
PaulSmirnoffCommented:
If you have ImageMagick setup

convert -verbose  file.jpg /dev/null |grep file.jpg |head -1 | awk '{print $2}'

Paul.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now