Skip to content

Commit ffa4af4

Browse files
committed
feat(map): add grayscale filter to partial image generation
1 parent 64bd4b9 commit ffa4af4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Module/Admin/View/Map/ShowEventMap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ public function handle(GameControllerInterface $game): void
109109
if ($partialImage === false) {
110110
throw new InvalidArgumentException('error creating partial image');
111111
}
112+
113+
// Convert the partial image to grayscale
114+
imagecopymergegray($partialImage, $partialImage, 0, 0, 0, 0, 30, 30, 30);
115+
112116
$types[$data->getFieldId()] = $partialImage;
113117
imagecopyresized($img, $types[$data->getFieldId()], $curx, $cury, 0, 0, 15, 15, 30, 30);
114118
$curx += 15;

0 commit comments

Comments
 (0)