Using the basic GD drawing functions
<?php

    define
("WIDTH"450);
    
define("HEIGHT"450);
    
    
$img imagecreate(WIDTHHEIGHT);
    
$white imagecolorallocate($img0xFF0xFF0xFF);
    
$black imagecolorallocate($img000);
    
$green imagecolorallocate($img00xFF0);
    
$red  imagecolorallocate($img0xFF00);
    
    
$points = array(00,                // Vertex (0,0)
                    
0HEIGHT,           // Vertex (0, HEIGHT)
                    
(int)WIDTH/20,     // Vertex (WIDTH/2, 0)
                    
WIDTH-1HEIGHT-1,   // Vertex (WIDTH, HEIGHT)
                    
WIDTH-10);         // Vertex (WIDTH, 0)
    
    
imagepolygon($img$points5$black);
    
imagerectangle($img1010WIDTH-10HEIGHT-10$green);
    
imageellipse($imgWIDTH/2HEIGHT/23030$red);
    
imagefill($img1111$red);
    
    
header("Content-type: image/png");
    
imagepng($img);
    
?>