Файл: vendor/intervention/image/src/Drivers/Gd/Modifiers/SliceAnimationModifier.php
Строк: 54
<?php
declare(strict_types=1);
namespace InterventionImageDriversGdModifiers;
use InterventionImageExceptionsAnimationException;
use InterventionImageInterfacesImageInterface;
use InterventionImageInterfacesSpecializedInterface;
use InterventionImageModifiersSliceAnimationModifier as GenericSliceAnimationModifier;
class SliceAnimationModifier extends GenericSliceAnimationModifier implements SpecializedInterface
{
/**
* {@inheritdoc}
*
* @see ModifierInterface::apply()
*/
public function apply(ImageInterface $image): ImageInterface
{
if ($this->offset >= $image->count()) {
throw new AnimationException('Offset is not in the range of frames.');
}
$image->core()->slice($this->offset, $this->length);
return $image;
}
}