From 90347a08dd882472ee0e84a2abfe55da0ab365f7 Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 6 Mar 2012 20:30:41 +0000 Subject: [PATCH] extent rather than crop and repage --- ext/handle_pixel/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/handle_pixel/main.php b/ext/handle_pixel/main.php index b5bb9601..36dbef25 100644 --- a/ext/handle_pixel/main.php +++ b/ext/handle_pixel/main.php @@ -103,7 +103,7 @@ class PixelFileHandler extends DataHandlerExtension { if($size[1] > $size[0]*5) $size[1] = $size[0]*5; // running the call with cmd.exe requires quoting for our paths - $format = '"%s" "%s[0]" -crop %ux%u +repage -flatten -strip -thumbnail %ux%u -quality %u jpg:"%s"'; + $format = '"%s" "%s[0]" -extent %ux%u -flatten -strip -thumbnail %ux%u -quality %u jpg:"%s"'; $cmd = sprintf($format, $convert, $inname, $size[0], $size[1], $w, $h, $q, $outname); $cmd = str_replace("\"convert\"", "convert", $cmd); // quotes are only needed if the path to convert contains a space; some other times, quotes break things, see github bug #27 exec($cmd, $output, $ret);