Файл vendor/intervention/image/src/Drivers/Imagick/Analyzers/ColorspaceAnalyzer.php Вес запакованого файла 320b (320 b) Вес распакованого файла: 774b (774 b) Метод сжатия: 8
<?php
declare(strict_types=1);
namespace Intervention\Image\Drivers\Imagick\Analyzers;
use Imagick;
use Intervention\Image\Analyzers\ColorspaceAnalyzer as GenericColorspaceAnalyzer;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Colors\Cmyk\Colorspace as CmykColorspace;
use Intervention\Image\Colors\Rgb\Colorspace as RgbColorspace;
use Intervention\Image\Interfaces\SpecializedInterface;
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(),
};
}
}