Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Dimensions of a jpg file

by steelrose (Scribe)
on May 18, 2005 at 15:27 UTC ( #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.

Comment on Dimensions of a jpg file
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
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? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-08-01 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (1 votes), past polls