mirror of
https://github.com/Intervention/image.git
synced 2025-09-01 09:52:59 +02:00
Add ability to read Imagick or GDImage directly (#1329)
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Intervention\Image\Tests\Unit\Drivers\Imagick;
|
||||
|
||||
use Imagick;
|
||||
use ImagickPixel;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
|
||||
use Intervention\Image\Colors\Cmyk\Color as CmykColor;
|
||||
@@ -34,6 +36,15 @@ final class InputHandlerTest extends BaseTestCase
|
||||
$this->assertInstanceOf(Image::class, $result);
|
||||
}
|
||||
|
||||
public function testHandleImagick(): void
|
||||
{
|
||||
$imagick = new Imagick();
|
||||
$imagick->newImage(3, 2, new ImagickPixel('rgba(255, 255, 255, 255)'), 'png');
|
||||
$handler = new InputHandler();
|
||||
$result = $handler->handle($imagick);
|
||||
$this->assertInstanceOf(Image::class, $result);
|
||||
}
|
||||
|
||||
public function testHandleSplFileInfo(): void
|
||||
{
|
||||
$handler = new InputHandler();
|
||||
|
Reference in New Issue
Block a user