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

declare(strict_types=1);

namespace 
InterventionImageDriversImagickModifiers;

use 
InterventionImageExceptionsColorException;
use 
InterventionImageInterfacesImageInterface;
use 
InterventionImageInterfacesSpecializedInterface;
use 
InterventionImageModifiersProfileModifier as GenericProfileModifier;

class 
ProfileModifier extends GenericProfileModifier implements SpecializedInterface
{
    public function 
apply(ImageInterface $image): ImageInterface
    
{
        
$imagick $image->core()->native();
        
$result $imagick->profileImage('icc', (string) $this->profile);

        if (
$result === false) {
            throw new 
ColorException('ICC color profile could not be set.');
        }

        return 
$image;
    }
}
Онлайн: 2
Реклама