title: PHP saving imagecreatefrompng
body: <p>I want to save my pngs, but my code does not allow me to create new pngs or overwrite the existing ones. Ideally every time the page is loaded the image would be saved.</p>
  
  <pre><code>&lt;?php
  $width = 640;
      $height = 480;  
      $font = 23;
  
      $string = "This is my text";
      $im = @imagecreatetruecolor($width, $height);
      imagesavealpha($im, true);
      imagealphablending($im, false);
      $white = imagecolorallocatealpha($im, 255, 255, 255, 127);
      imagefill($im, 0, 0, $white);
      $lime = imagecolorallocate($im, 0, 0, 51);
      imagettftext($im, $font, 0, 0, $font - 3, $lime, "./DroidSerif-Bold.ttf", $string);
      $im = imagecreatefrompng("test.png");
      imagedestroy($im);
  
  
  
  ?&gt;
  </code></pre>