1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-25 14:50:48 +02:00

Replace (semi-)transparent alpha values in BlendTransparencyModifier::class

This commit is contained in:
Oliver Vogel
2025-01-04 10:03:46 +01:00
parent 1c68e5fdf4
commit 4c48f7a143
5 changed files with 59 additions and 11 deletions

View File

@@ -301,6 +301,15 @@ final class ImageTest extends GdTestCase
$this->assertColor(255, 85, 0, 255, $result->pickColor(1, 0));
}
public function testBlendTransparencyIgnoreTransparencyInBlendingColor(): void
{
$image = $this->readTestImage('gradient.gif');
$this->assertColor(0, 0, 0, 0, $image->pickColor(1, 0));
$result = $image->blendTransparency('ff550055');
$this->assertColor(255, 85, 0, 255, $image->pickColor(1, 0));
$this->assertColor(255, 85, 0, 255, $result->pickColor(1, 0));
}
public function testToJpeg(): void
{
$this->assertMediaType('image/jpeg', $this->image->toJpeg());