laziness, impatience, and hubris | |
PerlMonks |
Re: Resize image width & height...by oakbox (Chaplain) |
on Jun 28, 2003 at 15:35 UTC ( [id://269882]=note: print w/replies, xml ) | Need Help?? |
I wrote this for an online image gallery. I wanted the 'long' dimension to be no larger than 450 pixels, so my script needed to do the resizing before commiting the file to disk and I needed to write down the height and width attributes so that I could modify the HTML to display the image correctly. Here's my code:
$temp_file_var is holding the image. At the end, the new image is written to the path in $main_loc and I have the width $w and the height $h of the new image. I hope that you can modify this for your use!
In Section
Seekers of Perl Wisdom
|
|