From facff9bd5baf22e91f324dbebc480575ad1398f4 Mon Sep 17 00:00:00 2001 From: Shish <shish@shishnet.org> Date: Wed, 27 Jan 2010 12:25:19 +0000 Subject: [PATCH] fix pixel thumb gen --- ext/handle_pixel/main.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/handle_pixel/main.php b/ext/handle_pixel/main.php index 79aba5ee..0c0c014b 100644 --- a/ext/handle_pixel/main.php +++ b/ext/handle_pixel/main.php @@ -75,11 +75,8 @@ class PixelFileHandler extends DataHandlerExtension { // can end up with 3KB of jpg data and 200KB of misc extra... // "-limit memory $mem" broken? - // Windows is a special case, use what will work on most everything else first - if(in_array("OS", $_SERVER) && $_SERVER["OS"] != 'Windows_NT') { - $cmd = "convert {$inname}[0] -strip -thumbnail {$w}x{$h} jpg:$outname"; - } - else { + // Windows is a special case + if(in_array("OS", $_SERVER) && $_SERVER["OS"] == 'Windows_NT') { $imageMagick = $config->get_string("thumb_convert_path"); // running the call with cmd.exe requires quoting for our paths @@ -88,6 +85,9 @@ class PixelFileHandler extends DataHandlerExtension { // Concat the command altogether $cmd = sprintf($stringFormat, $imageMagick, $inname, $w, $h, $outname); } + else { + $cmd = "convert {$inname}[0] -strip -thumbnail {$w}x{$h} jpg:$outname"; + } // Execute IM's convert command, grab the output and return code it'll help debug it exec($cmd, $output, $ret);