-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #1426
- Loading branch information
1 parent
629142e
commit 0f87254
Showing
2 changed files
with
46 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); | ||
} | ||
} |