Вход Регистрация
Файл: vendor/intervention/image/src/Drivers/Imagick/Analyzers/ProfileAnalyzer.php
Строк: 48
<?php

declare(strict_types=1);

namespace 
InterventionImageDriversImagickAnalyzers;

use 
InterventionImageAnalyzersProfileAnalyzer as GenericProfileAnalyzer;
use 
InterventionImageColorsProfile;
use 
InterventionImageExceptionsColorException;
use 
InterventionImageInterfacesImageInterface;
use 
InterventionImageInterfacesSpecializedInterface;

class 
ProfileAnalyzer extends GenericProfileAnalyzer implements SpecializedInterface
{
    public function 
analyze(ImageInterface $image): mixed
    
{
        
$profiles $image->core()->native()->getImageProfiles('icc');

        if (!
array_key_exists('icc'$profiles)) {
            throw new 
ColorException('No ICC profile found in image.');
        }

        return new 
Profile($profiles['icc']);
    }
}
Онлайн: 1
Реклама