<?php
declare(strict_types=1);

$image = imagecreatetruecolor(12, 8);
$background = imagecolorallocate($image, 238, 238, 238);
imagefill($image, 0, 0, $background);
$red = imagecolorallocate($image, 220, 60, 50);
$blue = imagecolorallocate($image, 20, 110, 190);
imagefilledrectangle($image, 1, 1, 6, 4, $red);
imagefilledrectangle($image, 6, 4, 10, 6, $blue);
imagesetpixel($image, 1, 2, $blue);
$small = imagescale($image, 6);
echo imagesx($small), "x", imagesy($small), "\n";
echo imagesx($image), "\n";
