Figuring out how to keep a scaled image proportional shouldn't be too hard.
my $new_width = $orig_width; my $new_height = $orig_height; if ( $new_width > $max_width ) { $new_height = int( $orig_height / ( $orig_width / $max_width ) ); $new_width = $max_width; } if ( $new_height > $max_height ) { $new_width = int( $orig_width / ( $orig_height / $max_height ) ); $new_height = $max_height; }
I wouldn't be surprised if Image::Magick has a way to do this for you.
In reply to Re: Thumbnailing with image::magick
by kyle
in thread Thumbnailing with image::magick
by coldfingertips
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |