From e0be55397026fad2d514c02a6625333cec90e14f Mon Sep 17 00:00:00 2001 From: discomrade Date: Sun, 28 Nov 2021 00:28:49 +0000 Subject: [PATCH] Quick hack to prevent oversized PDF thumbnails. --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index f504778a..fea3553f 100644 --- a/post.php +++ b/post.php @@ -1032,7 +1032,7 @@ if (isset($_POST['delete'])) { } else { if ($file['extension'] == "pdf" && $config['pdf_file_thumbnail']){ $path = $file['thumb']; - $error = shell_exec_error( 'convert -thumbnail x300 -background white -alpha remove ' . + $error = shell_exec_error( 'convert -size '.$config['thumb_width'].'x'.$config['thumb_height'].' -thumbnail '.$config['thumb_width'].'x'.$config['thumb_height'].' -background white -alpha remove ' . escapeshellarg($file['tmp_name']. '[0]') . ' ' . escapeshellarg($file['thumb']));