1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-27 23:59:50 +02:00

Fix bug in cover modifiers

See: https://github.com/Intervention/image/issues/1359
This commit is contained in:
Oliver Vogel
2024-06-06 17:38:32 +02:00
parent 193324ec88
commit a566769f21
7 changed files with 95 additions and 3 deletions

View File

@@ -27,4 +27,12 @@ final class CoverModifierTest extends GdTestCase
$this->assertColor(0, 0, 255, 255, $image->pickColor(70, 52));
$this->assertTransparency($image->pickColor(90, 30));
}
public function testModifyOddSize(): void
{
$image = $this->createTestImage(375, 250);
$image->modify(new CoverModifier(240, 90, 'center'));
$this->assertEquals(240, $image->width());
$this->assertEquals(90, $image->height());
}
}