<?php
declare(strict_types=1);

$image = imagecreatetruecolor(8, 6);
$white = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0, 0, $white);
$black = imagecolorallocate($image, 0, 0, 0);
imagefilledrectangle($image, 1, 1, 4, 4, $black);
$red = imagecolorallocate($image, 220, 50, 45);
imagesetpixel($image, 6, 1, $red);
ob_start();
imagegif($image);
$bytes = ob_get_clean();
echo strlen($bytes) > 0 ? "encoded\n" : "empty\n";
