$obrazek = imagecreate(400,300); 
$zloty = imagecolorallocate($obrazek, 255, 240, 0); 
$bialy = imagecolorallocate($obrazek, 255, 255, 255); 
$kolor = $bialy; 
for ($i = 400, $j = 300; $i > 0; $i -= 4, $j -=3 ) { 
   if ($kolor == $bialy) { 
      $kolor = $zloty; 
   } else { 
      $kolor = $bialy; 
   } 
   imagefilledrectangle($obrazek, 400 - $i, 300 - $j, $i, $j, $kolor); 
} 
imagepng($obrazek); 
imagedestroy($obrazek); 
