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:
parent
0cd5d39bcd
commit
38566044f9
@ -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));
|
||||
}
|
||||
}
|
||||
|
BIN
tests/images/orientation.jpg
Normal file
BIN
tests/images/orientation.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 571 B |
Loading…
x
Reference in New Issue
Block a user