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

declare(strict_types=1);

namespace 
InterventionImageDriversImagickAnalyzers;

use 
InterventionImageAnalyzersProfileAnalyzer as GenericProfileAnalyzer;
use 
InterventionImageColorsProfile;
use 
InterventionImageExceptionsAnalyzerException;
use 
InterventionImageExceptionsStreamException;
use 
InterventionImageExceptionsInvalidArgumentException;
use 
InterventionImageInterfacesImageInterface;
use 
InterventionImageInterfacesSpecializedInterface;

class 
ProfileAnalyzer extends GenericProfileAnalyzer implements SpecializedInterface
{
    
/**
     * @throws InvalidArgumentException
     * @throws StreamException
     * @throws AnalyzerException
     */
    
public function analyze(ImageInterface $image): mixed
    
{
        
$profiles $image->core()->native()->getImageProfiles('icc');

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

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