From 6ad0ca1187752625eed414e58c23171a417cbc53 Mon Sep 17 00:00:00 2001 From: Charl Joseph Mert Date: Thu, 11 Mar 2010 15:31:56 +0200 Subject: [PATCH] Added convert options for image thumbnail generation --- plugins/thumbnails/thumbnails.php | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/plugins/thumbnails/thumbnails.php b/plugins/thumbnails/thumbnails.php index a88d09e..8613514 100644 --- a/plugins/thumbnails/thumbnails.php +++ b/plugins/thumbnails/thumbnails.php @@ -215,13 +215,18 @@ class thumbnailGenerator extends BaseProcessor // do generation $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert'; $pageNumber = $type == 'pdf' ? "[0]" : $mimeType == 'image/tiff' ? "[0]":""; // If its a pdf or tiff, just convert first page + // windows path may contain spaces + /* if (stristr(PHP_OS,'WIN')) { $cmd = "\"{$pathConvert}\" \"{$srcFile}" . $pageNumber . "\" -resize 200x200 \"$thumbnailfile\""; } else { $cmd = "{$pathConvert} {$srcFile}" . $pageNumber . " -resize 200x200 $thumbnailfile"; } + */ + + $cmd = "'{$pathConvert}' '{$srcFile}" . $pageNumber . "' -thumbnail 200 -limit memory 32MiB -limit map 64MiB '$thumbnailfile'"; $default->log->debug($cmd); -- libgit2 0.21.4