forked from leftypol/leftypol
ImageMetadataReader: update
This commit is contained in:
parent
322543a2e0
commit
d5b4f2cd0f
3 changed files with 8 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
|||
namespace Vichan\Service\Media;
|
||||
|
||||
use Vichan\Data\Driver\Metadata\ExifReaderFactory;
|
||||
use Vichan\Data\{Exif, ImageMetadataResult};
|
||||
use Vichan\Data\{Exif, ImageMetadata};
|
||||
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,7 @@ class DefaultImageMetadataReader implements ImageMetadataReader {
|
|||
$this->exif_reader_factory = $exif_reader_factory;
|
||||
}
|
||||
|
||||
public function getMetadata(string $file_path): ImageMetadataResult {
|
||||
public function getMetadata(string $file_path): ImageMetadata {
|
||||
$ret = \getimagesize($file_path, $info);
|
||||
if ($ret === false) {
|
||||
throw new \RuntimeException("Could not read image sizes of '$file_path'");
|
||||
|
@ -45,6 +45,6 @@ class DefaultImageMetadataReader implements ImageMetadataReader {
|
|||
}
|
||||
}
|
||||
|
||||
return new ImageMetadataResult($width, $height, $mime, $orientation);
|
||||
return new ImageMetadata($width, $height, $mime, $orientation);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue