diff --git a/src/Decoders/AbstractDecoder.php b/src/Decoders/AbstractDecoder.php new file mode 100644 index 00000000..09c707aa --- /dev/null +++ b/src/Decoders/AbstractDecoder.php @@ -0,0 +1,16 @@ +handle($input); + return (new InputHandler($decoders))->handle($input); } /** diff --git a/src/ImageManager.php b/src/ImageManager.php index ad93e39a..1dc61ca7 100644 --- a/src/ImageManager.php +++ b/src/ImageManager.php @@ -6,6 +6,7 @@ use Intervention\Image\Interfaces\DriverInterface; use Intervention\Image\Interfaces\ImageInterface; use Intervention\Image\Drivers\Gd\Driver as GdDriver; use Intervention\Image\Drivers\Imagick\Driver as ImagickDriver; +use Intervention\Image\Interfaces\DecoderInterface; final class ImageManager { diff --git a/src/Interfaces/DriverInterface.php b/src/Interfaces/DriverInterface.php index ec936237..057aa429 100644 --- a/src/Interfaces/DriverInterface.php +++ b/src/Interfaces/DriverInterface.php @@ -40,9 +40,10 @@ interface DriverInterface * Handle given input by decoding it to ImageInterface or ColorInterface * * @param mixed $input + * @param array $decoders * @return ImageInterface|ColorInterface */ - public function handleInput(mixed $input): ImageInterface|ColorInterface; + public function handleInput(mixed $input, array $decoders = []): ImageInterface|ColorInterface; /** * Return color processor for the given colorspace