mirror of
https://github.com/Intervention/image.git
synced 2025-08-07 22:36:54 +02:00
25 lines
636 B
PHP
25 lines
636 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Intervention\Image\Tests\Feature\Gd;
|
|
|
|
use Intervention\Image\ImageManager;
|
|
use Intervention\Image\Tests\GdTestCase;
|
|
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
|
|
|
|
#[RequiresPhpExtension('gd')]
|
|
class ConvertPngGif extends GdTestCase
|
|
{
|
|
public function testConversionKeepsTransparency(): void
|
|
{
|
|
$converted = ImageManager::gd()
|
|
->read(
|
|
$this->readTestImage('circle.png')->toGif()
|
|
);
|
|
|
|
$this->assertTransparency($converted->pickColor(0, 0));
|
|
$this->assertColor(4, 2, 4, 255, $converted->pickColor(25, 25), 4);
|
|
}
|
|
}
|