fix pixel thumb gen
This commit is contained in:
parent
5ddaed8e28
commit
facff9bd5b
1 changed files with 5 additions and 5 deletions
|
@ -75,11 +75,8 @@ class PixelFileHandler extends DataHandlerExtension {
|
||||||
// can end up with 3KB of jpg data and 200KB of misc extra...
|
// can end up with 3KB of jpg data and 200KB of misc extra...
|
||||||
// "-limit memory $mem" broken?
|
// "-limit memory $mem" broken?
|
||||||
|
|
||||||
// Windows is a special case, use what will work on most everything else first
|
// Windows is a special case
|
||||||
if(in_array("OS", $_SERVER) && $_SERVER["OS"] != 'Windows_NT') {
|
if(in_array("OS", $_SERVER) && $_SERVER["OS"] == 'Windows_NT') {
|
||||||
$cmd = "convert {$inname}[0] -strip -thumbnail {$w}x{$h} jpg:$outname";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$imageMagick = $config->get_string("thumb_convert_path");
|
$imageMagick = $config->get_string("thumb_convert_path");
|
||||||
|
|
||||||
// running the call with cmd.exe requires quoting for our paths
|
// running the call with cmd.exe requires quoting for our paths
|
||||||
|
@ -88,6 +85,9 @@ class PixelFileHandler extends DataHandlerExtension {
|
||||||
// Concat the command altogether
|
// Concat the command altogether
|
||||||
$cmd = sprintf($stringFormat, $imageMagick, $inname, $w, $h, $outname);
|
$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
|
// Execute IM's convert command, grab the output and return code it'll help debug it
|
||||||
exec($cmd, $output, $ret);
|
exec($cmd, $output, $ret);
|
||||||
|
|
Reference in a new issue