Skip to content

Commit

Permalink
Allow png results to be 'grayscale' with 'indexed' option
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Aug 11, 2024
1 parent 78534a3 commit e7554ec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/Unit/Drivers/Imagick/Encoders/PngEncoderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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
Expand Down

0 comments on commit e7554ec

Please sign in to comment.