in reply to jpg file demensions

Sure, perl -MImage::Size -e'print "$_: @{[imgsize($_)]}\n" for @ARGV' *.jpg or in a script

use Image::Size; for (glob '*.jpg') { my ($x, $y) = imgsize($_); print "$_: xsize = $x, ysize = $y\n"; }

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: jpg file demensions
by kmarshall (Novice) on Nov 22, 2004 at 20:59 UTC
    I am a newbie, and I am not experienced with running libraries (I think that is what they are called), like Image:Size. This sounds like it would do what I want it to. Would someone mind explaining how to implement the library or is there a way that I can accomplish my goal without a library.

    Thanks,
    Kyle

    P.S. - perhaps module is what I mean, and not library.
      The messages above show you how to use a Module in perl code.

      How do you go about getting and installing Modules? Of course there is more than one way to do it ... I highly recommend the Tutorials on Module installation. Here's the gist of it:

      To get modules. First find what you need. http:/seach.cpan.org

      Download the module package and untar.

      Third, follow the instructions in the Readme.txt to install. If you are on a UNIX machine, the installations defaults probably will require that you are root to complete the install. If you are not the System Admin of the UNIX box in question, then the easiest thing to do is to ask the sysadmin to complete the installation for you.

      If you are on a Window box, chances are you have sufficient permissions to do the install.

      Seem complicated? Perhaps, but I garantee that results are worth the effort -- there are thousands of highly functional, highly tested, bits of code on CPAN just waiting for you to use...

      -------------------------------------
      Nothing is too wonderful to be true
      -- Michael Faraday

      Just stumbled upon the following page while traversing the periphery of your similar predicament. You might want to check. Have not tried it yet, though.

      http://www.rdrop.com/~half/General/Downloads/imgdim.pl

      This issue, I just found out, has also been discussed here.