Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: determining size of image

by ikegami (Patriarch)
on Feb 22, 2007 at 17:06 UTC ( [id://601590]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($width,        $height       ) = ...;
    my ($max_width,    $max_height   ) = (800, 600);
    ...
       $width  = int($width  * $factor + 0.5);
       $height = int($height * $factor + 0.5);
    }
    
  2. or download this
    use Image::Magick qw();
    
    ...
       $img->Resize(width => $new_width, height => $new_height);
       $img->Write($file_name);
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-07-23 20:01 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.