feature 3221 Lazy log file open, clean code
git-svn-id: http://piwigo.org/svn/trunk@31103 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
0c576ea19d
commit
271e1f5688
3 changed files with 84 additions and 47 deletions
|
|
@ -621,6 +621,8 @@ class image_ext_imagick implements imageInterface
|
|||
|
||||
function write($destination_filepath)
|
||||
{
|
||||
global $logger;
|
||||
|
||||
$this->add_command('interlace', 'line'); // progressive rendering
|
||||
// use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
|
||||
//
|
||||
|
|
@ -648,13 +650,13 @@ class image_ext_imagick implements imageInterface
|
|||
|
||||
$dest = pathinfo($destination_filepath);
|
||||
$exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'" 2>&1';
|
||||
$logger->debug($exec, 'i.php');
|
||||
@exec($exec, $returnarray);
|
||||
|
||||
if (function_exists('ilog')) ilog($exec);
|
||||
if (is_array($returnarray) && (count($returnarray)>0) )
|
||||
{
|
||||
if (function_exists('ilog')) ilog('ERROR', $returnarray);
|
||||
foreach($returnarray as $line)
|
||||
$logger->error('', 'i.php', $returnarray);
|
||||
foreach ($returnarray as $line)
|
||||
trigger_error($line, E_USER_WARNING);
|
||||
}
|
||||
return is_array($returnarray);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue