Файл: vendor/intervention/image/src/Drivers/Imagick/Analyzers/WidthAnalyzer.php
Строк: 48
<?php
declare(strict_types=1);
namespace InterventionImageDriversImagickAnalyzers;
use ImagickException;
use InterventionImageAnalyzersWidthAnalyzer as GenericWidthAnalyzer;
use InterventionImageExceptionsAnalyzerException;
use InterventionImageInterfacesImageInterface;
use InterventionImageInterfacesSpecializedInterface;
class WidthAnalyzer extends GenericWidthAnalyzer implements SpecializedInterface
{
/**
* @throws AnalyzerException
*/
public function analyze(ImageInterface $image): mixed
{
try {
return $image->core()->native()->getImageWidth();
} catch (ImagickException $e) {
throw new AnalyzerException('Failed to read image width', previous: $e);
}
}
}