diff options
author | mistic100 <mistic@piwigo.org> | 2015-04-24 17:06:47 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2015-04-24 17:06:47 +0000 |
commit | 271e1f5688cb1dbec065dadf07b5ddb1ac12c899 (patch) | |
tree | 551716e6063ae5ce11199bae34618299812d4cd3 /admin/include/image.class.php | |
parent | 0c576ea19d6d42950615f94feb33df305107a9a6 (diff) |
feature 3221 Lazy log file open, clean code
git-svn-id: http://piwigo.org/svn/trunk@31103 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/image.class.php')
-rw-r--r-- | admin/include/image.class.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/admin/include/image.class.php b/admin/include/image.class.php index e77699758..ee9b9bb12 100644 --- a/admin/include/image.class.php +++ b/admin/include/image.class.php @@ -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); |