forked from leftypol/leftypol
Quick hack to prevent oversized PDF thumbnails.
This commit is contained in:
parent
199f9f5fd0
commit
0e98c35dc5
2
post.php
2
post.php
|
@ -1112,7 +1112,7 @@ function handle_post(){
|
|||
if (($file['extension'] == "pdf" && $config['pdf_file_thumbnail']) ||
|
||||
($file['extension'] == "djvu" && $config['djvu_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']));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user