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

declare(strict_types=1);

namespace 
InterventionImageDriversImagickAnalyzers;

use 
InterventionImageCollection;
use 
InterventionImageExceptionsAnalyzerException;
use 
InterventionImageExceptionsStateException;
use 
InterventionImageInterfacesImageInterface;

class 
PixelColorsAnalyzer extends PixelColorAnalyzer
{
    
/**
     * @throws AnalyzerException
     * @throws StateException
     */
    
public function analyze(ImageInterface $image): mixed
    
{
        
$colors = new Collection();
        
$colorProcessor $this->driver()->colorProcessor($image);

        foreach (
$image as $frame) {
            
$colors->push(
                
parent::colorAt($colorProcessor$frame),
            );
        }

        return 
$colors;
    }
}
Онлайн: 1
Реклама