• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • 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

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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