mirror of
https://github.com/Intervention/image.git
synced 2025-08-25 06:40:48 +02:00
Fix incorrect color results after color reduction (#1410)
* Add tests to verify issue 1409 * Enable GD's ColorProcessor to resolve array color format * Fix bug when reading colors from palette GDImage * Add detailed type hint
This commit is contained in:
@@ -37,4 +37,11 @@ final class QuantizeColorsModifierTest extends ImagickTestCase
|
||||
$this->expectException(InputException::class);
|
||||
$image->modify(new QuantizeColorsModifier(0));
|
||||
}
|
||||
|
||||
public function testVerifyColorValueAfterQuantization(): void
|
||||
{
|
||||
$image = $this->createTestImage(3, 2)->fill('f00');
|
||||
$image->modify(new QuantizeColorsModifier(1));
|
||||
$this->assertColor(255, 0, 0, 255, $image->pickColor(1, 1));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user