Файл: vendor/intervention/image/src/Drivers/Imagick/Analyzers/ColorspaceAnalyzer.php
Строк: 43
<?php
declare(strict_types=1);
namespace InterventionImageDriversImagickAnalyzers;
use Imagick;
use InterventionImageAnalyzersColorspaceAnalyzer as GenericColorspaceAnalyzer;
use InterventionImageInterfacesImageInterface;
use InterventionImageColorsCmykColorspace as CmykColorspace;
use InterventionImageColorsRgbColorspace as RgbColorspace;
use InterventionImageInterfacesSpecializedInterface;
class ColorspaceAnalyzer extends GenericColorspaceAnalyzer implements SpecializedInterface
{
public function analyze(ImageInterface $image): mixed
{
return match ($image->core()->native()->getImageColorspace()) {
Imagick::COLORSPACE_CMYK => new CmykColorspace(),
default => new RgbColorspace(),
};
}
}