use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Imagick\Driver;
use Intervention\Image\Decoders\DataUriImageDecoder;
use Intervention\Image\Decoders\Base64ImageDecoder;
use Intervention\Image\Decoders\FilePathImageDecoder;
// create new manager instance with desired driver
$manager = new ImageManager(new Driver());
// read image only from data uri or base64 encoded data
$image = $manager->read($input, [
DataUriImageDecoder::class,
Base64ImageDecoder::class,
]);
// read image only from file path
$image = $manager->read($input, FilePathImageDecoder::class);
// same with object instead of class name
$image = $manager->read($input, new FilePathImageDecoder());
Addresses #361
Code Example of new features