Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Dimensions of a jpg file

by steelrose (Scribe)
on May 18, 2005 at 15:27 UTC ( [id://458246]=perlquestion: print w/replies, xml ) Need Help??

steelrose has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed Monks,

I'd like to know if anyone knows of a simple way to determine the height and width of a .jpg file in perl. The upshot of this is that I could then build a window size based on the dimensions of the photo, and not have to manually open up each photo and copy it's dimensions to my HTML code.

Anyone do something similar now? How so?

If you give a man a fish he will eat for a day.
If you teach a man to fish he will buy an ugly hat.
If you talk about fish to a starving man, you're a consultant.

Replies are listed 'Best First'.
Re: Dimensions of a jpg file
by merlyn (Sage) on May 18, 2005 at 15:28 UTC
Re: Dimensions of a jpg file
by b10m (Vicar) on May 18, 2005 at 15:42 UTC

    I'd go for Image::Info

    --
    b10m

    All code is usually tested, but rarely trusted.
Re: Dimensions of a jpg file
by jhourcle (Prior) on May 18, 2005 at 16:10 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://458246]
Approved by ZlR
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 14:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found