From e7554ec04828a565a0c6b9dec99fe6fad6742293 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 11 Aug 2024 13:27:46 +0200 Subject: [PATCH] Allow png results to be 'grayscale' with 'indexed' option --- tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php b/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php index b905bd28..d4908fac 100644 --- a/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php +++ b/tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php @@ -59,6 +59,12 @@ public static function indexedDataProvider(): array new PngEncoder(indexed: true), 'indexed', ], + + [ + static::createTestImage(3, 2)->fill('ccc'), // new grayscale + new PngEncoder(indexed: true), + 'grayscale', // result should be 'indexed' but there seems to be no way to force this with imagick + ], [ static::readTestImage('circle.png'), // truecolor-alpha new PngEncoder(indexed: false), @@ -67,7 +73,7 @@ public static function indexedDataProvider(): array [ static::readTestImage('circle.png'), // indexedcolor-alpha new PngEncoder(indexed: true), - 'indexed', + 'grayscale-alpha', // result should be 'indexed' but there seems to be no way to force this with imagick ], [ static::readTestImage('tile.png'), // indexed