Файл: vendor/intervention/image/src/Drivers/Imagick/Analyzers/ResolutionAnalyzer.php
Строк: 50
<?php
declare(strict_types=1);
namespace InterventionImageDriversImagickAnalyzers;
use InterventionImageAnalyzersResolutionAnalyzer as GenericResolutionAnalyzer;
use InterventionImageInterfacesImageInterface;
use InterventionImageInterfacesSpecializedInterface;
use InterventionImageResolution;
class ResolutionAnalyzer extends GenericResolutionAnalyzer implements SpecializedInterface
{
public function analyze(ImageInterface $image): mixed
{
$imagick = $image->core()->native();
$imageResolution = $imagick->getImageResolution();
return new Resolution(
$imageResolution['x'],
$imageResolution['y'],
$imagick->getImageUnits(),
);
}
}