don't have super-thin / super-short thumbs
This commit is contained in:
parent
3cf72af8cd
commit
20cc4cc165
1 changed files with 3 additions and 0 deletions
|
@ -971,6 +971,9 @@ function get_thumbnail_size($orig_width, $orig_height) {
|
||||||
if($orig_width == 0) $orig_width = 192;
|
if($orig_width == 0) $orig_width = 192;
|
||||||
if($orig_height == 0) $orig_height = 192;
|
if($orig_height == 0) $orig_height = 192;
|
||||||
|
|
||||||
|
if($orig_width > $orig_height * 5) $orig_width = $orig_height * 5;
|
||||||
|
if($orig_height > $orig_width * 5) $orig_height = $orig_width * 5;
|
||||||
|
|
||||||
$max_width = $config->get_int('thumb_width');
|
$max_width = $config->get_int('thumb_width');
|
||||||
$max_height = $config->get_int('thumb_height');
|
$max_height = $config->get_int('thumb_height');
|
||||||
|
|
||||||
|
|
Reference in a new issue