CmdMagickImageMetadataReader.php: update

This commit is contained in:
Zankaria 2025-03-22 00:37:51 +01:00
parent 8753e23d4a
commit 139aea1361

View file

@ -52,11 +52,11 @@ class CmdMagickImageMetadataReader implements ImageMetadataReader {
$ret_exec = shell_exec_error("{$this->prefix} identify -format \"%w %h %m\" $arg");
if (!\is_string($ret_exec)) {
throw new \RuntimeException("Error while executing identify");
throw new \RuntimeException('Error while executing identify');
}
$ret_match = \preg_match('/^(\d+) (\d+) ([\w\d]+) ([\w]+)$/', $ret_exec, $m);
if (!$ret_match) {
throw new \RuntimeException("Could not parse identify output");
throw new \RuntimeException('Could not parse identify output');
}
$width = $m[1];
$height = $m[2];