Solved

Find out JPG screen size within shell script

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

830 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