Файл vendor/intervention/image/src/Drivers/Gd/Modifiers/SliceAnimationModifier.php Вес запакованого файла 351b (351 b) Вес распакованого файла: 826b (826 b) Метод сжатия: 8
<?php
declare(strict_types=1);
namespace Intervention\Image\Drivers\Gd\Modifiers;
use Intervention\Image\Exceptions\AnimationException;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SpecializedInterface;
use Intervention\Image\Modifiers\SliceAnimationModifier 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;
}
}