1
0
mirror of https://github.com/Intervention/image.git synced 2025-03-15 22:49:40 +01:00

Add test for image rotation adjustment

This commit is contained in:
Oliver Vogel 2024-01-27 12:13:51 +01:00
parent 0cd5d39bcd
commit 38566044f9
No known key found for this signature in database
GPG Key ID: 1B19D214C02D69BB
2 changed files with 16 additions and 0 deletions

View File

@ -109,6 +109,14 @@ class ImageManagerTest extends TestCase
$this->assertInstanceOf(ImageInterface::class, $image);
}
/** @requires extension gd */
public function testReadGdWithRotationAdjustment(): void
{
$manager = new ImageManager(GdDriver::class);
$image = $manager->read(__DIR__ . '/images/orientation.jpg');
$this->assertColor(255, 255, 255, 255, $image->pickColor(0, 24));
}
/** @requires extension imagick */
public function testCreateImagick()
{
@ -174,4 +182,12 @@ class ImageManagerTest extends TestCase
$image = $manager->read(__DIR__ . '/images/red.gif', [new BinaryImageDecoder(), new FilePathImageDecoder()]);
$this->assertInstanceOf(ImageInterface::class, $image);
}
/** @requires extension imagick */
public function testReadImagickWithRotationAdjustment(): void
{
$manager = new ImageManager(ImagickDriver::class);
$image = $manager->read(__DIR__ . '/images/orientation.jpg');
$this->assertColor(255, 255, 255, 255, $image->pickColor(0, 24));
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B