Browse files

don't have super-thin / super-short thumbs

  • Loading branch information...
1 parent 3ac30a2 commit 9d87109a8096346111a566bf8a97ee6ba13723d6 @shish committed Feb 13, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 core/imageboard.pack.php
View
3 core/imageboard.pack.php
@@ -976,6 +976,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');

0 comments on commit 9d87109

Please sign in to comment.