Solved

Find out JPG screen size within shell script

Posted on 2001-07-11
3
224 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now