Skip to content

Commit caec55a

Browse files
committed
fix color space for tinted grayscale textures in generated items
1 parent c0a0240 commit caec55a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Model/GeneratedItem.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public function render(int $width, int $height, ?TinterList $tinters = null): Im
9696
foreach ($layers as $i => $layer) {
9797
$image = clone $layer->getImage($tick);
9898

99+
if ($image->getImageType() !== Imagick::IMGTYPE_TRUECOLORMATTE) {
100+
$image->transformImageColorspace(Imagick::COLORSPACE_UNDEFINED);
101+
}
102+
99103
if ($tinters !== null) {
100104
$color = $tinters->getTintColor($i);
101105
if ($color !== null) {

0 commit comments

Comments
 (0)