1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 15:45:34 +02:00
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8314 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-01-07 19:29:50 +00:00
parent bbf09989b0
commit b29ba5343d
2 changed files with 5 additions and 5 deletions

View File

@ -187,13 +187,13 @@ class acp_attachments
if ($this->new_config['img_imagick'])
{
// Change path separator
$this->new_config['img_magick'] = str_replace('\\', '/', $this->new_config['img_magick']);
$this->new_config['img_imagick'] = str_replace('\\', '/', $this->new_config['img_imagick']);
$this->new_config['img_imagick'] = str_replace(array('convert', '.exe'), array('', ''), $this->new_config['img_imagick']);
// Check for trailing slash
if (substr($this->new_config['img_magick'], -1) !== '/')
if (substr($this->new_config['img_imagick'], -1) !== '/')
{
$this->new_config['img_magick'] .= '/';
$this->new_config['img_imagick'] .= '/';
}
}

View File

@ -618,9 +618,9 @@ function create_thumbnail($source, $destination, $mimetype)
// Only use imagemagick if defined and the passthru function not disabled
if ($config['img_imagick'] && function_exists('passthru'))
{
if (substr($config['img_magick'], -1) !== '/')
if (substr($config['img_imagick'], -1) !== '/')
{
$config['img_magick'] .= '/';
$config['img_imagick'] .= '/';
}
@passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -antialias -sample ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" +profile "*" "' . str_replace('\\', '/', $destination) . '"');