mirror of
https://github.com/Intervention/image.git
synced 2025-08-31 09:31:53 +02:00
Fix bug in CropModifier of Imagick driver (#1428)
The CropModifier produced strange artifacts if another resize step was performed after the modification. This patch removes the copying of the alpha channel in the CropModifier and implements a different method. See: https://github.com/Intervention/image/issues/1426
This commit is contained in:
19
tests/Feature/Imagick/CropResizePngTest.php
Normal file
19
tests/Feature/Imagick/CropResizePngTest.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Intervention\Image\Tests\Feature\Imagick;
|
||||
|
||||
use Intervention\Image\Tests\ImagickTestCase;
|
||||
|
||||
class CropResizePngTest extends ImagickTestCase
|
||||
{
|
||||
public function testCropResizePng(): void
|
||||
{
|
||||
$image = $this->readTestImage('tile.png');
|
||||
$image->crop(100, 100);
|
||||
$image->resize(200, 200);
|
||||
$this->assertTransparency($image->pickColor(7, 22));
|
||||
$this->assertTransparency($image->pickColor(22, 7));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user