<?php
declare(strict_types=1);

$image = imagecreatetruecolor(8, 6);
$pattern = imagecreatetruecolor(1, 1);
imagefill($pattern, 0, 0, imagecolorallocate($pattern, 255, 0, 0));
imagesetbrush($image, $pattern);
imageline($image, 1, 2, 6, 2, IMG_COLOR_BRUSHED);
imagepng($image, "pattern.png");
echo getimagesize("pattern.png")["mime"], "\n";
