On Tue, 20 May 1997, joost witteveen wrote:

> (cat filename.jpg|djpeg -v -targa>/dev/null) 2>&1|sed -n -e 's/Start
> Of Frame.*://p'
>
> works for me, though probably there are more straigt forward ways!

Thanks for this tip! i've modified it slightly and wrapped it in a shell
script:

--- cut here /usr/local/bin/jpegsize---
#! /bin/sh

for i in "$@" ; do
        echo -n "$i: "
        (cat $i | djpeg -v -targa>/dev/null ) 2>&1 | \
                sed -n -e 's/Start Of Frame.*://' -e 's/, components=.*//p'
done
--- cut here /usr/local/bin/jpegsize---

$ jpegsize ~cas/public_html/*.jpg
/home/cas/public_html/craig01.jpg:  width=351, height=373
/home/cas/public_html/craig02.jpg:  width=493, height=373

--
craig sanders
networking consultant                  Available for casual or contract
temporary autonomous zone              system administration tasks.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to