in reply to Resize image width & height...
$temp_file_var is holding the image.# write the file to a temporary location my $tmp_loc = $TEMP_IMG_DIR . $image_name; my $whan; open($whan,">$tmp_loc") || die "Cannot write $tmp_loc $!"; print $whan $temp_file_var; close($whan); # Resize image and write it to the appropriate location use Image::Thumbnail; my $t = new Image::Thumbnail( size => 450, create => 1, inputpath => $tmp_loc, outputpath => $main_loc ); # Get the new size of the main image use Image::Info qw(image_info dim); my $info = image_info($main_loc); my ($w, $h) = dim($info);
I hope that you can modify this for your use!
|
|---|