1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-31 17:41:58 +02:00

Fix lost transparency when converting to GIF format

This commit is contained in:
Oliver Vogel
2024-08-14 14:57:09 +02:00
parent 54aa51efda
commit 50a16bbdc1
4 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Intervention\Image\Tests\Feature\Gd;
use Intervention\Image\ImageManager;
use Intervention\Image\Tests\GdTestCase;
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);
}
}