forked from leftypol/leftypol
MagickImageMetadataReader.php: update
This commit is contained in:
parent
d85118f530
commit
5f85ca7f44
1 changed files with 3 additions and 2 deletions
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
namespace Vichan\Service\Media;
|
||||
|
||||
use Mimey\MimeTypes;
|
||||
use Vichan\Data\ImageMetadataResult;
|
||||
use Mimey\MimeTypes;
|
||||
|
||||
|
||||
class MagickImageMetadataReader implements ImageMetadataReader {
|
||||
private string $prefix;
|
||||
private MimeTypes $mime_types;
|
||||
|
||||
|
||||
public static function createImageMagickReader(MimeTypes $mime_types): MagickImageMetadataReader {
|
||||
return new self('', $mime_types);
|
||||
}
|
||||
|
@ -23,7 +24,7 @@ class MagickImageMetadataReader implements ImageMetadataReader {
|
|||
}
|
||||
|
||||
public function getMetadata(string $file_path): ImageMetadataResult {
|
||||
$arg = escapeshellarg("$file_path[0]");
|
||||
$arg = \escapeshellarg("$file_path[0]");
|
||||
$ret_exec = shell_exec_error("{$this->prefix}identify -format \"%w %h %m\" $arg");
|
||||
|
||||
if (!\is_string($ret_exec)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue