title: PHP GD Library cannot show picture
body: <p>I have problem with PHP's GD Library..I've made this script for showing some users stats, and it can't work.I don't know why but it just shows broken picture..How can i fix it ?</p>
  
  <p>Thanks, sorry for bad english</p>
  
  <pre><code>                     header("Content-type: image/png");
  
          $image      = imagecreatetruecolor(320, 180);
  
              $online_ico = imagecreatefrompng("/files/online.png");
  
  
              $avatar = imagecreatefrompng("/files/default.png");
  
  
          $white  = imagecolorallocate($image, 255, 240, 240);
          $green  = imagecolorallocate($image, 0, 255, 0);
          $red    = imagecolorallocate($image, 255, 0, 0);
          $blue   = imagecolorallocate($image, 9, 105, 162);
  
          $user_id = "25";
          imagefill($image, 0, 0, $blue); 
  
          //labels
          imagestring($image, 5, 20, 20, "ID ", $white);
          imagestring($image, 5, 20, 40, "UN", $white);
          imagestring($image, 5, 20, 60, "stats", $white);
          imagestring($image, 5, 20, 80, "name", $white);
          //data
          imagestring($image, 5, 130, 20, $user_id, $white);
          imagestring($image, 5, 150, 40, $user_id, $white);
          imagestring($image, 5, 130, 60, $user_id, $white);
          imagestring($image, 5, 130, 80, $user_id, $white);
  
          imagecopy($image, $online_ico, 130, 41, 0, 0, 16, 16);
          imagecopy($image, $avatar, 280, 140, 0, 0, 35, 35);
  
          imagepng($image);
  </code></pre>