From 20cc4cc1658c0c68f9d5bbfa66e0c6fe386d8025 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 13 Feb 2011 11:18:23 +0000 Subject: [PATCH] don't have super-thin / super-short thumbs --- core/imageboard.pack.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 3361ce93..617d81e3 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -971,6 +971,9 @@ function get_thumbnail_size($orig_width, $orig_height) { if($orig_width == 0) $orig_width = 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_height = $config->get_int('thumb_height');