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

declare(strict_types=1);

namespace 
InterventionImageModifiers;

use 
InterventionImageExceptionsInvalidArgumentException;
use 
InterventionImageInterfacesImageInterface;
use 
InterventionImageInterfacesSizeInterface;

class 
ContainDownModifier extends ContainModifier
{
    
/**
     * Calculate crop size of the contain down resizing process.
     *
     * @throws InvalidArgumentException
     */
    
protected function cropSize(ImageInterface $image): SizeInterface
    
{
        return 
$image->size()
            ->
containDown(
                
$this->width,
                
$this->height,
            )
            ->
alignPivotTo(
                
$this->resizeSize($image),
                
$this->alignment,
            );
    }
}
Онлайн: 1
Реклама