Файл: vendor/intervention/image/src/Drivers/Gd/Modifiers/FlipModifier.php
Строк: 45
<?php
declare(strict_types=1);
namespace InterventionImageDriversGdModifiers;
use InterventionImageDirection;
use InterventionImageExceptionsModifierException;
use InterventionImageInterfacesImageInterface;
use InterventionImageInterfacesSpecializedInterface;
use InterventionImageModifiersFlipModifier as GenericFlipModifier;
class FlipModifier extends GenericFlipModifier implements SpecializedInterface
{
/**
* {@inheritdoc}
*
* @see ModifierInterface::apply()
*
* @throws ModifierException
*/
public function apply(ImageInterface $image): ImageInterface
{
$direction = $this->direction === Direction::HORIZONTAL ? IMG_FLIP_HORIZONTAL : IMG_FLIP_VERTICAL;
foreach ($image as $frame) {
imageflip($frame->native(), $direction);
}
return $image;
}
}