title: PNG Creation in PHP (is it different than gif and jpg?)
body: <p>I have a image upload form that should take image types (PNG, JPEG, GIF), resize it and then save it to a path. </p>
  
  <p>For some reason I can't get the PNG file types to work, it works fine with JPEG/GIF and the file is copied so it looks like it's something to do with how I'm creating the PNG. </p>
  
  <p>Does PNG creation in PHP require different parameters or options?  Some sample code of lines that do image creation:</p>
  
  <pre><code>$src = imagecreatefrompng($uploadedfile);
  imagecreatetruecolor($newWidth,$newHeight)
  imagecopyresampled($tmp,$src,0,0,0,0,$newWidth,$newHeight,$width,$height);
  imagepng($tmp,$destinationPath."/".$destinationFile,100);
  </code></pre>
  
  <p>The same commands work for JPG and GIF.</p>