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

Re: determining size of image

by mreece (Friar)
on Feb 22, 2007 at 18:53 UTC ( [id://601620]=note: print w/replies, xml ) Need Help??


in reply to determining size of image

i typically use something like the following (using Image::Size)
use Image::Size; my ($w, $h) = imgsize("blort.jpg"); if ($w > 800) { my $f = $w / 800; $w = int($w/$f); $h = int($h/$f) }; if ($h > 600) { my $f = $h / 600; $w = int($w/$f); $h = int($h/$f) };

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-07-24 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.