<?
$im = ImageCreateTrueColor(300,350);
//COMMENT OUT FOR JPEG
$bck=imagecolortransparent($im, $bck);
$blue=imagecolorallocate($im, 0, 0, 100);
$pink=imagecolorallocate($im, 255, 150, 130);
for($x=0; $x<256; $x++){
//FACE
imagefilledellipse ($im, 150, 86, 50, 60, $pink);
$font='eye.ttf';
imagettftext($im, 17, 0, 125, 96, $blue, $font, 'Bb');
//HAT
Imageellipse($im, 150, 80-$x/2, 100-$x/2, 80,$x^ceil(rand()));
//BODY
Imageellipse($im, 150, 150, 100-$x/2, 80,$x^ceil(rand()));
//LEGS
Imagearc($im, 150, 220+$x/2, $x/2, 230, 180, 0,$x^ceil(rand()));
}
Header('Content-Type: image/png');
Imagepng($im);
imagedestroy($im);
?>