core->add( $this->driver->handleInput($source)->core()->first()->setDelay($delay) ); return $this; } /** * @throws RuntimeException */ public function __invoke(): ImageInterface { return new Image( $this->driver, $this->core ); } }; $init($animation); return call_user_func($animation); } /** * {@inheritdoc} * * @see DriverInterface::colorProcessor() */ public function colorProcessor(ColorspaceInterface $colorspace): ColorProcessorInterface { return new ColorProcessor($colorspace); } /** * {@inheritdoc} * * @see DriverInterface::fontProcessor() */ public function fontProcessor(): FontProcessorInterface { return new FontProcessor(); } /** * {@inheritdoc} * * @see DriverInterface::supports() */ public function supports(string|Format|FileExtension|MediaType $identifier): bool { return match (Format::tryCreate($identifier)) { Format::JPEG => boolval(imagetypes() & IMG_JPEG), Format::WEBP => boolval(imagetypes() & IMG_WEBP), Format::GIF => boolval(imagetypes() & IMG_GIF), Format::PNG => boolval(imagetypes() & IMG_PNG), Format::AVIF => boolval(imagetypes() & IMG_AVIF), Format::BMP => boolval(imagetypes() & IMG_BMP), default => false, }; } }