Commit 6ad0ca1187752625eed414e58c23171a417cbc53

Authored by Charl Joseph Mert
Committed by jpbauer
1 parent 7995397d

Added convert options for image thumbnail generation

Updated by: Charl Joseph Mert
plugins/thumbnails/thumbnails.php
... ... @@ -215,13 +215,18 @@ class thumbnailGenerator extends BaseProcessor
215 215 // do generation
216 216 $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert';
217 217 $pageNumber = $type == 'pdf' ? "[0]" : $mimeType == 'image/tiff' ? "[0]":""; // If its a pdf or tiff, just convert first page
  218 +
218 219 // windows path may contain spaces
  220 + /*
219 221 if (stristr(PHP_OS,'WIN')) {
220 222 $cmd = "\"{$pathConvert}\" \"{$srcFile}" . $pageNumber . "\" -resize 200x200 \"$thumbnailfile\"";
221 223 }
222 224 else {
223 225 $cmd = "{$pathConvert} {$srcFile}" . $pageNumber . " -resize 200x200 $thumbnailfile";
224 226 }
  227 + */
  228 +
  229 + $cmd = "'{$pathConvert}' '{$srcFile}" . $pageNumber . "' -thumbnail 200 -limit memory 32MiB -limit map 64MiB '$thumbnailfile'";
225 230  
226 231 $default->log->debug($cmd);
227 232  
... ...