From: garvinhicking Date: Mon, 7 Nov 2005 15:28:47 +0000 (+0000) Subject: fix imagemagick X-Git-Tag: 0.9.1~40 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f8f8957a09fa898020d9a51707855188e99aa13b;p=s9y.git fix imagemagick --- diff --git a/docs/NEWS b/docs/NEWS index 666691b..e054dd6 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,10 @@ Version 0.9.1 () ------------------------------------------------------------------------ + * Fix thumbnail generation for imageMagick when target image is + smaller than the target size, it should not be blown up + (garvinhicking) + * Fix spartacus plugin to not properly indicate updatable versions of plugins (garvinhicking) diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index d18fd12..ab4da54 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -330,7 +330,8 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false) { if ($fdim['mime'] == 'application/pdf') { $cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -flatten -scale '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile . '.png'); } else { - $cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -scale '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile); + $newSize .= '>'; // Tell imagemagick to not enlarge small images + $cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -resize '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile); } exec($cmd, $output, $result); if ( $result != 0 ) {