From c8f993f962b700fbc0352980b050419b9b84da5d Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 29 Oct 2025 17:15:53 -0500 Subject: [PATCH] Update image.php --- inc/image.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/image.php b/inc/image.php index 840c9004..cab5bb13 100644 --- a/inc/image.php +++ b/inc/image.php @@ -250,7 +250,7 @@ class ImageConvert extends ImageBase { if ($size = @getimagesize($src)) return $size; } - $size = shell_exec_error(($this->gm ? 'gm ' : '') . 'identify -format "%w %h" ' . escapeshellarg($src . '[0]')); + $size = shell_exec_error(($this->gm ? 'gm ' : 'magick ') . 'identify -format "%w %h" ' . escapeshellarg($src . '[0]')); if (preg_match('/^(\d+) (\d+)$/', $size, $m)) return array($m[1], $m[2]); return false; @@ -276,13 +276,13 @@ class ImageConvert extends ImageBase { if (!$this->temp) { if ($config['strip_exif']) { - if($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . escapeshellarg($this->src) . ' -auto-orient -strip ' . escapeshellarg($src))) { $this->destroy(); error(_('Failed to redraw image!'), null, $error); } } else { - if($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . escapeshellarg($this->src) . ' -auto-orient ' . escapeshellarg($src))) { $this->destroy(); error(_('Failed to redraw image!'), null, $error); @@ -329,7 +329,7 @@ class ImageConvert extends ImageBase { } else { $convert_args = &$config['convert_args']; - if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if (($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . sprintf($convert_args, $this->width, $this->height, @@ -348,7 +348,7 @@ class ImageConvert extends ImageBase { } else { $convert_args = &$config['convert_args']; - if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' . + if (($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') . sprintf($convert_args, $this->width, $this->height,