in reply to Excel Picture Size Changes & other actions
You should be using either "<br />" (slash at the back, space not required) or plain old "<br>".
As for keeping the aspect ratio: why don't you keep it in the proper ratio yourself? Try to reduce either the width or the height, so the other value has its maximum allowed value, and the current aspect ratio is respected. You can do that like this (untested):
my $width = $pic_cur ->{Width}; my $height = $pic_cur ->{Height}; my $aspect = $height / $width; my $max_height = 100; my $max_width = 200; my $new_width = $max_width; my $new_height = $max_width * $aspect; if($new_height > $max_height) { # too high, so reduce width < max_width $new_height = $max_height; $new_width = $new_height / $aspect; } # else: height <= max_height
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Excel Picture Size Changes & other actions
by merrymonk (Hermit) on Nov 02, 2010 at 13:46 UTC | |
by bart (Canon) on Nov 02, 2010 at 14:41 UTC | |
by merrymonk (Hermit) on Nov 02, 2010 at 15:48 UTC | |
|
Re^2: Excel Picture Size Changes & other actions
by JavaFan (Canon) on Nov 02, 2010 at 15:04 UTC | |
by Anonymous Monk on Nov 02, 2010 at 19:43 UTC | |
by JavaFan (Canon) on Nov 02, 2010 at 21:34 UTC |