Solved

Find out JPG screen size within shell script

Posted on 2001-07-11
3
227 Views
Last Modified: 2011-09-20
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
Comment
Question by:hitzeu
3 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6273538
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
 

Author Comment

by:hitzeu
ID: 6279832
URL is http://www.ijg.org/

Thanks a lot, ahoffmann
0
 

Accepted Solution

by:
PaulSmirnoff earned 50 total points
ID: 6285947
If you have ImageMagick setup

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

Paul.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
reinstall 1 78
Unix Command -- Challenging  question 7 90
Unix Script: Loop over all days of a month 17 98
Field name with special character (Ñ) in Oracle 11 49
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question